Skip to content

refactor(compare): split per-arm checks out of _provenance_warnings - #195

Merged
antonwolfy merged 4 commits into
intel:mainfrom
napetrov:fix/provenance-warnings-complexity
Oct 26, 2026
Merged

antonwolfy merged 4 commits into
intel:mainfrom
napetrov:fix/provenance-warnings-complexity

Conversation

@napetrov

Copy link
Copy Markdown
Contributor

#153 took _provenance_warnings to complexity 11, over the cap of 10, so test_growth_ratchet fails on main and on every PR's merge commit (seen first on #186).

This moves the resolved-model and uptake checks into _arm_warnings. The warnings and their order don't change.

Ran the full suite locally: 7245 passed. ruff and mypy are clean on compare.py.

🤖 Generated with Claude Code

intel#153 took _provenance_warnings to complexity 11, over the cap of 10,
so test_growth_ratchet fails on main. Move the resolved-model and
uptake checks into _arm_warnings; the warnings and their order are
unchanged.

Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
@codecov-commenter

codecov-commenter commented Oct 23, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.24%. Comparing base (af17696) to head (df2fd99).
⚠️ Report is 1 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #195   +/-   ##
=======================================
  Coverage   92.24%   92.24%           
=======================================
  Files         239      239           
  Lines       29934    29938    +4     
  Branches     4917     4917           
=======================================
+ Hits        27613    27617    +4     
  Misses       1633     1633           
  Partials      688      688           
Files with missing lines Coverage Δ
dokimi/dokimi/repos/compare.py 99.68% <100.00%> (+<0.01%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@napetrov napetrov added the skip-changelog No user-visible change: bypasses the changelog fragment check label Oct 23, 2026
antonwolfy
antonwolfy previously approved these changes Oct 23, 2026

@antonwolfy antonwolfy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The split is a verbatim move, and it brings _provenance_warnings from complexity 11 to 8, with _arm_warnings at 4, so the ratchet passes again. No findings.

What I ran, on a Linux review host at ce3daad:

  • make ci-local: 27 passed, 2 failed, 7 skipped; 7246 tests passed. The changelog FAIL is covered by the skip-changelog label. The pip-audit FAIL reports a gitpython 3.2.0 advisory (fix in 3.2.1); this PR touches no dependency files.
  • scripts/check_growth.py and tests/test_growth_ratchet.py: both pass (46 tests). compare.py is 503 lines, under the cap.
  • A mutation run on _arm_warnings: 9 mutants against the compare, uptake, host and run tests, 8 killed (dropped uptake check, dropped models filter, inverted used, swapped arms, models=None at the call site, and others).

Checked, no issues

  • Order: the call sits at the old spot in the per-treatment loop, after the stamp and harness-version warnings, so the output order is unchanged. The trailing mismatch_warnings still comes last.
  • Inputs: cells, baseline, text and models are everything the moved block used; both warning strings are identical.
  • References: nothing else in the repo names _provenance_warnings or _arm_warnings, so no docs need updating.

@antonwolfy

Copy link
Copy Markdown
Contributor

@napetrov merged into the current main (565f653), this PR fails these tests:

  • tests/test_growth_ratchet.py::test_no_file_or_function_grew_past_its_baseline
  • tests/test_growth_ratchet.py::test_no_file_or_function_grew_past_its_baseline

The PR's checks ran before main moved to 565f653, so they did not see it. Merging main into the branch reproduces it; once that is fixed I can merge.

@antonwolfy
antonwolfy dismissed their stale review October 23, 2026 12:31

Dismissing until the growth-baseline entry for _provenance_warnings is dropped (see the comment above: merged into the current main, test_growth_ratchet fails). I'll review again after that.

@napetrov

Copy link
Copy Markdown
Contributor Author

Merged intel/main and fixed the growth ratchet failure in a16a5d4: main carried a baseline entry for compare.py::_provenance_warnings (complexity 11); with the split it is 8, so the entry is removed (scripts/check_growth.py --update). tests/test_growth_ratchet.py passes at this head.

Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>

@antonwolfy antonwolfy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The split is still a verbatim move, and the merges of main and the removed _provenance_warnings baseline entry are correct. No findings.

What I ran, on a Linux review host at df2fd99:

  • make ci-local: 28 passed, 1 failed, 7 skipped; 8,195 tests passed; the changed-lines coverage check passes. The changelog FAIL is covered by the skip-changelog label.
  • scripts/check_growth.py and tests/test_growth_ratchet.py: both pass (46 tests). _provenance_warnings is at complexity 8 and _arm_warnings at 4, under the cap of 10.
  • A mutation run on _arm_warnings and its call site: 15 mutants against the compare, uptake and host tests; the dropped uptake check, dropped models filter, swapped arms, models=None at the call site and the other behavioural mutants were all killed.

Checked, no issues

  • Equivalence: the body of _arm_warnings matches the removed inline block character for character; the call sits at the old spot, so the warning order is unchanged and mismatch_warnings still comes last.
  • Baseline: the removed growth_baseline.json entry is the only one that had to go, and the file stays valid JSON.
  • References: nothing else names _provenance_warnings or _arm_warnings, so no docs need updating.

@antonwolfy
antonwolfy merged commit b7a8bdf into intel:main Oct 26, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog No user-visible change: bypasses the changelog fragment check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants