Skip to content

Commit a5fb434

Browse files
committed
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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vbw3RPgdtqesx4azk9SbW8
1 parent 3e270d4 commit a5fb434

4 files changed

Lines changed: 28 additions & 15 deletions

File tree

scripts/check-docs-section-name.mjs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1470,9 +1470,10 @@ export function selfTest() {
14701470
t('a NAMED YAML mapping satisfies the rule', run(yamlNamed, quiet), EXIT_CLEAN);
14711471

14721472
// ── ⭐ #13880 selector ③: a singular `section:` mapping, nameless ───────
1473-
// The exact shape `concept.mdx:426` carried live: `section:` (not
1474-
// `sections:`) whose value is a mapping, nested under an unrelated outer
1475-
// key -- the `- section:` sequence-item cardinality.
1473+
// The exact shape `content/docs/protocol/objectui/concept.mdx` carried
1474+
// live (line 426 as measured): `section:` (not `sections:`) whose value
1475+
// is a mapping, nested under an unrelated outer key -- the `- section:`
1476+
// sequence-item cardinality.
14761477
battery('⭐ #13880 selector ③: a singular `section:` mapping, nameless');
14771478
const yamlSingularNameless = tree(
14781479
baseFixtureFiles({
@@ -1508,8 +1509,9 @@ export function selfTest() {
15081509

15091510
// ── negative controls: the widened `sections?:` prefilter must not ──────
15101511
// fabricate a population out of `_section:`, `.section` member access, or
1511-
// a scalar `section:` value (no mapping to judge -- the doc-pages.mdx:257
1512-
// control this card's own triage named: "...from the previous section:"
1512+
// a scalar `section:` value (no mapping to judge -- the control at
1513+
// `content/docs/ui/doc-pages.mdx` (line 257 as measured) this card's own
1514+
// triage named: "...from the previous section:"
15131515
// is prose outside any fence and never reaches this regex at all).
15141516
battery('negative controls: the widened `sections?:` prefilter must not');
15151517
const yamlSingularNegatives = tree(
@@ -1564,7 +1566,8 @@ export function selfTest() {
15641566
t('a `jsonc` fence with comments and a trailing comma is judged, not refused', run(jsonWithComments, quiet), EXIT_CLEAN);
15651567

15661568
// ── an ELIDED placeholder array: judged as ZERO entries, not skipped ────
1567-
// (`forms.mdx:183`'s real shape: `"sections": [/* … */]`)
1569+
// (`content/docs/ui/forms.mdx`'s real shape, line 183 as measured:
1570+
// `"sections": [/* … */]`)
15681571
battery('an ELIDED placeholder array: judged as ZERO entries, not skipped');
15691572
const jsonElided = tree(
15701573
baseFixtureFiles({

scripts/check-scripts-symbol-anchors.mjs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,17 @@
7272
* repointed; every number that was in an anchor is still on its page, as data.
7373
*
7474
* The residual when that landed was 15, and every one of them was a file
75-
* another lane held OPEN at that moment -- ⛔ not one was an ambiguity. That
76-
* count is a DATED reading; `--list-unresolvable` is the live one. ⚠️ It is why the
75+
* another lane held OPEN at that moment -- ⛔ not one was an ambiguity. A
76+
* second round (#15809, still) migrated the 7 of those 15 whose holders had
77+
* by then merged -- `check-docs-section-name.mjs` and
78+
* `docs-audit/affected-docs.mjs` (3 each) and `check-type-check-coverage.mjs`
79+
* (1) -- leaving 8, again every one held OPEN and none an ambiguity: 4 in
80+
* `check-system-context-census.mjs` and 3 in `cross-package-test-inputs.mjs`
81+
* (PR #16215), 1 in `pm/check-half-states.mjs` (PR #16202). Both counts are
82+
* DATED readings; `--list-unresolvable` is the live one. ⚠️ It is why the
7783
* flag is still `false`: the fence #15809 was dispatched under is that it flips
7884
* only when the residual is ZERO and a self-test pins the flip, and a residual
79-
* of 15 would make this gate permanently red for the length of somebody else's
85+
* of 8 would make this gate permanently red for the length of somebody else's
8086
* pull request. `--list-unresolvable` prints the residual so the next author
8187
* inherits a worklist rather than a count; the day it prints nothing, the flag
8288
* is a one-line change with a case to pin it.

scripts/check-type-check-coverage.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,10 @@
350350
// about what that costs in practice.
351351
//
352352
// What drifts is not only the NUMBER but the note's COMPOSITION:
353-
// service-automation's note named `engine.test.ts:2547/2577` as
354-
// the whole debt while three TS2341 in a different file, from an
353+
// service-automation's note named its
354+
// `packages/services/service-automation/src/engine.test.ts`
355+
// (lines 2547/2577 as measured) as the whole debt while three
356+
// TS2341 in a different file, from an
355357
// unrelated PR, had joined it. So when this invariant makes you
356358
// raise a count, rewrite the note to match what the pile is now
357359
// made of -- and when the delta cannot be attributed, say so in

scripts/docs-audit/affected-docs.mjs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4696,10 +4696,11 @@ function selfTest() {
46964696
// an English comment inside a handler window bridged just the same.
46974697
//
46984698
// MEASURED FAILURE (40d5b2d4c, #9405 — a `metadata-protocol` batch-publish change): BOTH
4699-
// route anchors that run produced were prose and nothing else.
4699+
// route anchors that run produced were prose and nothing else, both in
4700+
// `packages/rest/src/rest-server.ts` (lines as measured then, kept as data):
47004701
//
4701-
// promoteDraftForPublish → /:type/:name/publish rest-server.ts:5324,5376 (comments)
4702-
// publishPackageDrafts → /:name/state/:field rest-server.ts:5694,5722 (comments)
4702+
// promoteDraftForPublish → /:type/:name/publish lines 5324,5376 (comments)
4703+
// publishPackageDrafts → /:name/state/:field lines 5694,5722 (comments)
47034704
//
47044705
// The second one carried `content/docs/protocol/objectql/state-machine.mdx` onto the
47054706
// advisory (and `meta.getLegalNextStates` through the ledger) for a diff that went
@@ -4773,7 +4774,8 @@ function selfTest() {
47734774
// The third layer of the same family, and the only one with no measured wrong row on the
47744775
// tree that filed it — read that as the point of the block, not as a reason to skip it.
47754776
//
4776-
// MECHANISM (verified on e7daea169). `rest-server.ts:5661` registers
4777+
// MECHANISM (verified on e7daea169). `packages/rest/src/rest-server.ts`
4778+
// (line 5661 as measured then) registers
47774779
// `/:name/state/:field`; the next LITERAL `path:` is 255 lines later at 5916, so the
47784780
// window runs its full 150 lines to 5810 — straight over `path: publishedPath` at 5747,
47794781
// which registers a different route the scan cannot see. 64 lines of the `published`

0 commit comments

Comments
 (0)