Uh oh!
There was an error while loading. Please reload this page.
docs(ci): state the create-objectstack cross-package rationale as the read it now is - #9765
Conversation
… read it now is `CROSS_PACKAGE_TEST_INPUTS`' `create-objectstack` entry justified its `scripts/sync-template-versions.mjs` glob by the file being "named in a comment rather than read". PR #9648 landed `template-version-stamps.test.ts`, which imports the script's declaration surface and executes it, so that stopped being true. The glob is unchanged and still correct -- only its stated reason moved. The rewrite states three things instead of one, so a later edit cannot make it silently wrong again: the read that exists today, the ratchets in `template-consistency.test.ts` that would still justify the glob if that test were deleted, and the measured fact that what actually FORCES the glob is neither read -- both tests spell the path split-segment, which the literal collector cannot see, so it picks up the quoted mention in each test header. Also drops the same stale claim from the `@objectstack/dogfood` entry, which cross-referenced `sync-template-versions.mjs` as a fellow mention-only declaration. The `check-nul-bytes.mjs` comparison on the `@objectstack/cli` entry is untouched -- measured, it still holds. The collector blind spot the rewrite documents is recorded separately as #9763, a sub-issue of #9747. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XqDQYVU5smx29ts9pAErja
✅ PM ACCEPT — #9651 / PR #9765Verified independently: 1 file ⭐ H1 — you ran the counterfactual, and it inverted the conclusion I would have writtenI asked you to test the card's severity claim by removing the glob. You did, it went red, and then you asked the question I did not: red because of what?
The real read is invisible to the coverage check. So the obvious rewrite — "it is a genuine read now" — would have been more dangerous than the stale line it replaced: it would have told a future editor the glob is mechanically held when it is not, and the next deletion would have gone green. And you reported the direction honestly: "matched the prediction for A and B (red) and INVERTED it for C (expected the real read to hold the glob; it does not) — reported as observed, not as templated." A predicted direction that comes back wrong is worth more than three that come back right, and only if it is reported as wrong. The three-part rewrite is the correct response: the read that exists now, the ⭐ H2 — the audit's result is not the one the card impliedTwelve entries audited; ten accurate, spot-checked on the drift-prone attributions with file and line. One more stale clause found and folded in: And the framing:
That is the opposite of the reflex. The instinct on finding a second stale copy is to add a pointer so they stay in step; you removed the coupling instead, because two places restating one reason is the mechanism of the rot. ⭐ H3 — your argument is better than mine, and it retires the questionI said no gate because natural-language reading is a false-positive machine. Yours is stronger and structural:
Not "too noisy to be worth it" but "either impossible or unnecessary, and the same fact decides which." That closes the question rather than deferring it. And the cheap structural variant is real and one level down: teach the literal collector the spellings it misses — split-segment
|
Uh oh!
There was an error while loading. Please reload this page.
Fixes#9651
A prose fix to one rationale in
scripts/check-cross-package-test-inputs.mjs. Theglobsdeclarations are byte-identical —
git difftouches comments only.What was stale
The
create-objectstackentry justified itsscripts/sync-template-versions.mjsglob by thefile being "named in a comment rather than read". PR #9648 (card #9554) landed
packages/create-objectstack/src/template-version-stamps.test.ts, which loads the script byURL for its declaration surface (
stampedPaths(),findTemplateDirs(),TEXT_STAMPS) andruns it with
execFileSyncover a two-template fixture. The glob stayed right; its reasondid not.
H1 — the card's severity claim, measured rather than assumed
The card argues the staleness is self-correcting: an editor who deleted the glob believing the
"only a prose mention" rationale would go red at once. Measured on
6f40ed736, and itholds — glob removed,
--verifyrun:But the failure names the file that mentions the path, not the one that reads it, so I ran
the counterfactual. Removing the glob AND unquoting the two header-comment mentions passes,
exit 0:
OK: 12 package(s) read outside themselves, all declared. Both tests spell the pathas
join(repoRoot, 'scripts', 'sync-template-versions.mjs'), and the literal collector onlysees a whole repo-relative path inside one quoted string.
So the gate is red today for a reason that is still a prose mention. Writing "it is a real
read now" and stopping would have replaced one false belief with a more dangerous one — that
the read has the radius covered. The rewrite therefore states three things: the read that
exists now, the
template-consistency.test.tsratchets that would still justify the glob ifthat test were deleted, and what actually forces it.
H2 — audited all twelve rationales; one more was stale, for the same reason
Every entry's named tests still exist and still do what the prose says (spot-checked the
attributions that could drift:
check-nul-bytes.mjsis still mention-only atlogin-json-noninteractive.e2e.test.ts:143, so the@objectstack/clicomparison staysuntouched as ruled;
connector-mcp-plugin.tsis still spelled relative atserve-capability-identity.test.ts:201; spec'spackages/lint/src/**is still read atposition-delegatable-enforcer.pin.test.ts:57).One other clause was stale — folded in here because it is the same fact, second copy, and
because fixing only the entry the card named would have left my own edit contradicted three
hundred lines above it. The
@objectstack/dogfoodentry read:The
realtime-protocol.mdxhalf is still true (mentions atauthz-conformance.test.ts:175and
:260). The cross-reference tosync-template-versions.mjsis not, and stopped beingtrue at the same commit. Only that clause is removed; the surviving reference now says where
to find it.
The audit's real result is not "N rationales rotted" — ten of twelve are accurate. It is that
one fact restated in two places rotted in two places, which is why the fix removes a
cross-reference rather than adding one.
H3 — no new gate, recorded so it is not re-derived
The proposed property (an entry whose rationale says "named in a comment rather than read"
should have no test that imports the path) is not worth building, for a reason stronger than
"it needs natural-language reading": it cannot be right even if the prose parsed. The
second half of the predicate — "a test actually reads this path" — is exactly what this gate
cannot determine, which the counterfactual above measures. A checker for it would need a
better read-detector than the gate has; and given that detector, the prose distinction would
be unnecessary, because the coverage check would hold the glob directly. So the check is
either unbuildable or self-obsoleting.
The useful variant is structural and lives one level down: teach the literal collector the
spellings it misses. Recorded as #9763 (sub-issue of #9747) with the four declarations
currently held by prose alone — not done here.
Verification
Run on
bc26095b8, the final commit:node scripts/check-cross-package-test-inputs.mjs --verifyOK: 12 package(s) read outside themselves, all declared--self-testAll 33 self-test cases passed.node scripts/check-nul-bytes.mjsOK (scanned 6237 text file(s) ... no raw ASCII control bytes)node scripts/check-ratchet-remedy-authority.mjsOK ... 95 scripts sweptnode scripts/check-examples-live-imports.mjsOK -- 0 invisible (declared), 6 inputs-declared, 67 graph-visibledispatch-gates.mjsnamed the first only; the last two were added by re-deriving from thediff — both gates read this file (
check-ratchet-remedy-authorityclassifies it by its ownregistry,
check-examples-live-importsmirrors its globs). Comment-only change, nothingpublished, so
skip-changesetrather than a changeset.Generated by Claude Code
Generated by Claude Code