You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(scripts): make the three refusal-shape gates state their registry's nature in author-facing text (#8576) (#8583)
All three refuse the ratchet-weakening remedy outright — the stronger shape
under the #8435 convention — but each stated WHY only in a comment. An author
who trips the gate was told "no" without being told "because this only ever
shrinks". Mirrors one clause of each gate's own comment into its existing
refusal string; no new message, no verdict changed, no ratchet touched.
Two of the three consequently flip in the #8540 detector (PR #8575) from
`excluded` to `refused`, which is the intended effect: the refusal limb's
sample grows from one gate to three. The detector's hand-classified control
corpus is re-read and updated to match, per its own C2/C3 audit cases.
check-driver-memory-census.mjs does NOT flip, and is left exactly as it is:
its refusal sentence carries no target inside the detector's 200-char offer
window, and its governance wording sits outside the GOVERN vocabulary. That
is a finding about the detector's grammar, not a defect in a correct gate.
Claude-Session: https://claude.ai/code/session_01Jqe56GnYFddggeAyfkZFVz
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: scripts/check-ratchet-remedy-authority.mjs
+24-14Lines changed: 24 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -606,16 +606,24 @@ const CONTROL = {
606
606
expect: 'refused',
607
607
why: 'Refuses by binding a negation to the verb, over a shrink-only registry.',
608
608
},
609
-
// Refuses by predication (the widening act named as subject and denied), and
610
-
// the refusal predicate does fire on that exact sentence — self-test (12) pins
611
-
// it. It still lands in `excluded` because stage 2 declines it FIRST: the
612
-
// sentence names its target as a bare noun and carries no shrink testimony in
613
-
// that message, so the target is never established as a ratchet. Recorded as
614
-
// `excluded` rather than `refused` because that is what is measured, not what
615
-
// the shape deserves — a control that flattered the detector would be worthless.
609
+
// The two gates below refuse by PREDICATION (the act named as subject and
610
+
// denied) — self-test (12) pins that predicate on their exact sentence.
611
+
//
612
+
// Until #8576 both were recorded here as `excluded`, and that was the honest
613
+
// reading: stage 2 declined them FIRST, because each named its target in a
614
+
// message carrying no testimony about the registry's nature — the testimony
615
+
// sat in a comment, where no author and no detector reads it. #8576 mirrored
616
+
// one clause of each gate's own shrink-only comment into that same message, so
617
+
// the target is now established as a ratchet and the refusal limb is reached.
618
+
// Growing the refusal limb's sample from one gate to three was the point: a
619
+
// regression in that limb used to be measured against a sample of one.
616
620
'check-test-source-alias.mjs': {
617
-
expect: 'excluded',
618
-
why: 'A refusal-shaped gate that stage 2 declines before refusal is consulted. Not a violation by either route.',
621
+
expect: 'refused',
622
+
why: 'Refuses by predication. Its registry states its own nature in the same message since #8576, so stage 2 reaches it and the refusal limb is consulted.',
623
+
},
624
+
'check-type-source-resolution.mjs': {
625
+
expect: 'refused',
626
+
why: 'The other refusal precedent, refusing by the same predication shape. Its registry states its own nature in the same message since #8576, so stage 2 reaches it rather than declining on a path target.',
619
627
},
620
628
621
629
// ── Declaration registries and near-misses: recording the fact IS the fix ──
@@ -643,13 +651,15 @@ const CONTROL = {
643
651
expect: 'excluded',
644
652
why: 'Carries shrink-only registries, but its author-facing remedy names a declaration registry instead. Reached only when two unrelated diagnostics are allowed to merge, which is why messages are bounded.',
645
653
},
654
+
// The third gate #8576 made reader-visible, and the one that did NOT move. Its
655
+
// testimony is governance, not shrink, and it now states that governance in
656
+
// author-facing text — yet the verdict is unchanged, for two reasons that are
657
+
// each about THIS DETECTOR rather than about the gate. Recorded rather than
658
+
// engineered around: the gate's wording is correct, and bending it to satisfy a
659
+
// grammar would be the control flattering the detector.
646
660
'check-driver-memory-census.mjs': {
647
661
expect: 'excluded',
648
-
why: 'Named in the #8540 ruling as a refusal precedent, and it does refuse. It lands here rather than in refused because its ledger carries no shrink or governance testimony, so stage 2 declines it first. Not a violation either way; recorded so the distinction stays measured rather than assumed.',
649
-
},
650
-
'check-type-source-resolution.mjs': {
651
-
expect: 'excluded',
652
-
why: 'The other refusal precedent. Its remedy points at a package tsconfig, which is not a ratchet, so stage 2 declines it. Reached only when a path target is allowed file-wide scope, which is why it is not.',
662
+
why: 'Named in the #8540 ruling as a refusal precedent, and it does refuse. Since #8576 it states its ledger governance in author-facing text too, yet it still lands here for two independent reasons: stage 1 finds no target inside the offer window of its refusal sentence, and its wording — a maintainer ruling — sits outside the governance vocabulary. Not a violation by any route; recorded so the distinction stays measured rather than assumed.',
0 commit comments