Advance the quality-kit pin so complexipy and the import contract actually run - #258
Conversation
…ually run The caller stub pinned a kit commit 55 revisions behind the kit's main. Three gauges the kit ships had therefore never executed against this repository at all: complexipy (cognitive complexity through the snapshot ratchet), cf-import-contract (the committed layering contract), and cf-no-bon-ref (the ticket-reference sweep). The pin moves to the kit's current main, which carries all three plus the single aggregating cf-gate runner. Advancing it turns the gate red, which is the gate working. Every red is baselined honestly and shrink-only; no threshold is relaxed and no check is removed: - complexipy: one pre-existing offender recorded at its measured cognitive complexity of 17, WizardHandler::handle. Nothing removed, no watermark raised. - mypy: four missing-import findings re-spelled by the kit's normalizer, which collapses the three shapes a missing third-party import can take onto one canonical line so the baseline encodes code rather than the machine. Same four sites, zero findings absorbed. One relocating global note dropped. - cf-no-bon-ref: 349 references across 118 files registered per file with a written reason and a frozen count, never a glob. docs/release-gates.md already scopes the cleanup as a rename sweep across the suite; mounting the gate is what stops the next reference, and the sweep shrinks these. docs/quality-baselines.md records every entry, its reason, its shrink path, and the deliberately broken input each gauge was fed to prove it can still fail. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The invocation receipt, from real CI runs — before and afterAcceptance for this change is not "green". It is whether the gauges actually ran. Counted, not read off a conclusion. BEFORE — the last
|
CONTRACT
.github/workflows/quality.ymlpins the shared quality kit to a full commit SHA. That pin was 55 commits behind the kit'smain, so three gauges the kit ships had never once executed against this repository:complexipy— cognitive complexity through the snapshot ratchetcf-import-contract— the layering contract committed inpyproject.tomlcf-no-bon-ref— the ticket-reference sweepA gate that has never run is not a gate. This advances the pin to the kit's current
main, which also carries the single aggregatingcf-gaterunner.WORLD — measured, not inferred
Ran the real
cf-gatefrom the repository root with the kit at the new pin, first againstmainunchanged:Invocation counts, which is the acceptance criterion and not the conclusion:
complexipyinvoked 1×,cf-import-contractinvoked 1×. Both genuinely ran.cf-import-contractpassed on its first-ever run against this tree;complexipyfailed.The three reds, in full:
complexipysrc/bonfire/handlers/wizard.pyWizardHandler::handle, cognitive complexity 17, threshold 15, absent from the snapshotmypyimport-not-found→import-untypedcf-no-bon-refreasonprose insideexemptions.jsonAfter baselining, the same command from the same root:
Every baseline entry, with its written reason
Recorded durably in the new
docs/quality-baselines.md, becausecomplexipy-snapshot.jsonandmypy-baseline.txtare machine-generated and have no field for prose. Summary:WizardHandler::handleat its measured 17. Snapshot went 20 entries/28 functions → 21/29: exactly one addition, nothing removed, no watermark raised. Shrink-only from here.cf_quality.mypy_normalizecollapses all three shapes a missing third-party import can take onto one canonicalimport-untypedline, so the baseline encodes the code rather than the machine that measured it; the previous baseline predates that normalizer. The dropped line is mypy's once-per-run global stubnote:, which relocates between files as imports shift and was a source of phantom deltas. The 49 pre-existing findings are untouched.frozen_count: 118. One explicit entry per file, each with its own reason. Never a glob —tests/unit/*would bless every test file written from now on, the unbounded escape hatch the kit's own docs warn against. Every blessing prints its path, line and reason on each run.Why the tracker references are registered rather than scrubbed:
docs/release-gates.mdalready scopes this exact debt and says why — the references live in test file names as well as in comments, so cleaning them is a rename sweep across the suite, not a comment sweep, and it is tracked separately. Mounting the gate is what stops the 119th reference. The sweep shrinks these 118.FAILURE — the control rods. Every newly-mounted gauge was watched going RED.
A passing run cannot tell you a gate works. Each was fed a deliberately broken input:
cf-no-bon-refsrc/bonfire/_rod_probe_ticket.py:14: TICKET_REF_IN_SOURCE: ticket reference … in source→cf-no-bon-ref: FAIL (1 ticket reference(s)), exit 1complexipy(new offender)Failed functions: - src/bonfire/_rod_probe_ticket.py: rod_hairy…exceeds 15 but was not part of the snapshot, exit 1complexipy(ratchet regression)WizardHandler::handle increased from 16 to 17, exit 1cf-import-contractbonfire.modelsimportingbonfire.engine, which the committed contract forbidsCONTRACT_BROKEN: … bonfire.models._rod_probe_import -> bonfire.engine.pipeline (l.11), exit 1mypyreturn "not an int"from a function declared-> intYour changes introduced new violations, exit 1All rod probes were removed and the ledgers regenerated; the final full-battery run above is the post-cleanup state.
The
complexipyred run also confirmed a property worth naming: a failing complexipy run does not rewrite the snapshot. Only a passing one does.Residue, stated rather than hidden
mainas it stands today. A separate change to the kit hardens the complexipy snapshot against being silently emptied by a passing run; once that lands, this pin must advance again to pick it up.maindirectly soquality-gateandtest (3.12)actually run on it. Please confirm the run started, and read its step list and invocation counts rather than its conclusion.import-untypedfindings resolve when theknowledgeextra is installed; they are ordinary typing debt, tracked as such.Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com