Uh oh!
There was an error while loading. Please reload this page.
Declare the non-recursive scripts population check:ratchet-remedy-authority really sweeps - #14231
Merged
Merged
Conversation
…-remedy-authority really sweeps Fixes#13813 The gate builds its corpus at runtime from readdirSync(SCRIPTS_DIR), so the string naming that population lived only in messages and one comment, never as a literal the hint extractor can read. The derivation therefore made no claim and the family landed in the residue's undetermined bucket -- outside the matched list a dispatch brief prints, which cost one PR a CI round. Declares one hint per admitted extension beside the constants the walk is a function of, pinned in the gate's own --self-test in both directions, and re-decides the bare-root worklist row the declaration falsifies. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WLJQhde67SeTccsmnBVarV
baozhoutao
marked this pull request as ready for review
September 1, 2026 15:38
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#13813
check:ratchet-remedy-authoritybuilds its corpus at runtime fromreaddirSync(SCRIPTS_DIR), so the string naming that population appeared only inthe failure text, the
--listbanner and one header comment — never as a literalextractWatchHintscan read. The derivation therefore read no population, madeno claim, and the family landed in the residue's
undeterminedbucket: outsidethe
matchedlist a dispatch brief prints. That cost a real CI round on a PRwhose whole derived family was green locally.
What lands
scripts/check-ratchet-remedy-authority.mjs— theROOT_DIR_WATCH_HINTSdeclaration beside the constants the walk is a function of, plus a
--self-testpin in both directions.
⛔ Not
scripts/**.corpusFiles()is a NON-RECURSIVEreaddirSyncadmittedby extension: it reads the top level of
scripts/only, neverscripts/pm/orscripts/docs-audit/. The subtree spelling would be the easy one and it would beFALSE — it pastes this gate onto every card touching any nested script, for files
it never opens, which is the costlier error
hintCovers' own docblock pricesabove a missing declaration. A self-test case refuses the subtree form outright.
scripts/*.{mjs,mts}either, however natural it looks beside theheader and the messages, which both spell the corpus that way for a human reader.
hintCovershas no brace expansion, so that single string reaches NOTHING — adead declaration, printed as the same silence as declaring nothing at all.
Measured, not assumed:
A self-test case pins the brace form as undeclared so the tidier-looking spelling
cannot quietly land.
scripts/pm/bare-root-worklist.mjs— the recorded row this declarationfalsifies, re-decided. See below; this is named here rather than left as a
silent rider.
The acceptance proof — the derivation's own predicates
Same probe the card specifies, on this branch, before and after.
BEFORE (
66ecc50a, the branch point):No annotation beneath it — unlike its two neighbours, which carry an explicit
declared no path populationmarker with a reason.AFTER (
9ade670c), the same family, now inside theLocal gates for this cardblock:
undetermined → matched, and the card's whole runnable answer grew by exactly one.
The bare-root worklist row, re-decided (the other half, not a rider)
scripts/pm/bare-root-worklist.mjsrecorded this population as:That reason was TRUE when written and is FALSE of this tree. It rested on the
deletion-collapse in its within-segment variant:
collapseHint('scripts/*.mjs')still returns
scripts/.mjs, a string no tree can hold. #13448 retired thatcollapse for exactly this shape —
judgedAsPatternroutes it totriggerCoversnow — which
dispatch-gates.mjsitself calls "the same defect as the non-finalcase one level finer". So this is the identical retired mechanism the seventeen
rows of 2026-08-26 and the eighteenth of 2026-08-29 were re-decided under, and
the row is re-decided under that same authorisation sentence and no wider one:
bringing a verdict back to truth after its definitional basis moved is not
loosening the map.
(
coveredasks whether a hint reaches an arbitrary file at the top of the root;these hints reach none), so no assertion fires either way — the self-test is
green before and after. That is precisely the prose-rot the file warns only
re-measuring can catch, and shipping the declaration alone would leave one row
asserting that this population cannot be spelled directly beside the gate that
now spells it.
DECLARED-NARROWERis the verdict defined for the state this creates: "thegate took the escape, at a strictly narrower subtree than the bare word. The row
stays in the sweep because the bare root is still not covered." Both terms
re-measured together on this tree, never refreshed apart — 183 files admitted by
corpusFiles(), against 310 tracked under the bare root (59%) — and the pair ofhints is SET-EQUAL to that walk in both directions, 183 of 183, so 100% precise
and complete.
⛔ No
spellingis recorded, deliberately:SPELLINGSholds one hint per entryand this population needs one per extension. That is the
check:logger-receiver-detach/check:dual-build-cjs-loadsshape, whose rowscarry no
spellingfor the same reason, and the liveness-and-precision couplingtherefore lives in the gate's own
--self-test.⛔ Out of scope and untouched, per triage: the other 39 undetermined
families, and the whole-surface-ratchet sub-class recorded in this card's
comments 2–4 (
check:query-options-erasure,check:type-check-debt, the censusre-rot). Neither is this shape and neither is reached by this remedy.
Verification — all on
9ade670c, the final commitThe derived family (
node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands,15 families, derived from the real diff, not from the dispatch brief's list):
pnpm check:ratchet-remedy-authority(self-test + real corpus)pnpm check:watch-hint-literalpnpm check:declared-population-livenode scripts/pm/bare-root-worklist.mjs --self-testpnpm check:pm-dispatch-gatespnpm check:agent-test-spellingpnpm check:bash32-floorpnpm check:cli-command-idspnpm check:cross-package-test-inputspnpm check:entry-guardpnpm check:parse-guardpnpm check:pnpm-filter-targetsnode scripts/check-ci-filter-parity.mjsnode scripts/check-cross-package-test-inputs.mjsnode scripts/check-shard-attestation.mjsnode scripts/check-nul-bytes.mjsEach verdict quoted from the gate's own line, exit code captured before any pipe:
node scripts/check-test-completeness.mjsexits 3 = NOT MEASURED, by its owntext: the family derivation names it with no argument, there is no local test log
to hand it, and it says in as many words that this is "not a red, and there is
nothing here to fix."
No
*.test.tsin the tree names either edited script (git grepover testglobs: 0 hits) — these two gates are tested by their own
--self-test, both runabove.
Scope:
scripts/**only, publishes nothing from any package ⇒skip-changeset,matching every sibling gate PR (#14221, #14207, #14188 all carry no changeset).
Generated by Claude Code
Generated by Claude Code