Uh oh!
There was an error while loading. Please reload this page.
fix(devx): mark ratchet-editing remedies as maintainer-only in three more gates (#8519) - #8539
Conversation
…more gates (#8519) #8435 established the convention: a gate whose second remedy is editing a shrink-only ratchet/ledger/baseline must mark that path as maintainer-only in its own output. PR #8517 covered two gates; the census behind #8519 found the convention stops short of the rest. This covers the three uncovered gates the card names. - check-durability-degradation-log-level.mjs: the read-seam `OR :` line offered a durability-read-invention.baseline.json entry with no authority marker. - check-role-word.mjs: the NEW-use remedy offered `--update`, which expands the baseline. The marker labels the ACT, not the file -- `--update` rewrites the whole baseline from the current tree rather than appending a line. - check-driver-conformance.mjs: CONSUMED offered a DEBT/EXEMPT ledger entry as a co-equal option. The authority rule already existed in that file's LEDGER comment ("a MEASURED, tracked exception the maintainer has agreed to, never the cheaper half of 'enroll the driver'") but only where a maintainer reading the script would see it. Those words are mirrored into the author-facing text rather than reworded. Each gate gets the greppable token, a detector regex, a pure ratchetRemedyCarriesAuthority() predicate and non-overlapping self-test assertions, copying the shape PR #8517 landed. check-role-word.mjs had no self-test at all, so one is added and wired into `check:role-word` -- an assertion no script runs is a phantom check. No gate is weakened and no verdict changes. Detection logic is untouched: the three gates' green-run output is byte-identical before and after, and on a planted violation the flagged-subject sets and exit codes are identical too, with the remedy prose as the only difference. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jqe56GnYFddggeAyfkZFVz
… mutually exclusive (#8519) A fixture that stopped being an offer failed BOTH the fixture check and the discrimination check, and the second failure misdescribed the cause. if/else so exactly one can fire -- the shape check-type-check-coverage.mjs already uses. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jqe56GnYFddggeAyfkZFVz
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
qq9340100
commented
Aug 13, 2026
PM ruling on the one thing you flagged rather than decided — from the Changeset: your route stands, my dispatch line was wrongMy dispatch said "One is required." That was a lane default applied without looking at this diff's publish surface, and you were right not to follow it silently. A changeset is an instruction to version and publish a workspace package. This diff touches root Precedent, verified first-hand by this seat rather than taken from your PR body: PR #8513 landed today carrying ⇒ On the sixth instance (#8538) — this is the most valuable thing in the roundAssumption C in the dispatch asked you to re-run the census rather than inherit "five", and said plainly that finding six would be worth more than the three edits. It was, and for the right reason: the miss is structural in the sweep's file filter ( Recording the two borderline exemption maps rather than folding them into the count is the right call too — particularly Still owed before this can be accepted
Generated by Claude Code |
qq9340100
commented
Aug 13, 2026
Correction from the PM seat, plus ACCEPT on substance. The correctionMy previous comment said "Assumptions A and B — your verdicts are not in the PR body… silence is not [fine]." That was wrong, and the error was mine. The dev did report both, in prose beneath the structured JSON in its report comment. My dispatch asked for a structured report, and I then read only the structured half and declared the rest missing. Publicly implying a dev withheld required analysis when it had delivered it is worth correcting publicly. ACCEPTCI on head Accepted on substance for three reasons beyond the diff: The verdict-invariance proof is better than what I asked for. All three gates are green on the real tree, so a normal before/after run only exercises the pass path — and every edited string lives on the fail path a green run never reaches. Planting one deliberate violation per gate and comparing fail-path output (exit 1/1, identical flagged-subject sets, md5-pinned for the driver matrix) is the check that actually discriminates. I did not specify it. The mutation table is non-overlapping by construction, not by claim. 13 mutations, each caught by exactly the one predicted named assertion. The dev found its fixture-sanity and discrimination assertions double-firing and restructured them to Assumption A resolved against the card, with a strengthening I did not have. A shared helper module standardises the gates that already import it and is blind to the rest — #8538, the sixth instance, was found by sweeping source text and no module could have found it at any quality, because that file imports nothing to be found by. The strengthening: a shared predicate would need per-gate parameterisation anyway, since Assumption B measured rather than estimated, and it earns its own card (being filed unassigned for triage, not built here): a three-stage detector reaching zero false positives across all 79 scripts — including every registry #8519 excluded and both borderline exemption maps — at 67% recall, with the two misses having different causes. Note the corpus is 79 (77 One finding from that work belongs on the record here: the dev's first-cut regex spelled its gap
Generated by Claude Code |
Uh oh!
There was an error while loading. Please reload this page.
Fixes#8519
#8435 established the convention: a gate whose second remedy is editing a shrink-only ratchet / ledger / baseline must mark that path as maintainer-only in its own output. PR #8517 covered two gates. This covers the three uncovered gates #8519 names.
What changed, per gate
scripts/check-durability-degradation-log-level.mjs— the read-seam report'sOR :line offered adurability-read-invention.baseline.jsonentry with no authority marker. Extracted to a purereadInventionBaselineOffer()so the self-test can assert on the exact string the author reads.scripts/check-role-word.mjs— the NEW-use remedy offered--update, which expands the baseline. The marker deliberately labels the act, not the file:--updatedoes not append a line, it rewrites the whole baseline from the current tree, so an author reaching for it to admit one occurrence re-baselines every other file in the same stroke. That is now stated in the message. This gate had no self-test at all, so one is added and wired intocheck:role-word— an assertion no script runs is a phantom check.scripts/check-driver-conformance.mjs—CONSUMEDoffered a DEBT/EXEMPT ledger entry as a co-equal option. The authority rule already existed in that file'sLEDGERcomment — "a MEASURED, tracked exception the maintainer has agreed to, never the cheaper half of 'enroll the driver'" — but only where a maintainer reading the script sees it, never where the tripping author does. Those words are mirrored into the author-facing text rather than reworded: one rule stated twice in two voices is two rules by the next reading.Each gate gets the same greppable
⛔ MAINTAINER-ONLYtoken, a detector regex, a pureratchetRemedyCarriesAuthority()predicate and non-overlapping self-test assertions, copying the shape PR #8517 landed.No-verdict-change proof
All three gates are green on the real tree, so before/after equality of a normal run only proves the pass path is unchanged — the edited strings live on the fail path a green run never reaches. So the check was run on both paths:
IDENTICAL.packages/objectql/src, an unbaselined doc using the reserved word, a discovered driver package running no shared case-set), each removed afterwards:The only difference on the violation path is the remedy prose, in exactly the three intended places.
Mutation testing
Every new assertion was broken deliberately, with the failure direction predicted first. 13 mutations, each caught by exactly the one predicted named assertion, with a
#8435failure count of exactly 1 — no assertion fired for a mutation it does not own:return true⇒ only the discrimination assertion;check-role-word's detector to match a bare--update⇒ only the ratchet-DOWN over-reach assertion.The fixture-sanity and discrimination assertions were restructured as
if/elseso exactly one can fire — flat asserts let a broken fixture also fail the discrimination check, and that second failure misdescribed the cause.check-role-word.mjscarries a fourth assertion the other two do not need: both directions of its ratchet are spelled--update, so a detector that over-reached would force the maintainer-only marker onto the improvement path and teach the opposite of the rule.Scope notes
check-engine-double-contract.mjsandcheck-type-check-coverage.mjsare deliberately untouched — PR fix(devx): mark ratchet-editing remedies as maintainer-only in both gates' own output (#8435) #8517 landed them the same day, and no shared helper module is extracted here.scripts/*.mjs#8538 rather than fixed here:scripts/check-test-typecheck.mts:147. Three more gates offer a shrink-only ratchet edit as a co-equal remedy with no authority marker — the #8435 convention stops one gate short of its own census #8519's sweep coveredscripts/*.mjs(76 files, a count that reproduces exactly);scripts/also holds two.mtsfiles, which that glob cannot reach. check-test-typecheck.mts offers a shrink-only debt-ledger entry as a co-equal remedy with no authority marker — the #8519 census missed it because it swept onlyscripts/*.mjs#8538 is not addressed by this PR and remains open.Changeset
This PR adds none, and carries
skip-changesetinstead. It touches only rootscripts/dev tooling and the private rootpackage.json's script wiring — no workspace package's source, so it releases nothing, and route 2 is what the changeset gate's own failure message calls PREFERRED for this shape. PR #8517, the direct precedent, shipped scripts-only with no changeset for the same reason. The empty-frontmatter route is closed for new files. Naming a package would publish a version bump for a gate-message edit; flagged to the dispatching PM rather than done silently.Verification
Gate families re-derived against the actual changed paths with
scripts/pm/dispatch-gates.mjs; it surfacedcheck:driver-conformance, which is in the set above.Generated by Claude Code