Repository navigation
fix(actions): name a fragile file's lead to simplify only when it is worth breaking up - #4361
RaghavChamadiya wants to merge 2 commits into
Conversation
…worth breaking up
|
🔍 2 things to check
✅ Health of changed files: 6.7 (unchanged)
CoveragePatch coverage 100.0% (32 of 32 changed executable lines covered)
Report from this run for 🧾 Evidence: 1 to look at, 6 not known
AI review is paused: this repository reached its monthly spending limit. Bot settings 📊 See the full report for this PR Settings and updatesUpdated 2026-10-21 18:57 UTC, since the last push: 1 new finding, 1 finding gone |
What
A Do next fragile-file row could read "Simplify
X: it is tested, and fixes keep landing" while its lead finding was a coverage marker (coverage_gradient, "7% of lines uncovered") or a weak target such as a constructor at CCN 9 or 10. The title, its claim and its evidence disagreed.How
details_jsonandline_end, so the shared break-up rule that already ranks the file's lead (health.models, the rule Fix first uses for "Break up") can measure the function. Without them it could never apply.lead_and_worthreturns that lead and whether its function is worth breaking up first;primary_findingwraps it, so every surface keeps the same lead.fn" only when the lead is worth breaking up. Otherwise it says "Review why fixes keep landing inX: it is tested" (or "tests reach it") and shows no finding. Raise-coverage and add-tests rows are unchanged. The folder row's first step follows.docs/layers/CODE_HEALTH.mdDo next.Verification
Bar, set before measuring: list every fragile row before and after on a copy of this repository's index and on one held-out corpus (umami, freshly indexed). Every changed row, before and after text, is judged blind with opaque ids, shuffled, as true or false on whether its title, claims and lead agree with its facts. To pass, no after row may be judged false, and no file whose before row was judged true may lose its row.
The before rows judged false were all Simplify rows. Their leads were coverage or error-handling markers, constructors at CCN 9 to 10, 4-level nesting, or a single long condition. Other corpora on hand had too little recent history to produce fragile rows.
Tests:
tests/unit/analysis/test_actions_rules.py,tests/unit/persistence/test_actions_loader.pyand the related health, snapshot and parity suites pass. Ruff is clean on the touched files.