From a5fb43463a8f8e8cab4420bdafe77f37e2e08489 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 6 Sep 2026 14:36:02 +0000 Subject: [PATCH] chore(devx): migrate the 7 freed scripts/** line citations to file-level anchors Second round of the scripts/** unresolvable-citation migration PR #16301 started. Two of the six held files freed since that PR landed -- check-docs-section-name.mjs and docs-audit/affected-docs.mjs (PR #16300), check-type-check-coverage.mjs (PR #16295) -- so their 7 citations migrate now by the same method: the file named as a file-level anchor, the number kept beside it as data, no digit repaired or repointed. - check-docs-section-name.mjs: concept.mdx:426, doc-pages.mdx:257 and forms.mdx:183 each resolve to exactly one tracked file under content/docs/** (forms.mdx is ambiguous by basename alone -- two files share it -- but only content/docs/ui/forms.mdx has a line 183 carrying the cited "sections": [/* ... */] shape). - check-type-check-coverage.mjs: engine.test.ts:2547/2577 resolves to packages/services/service-automation/src/engine.test.ts, named by the surrounding prose ("service-automation's note"). - docs-audit/affected-docs.mjs: three rest-server.ts citations resolve to packages/rest/src/rest-server.ts, the only tracked file of that name. The corpus residual (scripts/check-scripts-symbol-anchors.mjs --list-unresolvable) drops from 15 to 8, all 8 still held by open PRs (#16215, #16202) -- none an ambiguity. judgeUntrackedLineAnchors stays false per the #15809 fence (flips only at residual zero). Header prose updated to record both dated readings. Part of #15809. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01Vbw3RPgdtqesx4azk9SbW8 --- scripts/check-docs-section-name.mjs | 15 +++++++++------ scripts/check-scripts-symbol-anchors.mjs | 12 +++++++++--- scripts/check-type-check-coverage.mjs | 6 ++++-- scripts/docs-audit/affected-docs.mjs | 10 ++++++---- 4 files changed, 28 insertions(+), 15 deletions(-) diff --git a/scripts/check-docs-section-name.mjs b/scripts/check-docs-section-name.mjs index 8be6a96acd..98f35ca636 100644 --- a/scripts/check-docs-section-name.mjs +++ b/scripts/check-docs-section-name.mjs @@ -1470,9 +1470,10 @@ export function selfTest() { t('a NAMED YAML mapping satisfies the rule', run(yamlNamed, quiet), EXIT_CLEAN); // ── ⭐ #13880 selector ③: a singular `section:` mapping, nameless ─────── - // The exact shape `concept.mdx:426` carried live: `section:` (not - // `sections:`) whose value is a mapping, nested under an unrelated outer - // key -- the `- section:` sequence-item cardinality. + // The exact shape `content/docs/protocol/objectui/concept.mdx` carried + // live (line 426 as measured): `section:` (not `sections:`) whose value + // is a mapping, nested under an unrelated outer key -- the `- section:` + // sequence-item cardinality. battery('⭐ #13880 selector ③: a singular `section:` mapping, nameless'); const yamlSingularNameless = tree( baseFixtureFiles({ @@ -1508,8 +1509,9 @@ export function selfTest() { // ── negative controls: the widened `sections?:` prefilter must not ────── // fabricate a population out of `_section:`, `.section` member access, or - // a scalar `section:` value (no mapping to judge -- the doc-pages.mdx:257 - // control this card's own triage named: "...from the previous section:" + // a scalar `section:` value (no mapping to judge -- the control at + // `content/docs/ui/doc-pages.mdx` (line 257 as measured) this card's own + // triage named: "...from the previous section:" // is prose outside any fence and never reaches this regex at all). battery('negative controls: the widened `sections?:` prefilter must not'); const yamlSingularNegatives = tree( @@ -1564,7 +1566,8 @@ export function selfTest() { t('a `jsonc` fence with comments and a trailing comma is judged, not refused', run(jsonWithComments, quiet), EXIT_CLEAN); // ── an ELIDED placeholder array: judged as ZERO entries, not skipped ──── - // (`forms.mdx:183`'s real shape: `"sections": [/* … */]`) + // (`content/docs/ui/forms.mdx`'s real shape, line 183 as measured: + // `"sections": [/* … */]`) battery('an ELIDED placeholder array: judged as ZERO entries, not skipped'); const jsonElided = tree( baseFixtureFiles({ diff --git a/scripts/check-scripts-symbol-anchors.mjs b/scripts/check-scripts-symbol-anchors.mjs index 19c4914e44..5d7ad8db76 100644 --- a/scripts/check-scripts-symbol-anchors.mjs +++ b/scripts/check-scripts-symbol-anchors.mjs @@ -72,11 +72,17 @@ * repointed; every number that was in an anchor is still on its page, as data. * * The residual when that landed was 15, and every one of them was a file - * another lane held OPEN at that moment -- ⛔ not one was an ambiguity. That - * count is a DATED reading; `--list-unresolvable` is the live one. ⚠️ It is why the + * another lane held OPEN at that moment -- ⛔ not one was an ambiguity. A + * second round (#15809, still) migrated the 7 of those 15 whose holders had + * by then merged -- `check-docs-section-name.mjs` and + * `docs-audit/affected-docs.mjs` (3 each) and `check-type-check-coverage.mjs` + * (1) -- leaving 8, again every one held OPEN and none an ambiguity: 4 in + * `check-system-context-census.mjs` and 3 in `cross-package-test-inputs.mjs` + * (PR #16215), 1 in `pm/check-half-states.mjs` (PR #16202). Both counts are + * DATED readings; `--list-unresolvable` is the live one. ⚠️ It is why the * flag is still `false`: the fence #15809 was dispatched under is that it flips * only when the residual is ZERO and a self-test pins the flip, and a residual - * of 15 would make this gate permanently red for the length of somebody else's + * of 8 would make this gate permanently red for the length of somebody else's * pull request. `--list-unresolvable` prints the residual so the next author * inherits a worklist rather than a count; the day it prints nothing, the flag * is a one-line change with a case to pin it. diff --git a/scripts/check-type-check-coverage.mjs b/scripts/check-type-check-coverage.mjs index 2883da31d9..b6b422cb43 100644 --- a/scripts/check-type-check-coverage.mjs +++ b/scripts/check-type-check-coverage.mjs @@ -350,8 +350,10 @@ // about what that costs in practice. // // What drifts is not only the NUMBER but the note's COMPOSITION: -// service-automation's note named `engine.test.ts:2547/2577` as -// the whole debt while three TS2341 in a different file, from an +// service-automation's note named its +// `packages/services/service-automation/src/engine.test.ts` +// (lines 2547/2577 as measured) as the whole debt while three +// TS2341 in a different file, from an // unrelated PR, had joined it. So when this invariant makes you // raise a count, rewrite the note to match what the pile is now // made of -- and when the delta cannot be attributed, say so in diff --git a/scripts/docs-audit/affected-docs.mjs b/scripts/docs-audit/affected-docs.mjs index b54025f9b3..dedfeae315 100644 --- a/scripts/docs-audit/affected-docs.mjs +++ b/scripts/docs-audit/affected-docs.mjs @@ -4696,10 +4696,11 @@ function selfTest() { // an English comment inside a handler window bridged just the same. // // MEASURED FAILURE (40d5b2d4c, #9405 — a `metadata-protocol` batch-publish change): BOTH - // route anchors that run produced were prose and nothing else. + // route anchors that run produced were prose and nothing else, both in + // `packages/rest/src/rest-server.ts` (lines as measured then, kept as data): // - // promoteDraftForPublish → /:type/:name/publish rest-server.ts:5324,5376 (comments) - // publishPackageDrafts → /:name/state/:field rest-server.ts:5694,5722 (comments) + // promoteDraftForPublish → /:type/:name/publish lines 5324,5376 (comments) + // publishPackageDrafts → /:name/state/:field lines 5694,5722 (comments) // // The second one carried `content/docs/protocol/objectql/state-machine.mdx` onto the // advisory (and `meta.getLegalNextStates` through the ledger) for a diff that went @@ -4773,7 +4774,8 @@ function selfTest() { // The third layer of the same family, and the only one with no measured wrong row on the // tree that filed it — read that as the point of the block, not as a reason to skip it. // - // MECHANISM (verified on e7daea169). `rest-server.ts:5661` registers + // MECHANISM (verified on e7daea169). `packages/rest/src/rest-server.ts` + // (line 5661 as measured then) registers // `/:name/state/:field`; the next LITERAL `path:` is 255 lines later at 5916, so the // window runs its full 150 lines to 5810 — straight over `path: publishedPath` at 5747, // which registers a different route the scan cannot see. 64 lines of the `published`