Repository navigation
Commit 5cf58eb
docs(spec): re-anchor the dead tracker citations in api/ to the commits that decided them (stage 2) (#20342)
Part of #20234
Clause-②: no
## What changed
This is stage 2 of the staged sweep. It covers
`packages/spec/src/api/**` and nothing else, and it leaves out
`packages/spec/src/api/rest-server.zod.ts`, which seat 2's #20295 claim
holds. Later stages cover the other areas, so this PR says `Part of`.
Every comment or docblock site in scope that cited a tracker number
answering 404 has been rewritten in ruling C+D's form C (comment
5749154545 on #19123). That is **107 sites on 105 lines in 22 files,
covering 30 numbers**. Each rewritten line now cites the commit in
`origin/main` history that decided what the line describes, and it says
in its own words what that commit decided. No ADR or ruling-record file
in `docs/adr/` or `scripts/adr-anchors/` names any of the 32 dead
numbers, so every anchor is a commit. Nothing was dropped: every number
in scope had a deciding commit. One more comment site is left on
purpose, because its number belongs to another repository (see
Acceptance notes).
Only comments changed. Every source file keeps its line count (112 lines
out, 112 in), so no line citation into these files moves. Seven of those
112 lines carry no number; they are the second half of a sentence that
had to be reflowed. No code token moves (see the guard below). The 34
string-literal sites that carry a dead number are tokens, so they are
left as they were and listed below.
**No citation number is added.** Every tracker number on an added line
was already on the line it replaces. No PR number stands beside a sha.
Two more kinds of file change, both mechanical:
- **Regenerated reference pages.** Five of the rewritten docblock lines
project into `content/docs/references/api/` (`dispatcher.mdx`,
`error-code-ledger.mdx`, `plugin-rest-api.mdx`). `check:docs` proved
those three pages stale, and `pnpm --filter @objectstack/spec
check:generated --fix` regenerated only them. The diff is five lines,
each the same substitution as its source line.
- **A `patch` changeset** for `@objectstack/spec` (see Changeset below).
## Census: `api/`, before and after
**Instrument.** This is stage 1's instrument. It sends REST `GET
/repos/objectstack-ai/objectstack/issues/N` without following redirects,
for every distinct in-repo number cited in `packages/spec/src/api`. The
population is:
- the citation gate's own `CITATION_RE`, kept when the qualifier is
none, `objectstack`, `objectstack-ai/objectstack`, `framework`, `pre-`
or `post-`;
- N of 100 or more;
- excluding the ordinal heads the gate declares, and `summon`.
Each site is classified by the TypeScript parser as a line comment, a
docblock or a string.
**Controls.** The lit controls were `#16862`, `#16847` and `#17698`. The
dead controls were `#16714`, `#16715` and `#16697`. They were probed at
the start, after every 100 numbers and at the end, which is 5
checkpoints per run. They read 15 of 15 lit (200) and 15 of 15 dead
(404) in both runs.
| reading | tree | numbers probed | 200 | 404 | 301 or other | dead
sites, all of `api/` | in scope | `rest-server.zod.ts` | in-scope lines
| in-scope files | dead numbers in scope |
|---|---|---|---|---|---|---|---|---|---|---|---|
| before | base `21ab41041`, probed 2026-09-27T22:56Z to 22:58Z | 351 |
319 | 32 | 0 | **153** | 142 | 11 | 140 | 23 | 31 |
| after | head `22a00c42d`, probed 2026-09-27T23:10Z to 23:12Z; `.ts`
sources identical at the final head | 334 | 319 | 15 | 0 | **46** | 35 |
11 | 35 | 9 | 14 |
**Before, in scope, by class.** 34 non-test docblock sites and 30
non-test line comments. 7 test docblock sites and 37 test line comments.
33 test string sites (describe and it titles). 1 non-test string.
**After, in scope.** 34 string sites and 1 comment site remain. The
comment site is `export-job-family-retirement.test.ts:25`, which names
an objectui PR (see Acceptance notes). The head probe found no number
newly dead since the base probe: 319 numbers answer 200 in both runs.
PR #20226's area table read `api` 153 at an earlier base, and this
census reads the same 153 at `21ab41041`. Of those, 11 sites sit in
`rest-server.zod.ts` (`#14369` twice and `#14691` nine times, all
comments). They wait for #20295 to land. `pre-#N` spellings do occur in
`api/`: the at-tier review measured 15 sites on 15 lines in 13 files at
the head, for example `discovery.zod.ts:913` `pre-#4828`. All 15 numbers
answer 200, so the gate's blind spot for that spelling (#20330) hides no
dead site in this stage. _(Corrected by the `domain:spec` seat 4 at
2026-09-28T00:48Z, from the at-tier review record 5861396181. The draft
said that no such spelling occurs.)_
## Per-number table
The counts are in-scope sites and files. `rewritten / left` gives
comment sites rewritten and string sites left. Every anchor was read in
its diff or message, not only in its subject: it is the commit that made
the change the line now describes, never a later refactor or a commit
that merely mentions the number.
| number | sites / files | rewritten / left | anchor: what it decided |
|---|---|---|---|
| `#6037` | 5/2 | 3/2 | `18189983d`: declares
`DataProtocol.validateData`, the validate-only operation, under #4633
ruling D |
| `#6239` | 4/2 | 3/1 | `f549a0d4a`: retires `ViewProtocol` and its ten
request/response schemas (ADR-0049, route 3) |
| `#6287` | 18/2 | 17/1 | `84c86fb45`: `preview` and `trial` fold to
`sandbox` by declaration, and the fold table is typed total over
`EnvironmentType` |
| `#6306` | 1/1 | 1/0 | `fec784863`: the direct-mount routes read the
one API base |
| `#6361` | 5/3 | 4/1 | `90bbf2510`: the notification-list `cursor` is
retired on both halves (maintainer ruling 2026-08-07, Option A) |
| `#6363` | 3/2 | 3/0 | `17d095413`: `unreadCount` counts the whole
inbox, not the window |
| `#6704` | 4/1 | 3/1 | `c3f491626`: `runAutomations` declares the
default the import route applies, with the agreement pin |
| `#8885` | 2/1 | 2/0 | `30b1c636a`: registers the nine REST wire codes
that sweep found |
| `#9740` | 3/1 | 2/1 | `11b779e0f`: declares `getMetaItemLayered`. The
two cross-references to its test block now name the block by member |
| `#9741` | 23/2 | 16/7 | `2a29caa53`: records the 2026-08-18 maintainer
ruling. `previewDrafts` and `state` are declared, and `environmentId`
stays transport-level |
| `#9934` | 4/4 | 4/0 | `79c46da90`: the producer-side `userMessage`
channel |
| `#10264` (objectui) | 1/1 | 0/0 | not this repository's number: see
Acceptance notes |
| `#10330` | 3/1 | 1/2 | `b9e9227e3`: declares `mappingName` on
`ImportRequestSchema` |
| `#10338` | 4/2 | 3/1 | `d2619fd0c`: `ApiEndpoint.target` is optional,
and the publish gate holds the flow requirement |
| `#10726` | 2/2 | 2/0 | `bc56e1881`: retires `contributes.routes`,
ruled Option B (stage 1's anchor too) |
| `#11006` | 12/2 | 10/2 | `cccbe51bf`: declares `publishMetaItem` under
the 2026-08-22 maintainer ruling, option B |
| `#11453` | 1/1 | 1/0 | `1a47a5368`: `ack()` refuses a row that is not
`in_flight` |
| `#11504` | 4/2 | 2/2 | `f90e82024`: registers
`FLOW_INPUT_SCHEMA_INVALID`, the contract half (stage 1's anchor too) |
| `#11846` | 1/1 | 1/0 | `0c2334f6c`: the preview-mode retirement, whose
test states the same assertion-set reasoning (stage 1's anchor too) |
| `#11858` (a PR) | 1/1 | 1/0 | `1a47a5368`, its squash commit: `ack()`
takes the shared `DELIVERY_NOT_ELIGIBLE` spelling |
| `#11859` | 2/1 | 2/0 | `d9cf78eaa`: `ack()` binds the claim credential
in its compare-and-set |
| `#12194` | 1/1 | 1/0 | `311433f6b`: declares the item-name grammar and
refuses it loudly at the publish door |
| `#13135` | 3/2 | 3/0 | `9e0ba21a1`: retires the paper
metadata-customization protocol (stage 1's anchor too) |
| `#13197` | 1/1 | 1/0 | `56c093c4d`: the in-memory driver enforces
field-level `unique` |
| `#14474` | 1/1 | 1/0 | `df657d9df`: the install-time namespace
conflict refusal carries an ADR-0112 envelope |
| `#14691` | 16/1 | 4/12 | `b3a63d32c`: retires the ten inert
`RestServerConfig` keys. All 16 sites are in `rest-server.test.ts`; the
9 in `rest-server.zod.ts` are out of scope |
| `#14723` | 1/1 | 1/0 | `65846bc46`: lands the 2026-09-03 maintainer
ruling, so a unique-constraint refusal has one wire spelling,
`UNIQUE_VIOLATION`, on every route |
| `#14748` | 2/2 | 2/0 | `92b5d7f00`: registers `NAMESPACE_CONFLICT`
(its diff wrote the row this line glosses) |
| `#16649` | 12/2 | 11/1 | `613bfbd3d` for 9 sites: registers the
fourteen remaining `door: 'none'` codes. `44c917a47` for 2 sites: widens
the vocabulary gate's face to every published package and retires
`boot-refusal` (each of its diffs wrote the line it now anchors) |
| `#17058` | 1/1 | 1/0 | `94c930248`: parses the dataset-query selection
at the door, with its leniency sweep |
| `#19307` | 1/1 | 1/0 | `8f6d83147`: the `sys_permission_set`
duplicate-name refusal carries `UNIQUE_VIOLATION` |
Every cited sha resolves to exactly one commit (`git rev-parse
--disambiguate`, count 1), and every one is an ancestor of the base
(`merge-base --is-ancestor`, exit 0). That is 30 distinct shas.
Two wordings to check, both true of their commit:
- `error-code-ledger.zod.ts:919`: 「the contract review that passed
commit 1a47a53 ruled option B」. The review record sat on PR #11858,
which answers 404 today. The line keeps that review's ruling as stated
before and names the commit that landed it.
- `discovery.zod.ts:291`: 「route B toward the single API base that
commit fec7848 gave the direct-mount routes」. #6633 is live and stays,
and the dead goal it pointed at is now named by the commit that
delivered it.
## The 34 string sites left as tokens
- **Test titles (33 sites).** `protocol.test.ts` 12,
`rest-server.test.ts` 12, `export.test.ts` 3,
`error-code-ledger.test.ts` 2, `validate-data.test.ts` 2, and 1 each in
`discovery.test.ts` and `endpoint.test.ts`.
- **Non-test string (1 site).** `error-code-ledger.zod.ts:1692`, the
`reason` of the `FLOW_INPUT_SCHEMA_INVALID` row in the exported
`PROVENANCE_WAIVERS` table (it cites `#11504`). It ships in the package
as data. The one reader, `scripts/check-error-code-provenance.ts`,
checks the table and never prints a `reason` to an author. So it is
neither a comment nor author-shown text in the form D sense, and it is
not rewritten here.
No author-shown text was found in `api/`: nothing here is #20233's form
D.
## Mechanical guard: no code token moves
The check is a comments-stripped token comparison, base `21ab41041`
against head `22a00c42d` (the later commits add only the changeset and
the regenerated pages). It uses the TypeScript parser's leaf tokens, so
template literals are scanned in context, and it excludes JSDoc nodes.
It ran over all 22 touched `.ts` files.
- Real run: 88,201 base tokens, **0 files with a token change** (exit
0).
- Comment-insertion control: 0 files changed, as expected (exit 0).
- Positive control (a declaration appended): 1 file reads DIFFER (exit
1).
- Positive control (one digit changed inside a `rest-server.test.ts`
test-title string): 1 file reads DIFFER (exit 1).
## Changeset
This change ships bytes, so a `patch` changeset for `@objectstack/spec`
is included. It says only that the provenance comments were re-anchored.
Measured on the built package: 8 of the touched sources are
`src/**/*.zod.ts`, which `files[]` ships verbatim. The rewritten
docblocks also reach `dist`: `2a29caa53`, `cccbe51bf`, `84c86fb45`,
`613bfbd3d` and `90bbf2510` each appear in 1 declaration file, and
`613bfbd3d` and `79c46da90` each appear in 6 bundled `.js` files. The
positive control, a pre-existing `protocol.zod.ts` docblock sentence,
appears in `dist/api/index.d.ts`.
## Gates (head `24d9fba68`)
- **Citation judging pass, run as CI runs it:** `pnpm
check:issue-citations && node scripts/check-issue-citations.mjs` exits
0. The self-test passes 73 cases in 7 batteries. The live run judged 13
citations across 8 files, and all 13 resolve. These are the live numbers
left on changed lines, such as #4633, #4828, #12004, #11679 and #16404.
- **Doc authoring:** `pnpm check:doc-authoring` exits 0.
- **Derived gates:** `node scripts/pm/dispatch-gates.mjs --commands
--repo objectstack-ai/objectstack` at the final head derived 111
families, and all 111 exit 0. `--ran` reports 111 run, 0 NOT MEASURED, 0
unrun, and exits 0.
- At the earlier head, before the reference pages were regenerated, the
list held 87 families. `check:docs` exited 1 there; that is what proved
the three pages stale.
- Four gates (`check:doc-formula-expressions`,
`check:dual-build-cjs-loads`, `check:lean-entry-closure`,
`check:type-check-debt`) first exited 3, PREREQUISITE NOT MET. They exit
0 after a full `turbo run build` of `./packages/*` (71 tasks, exit 0,
under the shared verify lock).
- **Build, tests, typecheck and lint:**
- `pnpm --filter @objectstack/spec build` exits 0.
- `vitest run --maxWorkers=2 src/api` in `packages/spec`: 47 files and
1,518 tests pass. That covers all 13 touched test files.
- The three spec script suites that read `api/` source text
(`check-error-code-provenance`, `file-description`, `schema-index`)
pass: 3 files, 144 tests.
- `pnpm --filter @objectstack/spec typecheck` exits 0, including
`check:test-typecheck` (53 files, 255 errors, 142 pinned signatures
held).
- `eslint --no-inline-config --format json` over the 22 touched `.ts`
files: 22 files, 0 errors, 0 warnings. All 22 are in eslint's own
population (`isPathIgnored` false for each). The config never enables
type-aware linting, so a comment edit here cannot move the verdict on
any untouched file. The repo-wide `pnpm lint` is CI's run.
## Acceptance notes
- **The objectui PR number.** `export-job-family-retirement.test.ts:25`
reads 「objectui retired its side first (objectui#10247, merged as
objectui PR #10264)」. The number belongs to objectui's board, but the
citation grammar reads `objectui PR #10264` as a bare number of this
repository, so the census counts it as dead here (it is 404 on this
board). `objectstack-ai/objectui` answers 403 to this session, on both
REST and the web page, so whether that PR is live is NOT MEASURED. The
line is left unchanged. This is the same grammar family as #20330's
`pre-` / `post-` blind spot, a qualifier the grammar does not recognise,
and it is named there, not filed.
- **Base.** The branch is 2 commits behind `origin/main` (`d3958bac6`,
read at 2026-09-28). Neither commit touches `packages/spec/src/api` or
`content/docs/references/api`, and a no-driver `merge-tree` of the head
onto `d3958bac6` exits 0. So there was no merge.
- **#20295's branch.** It edits `rest-server.test.ts` too, in hunks at
base lines 114 to 136, 152 to 185 and 663 to 679. This PR's four comment
edits there are at lines 198, 206, 266 and 371. A no-driver `merge-tree`
of this head with that branch's head `2e575f156` exits 0.
- **Surface.** The regenerated reference pages under
`content/docs/references/api/` are the one set of files outside
`packages/spec/src/api/**` besides the changeset. They are generator
output projected from the rewritten docblocks, and the required
`TypeScript Type Check` job reds without them.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01CiCTczDo7tGhafXjf61dUJ)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent c74de10 commit 5cf58eb
26 files changed
Lines changed: 128 additions & 117 deletions
File tree
- .changeset
- content/docs/references/api
- packages/spec/src/api
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
| 175 | + | |
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | | - | |
| 315 | + | |
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
| 286 | + | |
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1241 | 1241 | | |
1242 | 1242 | | |
1243 | 1243 | | |
1244 | | - | |
| 1244 | + | |
1245 | 1245 | | |
1246 | 1246 | | |
1247 | 1247 | | |
| |||
1272 | 1272 | | |
1273 | 1273 | | |
1274 | 1274 | | |
1275 | | - | |
| 1275 | + | |
1276 | 1276 | | |
1277 | 1277 | | |
1278 | 1278 | | |
| |||
1330 | 1330 | | |
1331 | 1331 | | |
1332 | 1332 | | |
1333 | | - | |
| 1333 | + | |
1334 | 1334 | | |
1335 | 1335 | | |
1336 | 1336 | | |
| |||
1350 | 1350 | | |
1351 | 1351 | | |
1352 | 1352 | | |
1353 | | - | |
| 1353 | + | |
1354 | 1354 | | |
1355 | 1355 | | |
1356 | 1356 | | |
1357 | 1357 | | |
1358 | | - | |
| 1358 | + | |
1359 | 1359 | | |
1360 | 1360 | | |
1361 | 1361 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | | - | |
| 291 | + | |
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
| |||
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
422 | | - | |
| 422 | + | |
423 | 423 | | |
424 | 424 | | |
425 | 425 | | |
426 | | - | |
| 426 | + | |
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
431 | | - | |
| 431 | + | |
432 | 432 | | |
433 | 433 | | |
434 | 434 | | |
| |||
508 | 508 | | |
509 | 509 | | |
510 | 510 | | |
511 | | - | |
512 | | - | |
| 511 | + | |
| 512 | + | |
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
| |||
521 | 521 | | |
522 | 522 | | |
523 | 523 | | |
524 | | - | |
| 524 | + | |
525 | 525 | | |
526 | | - | |
| 526 | + | |
527 | 527 | | |
528 | 528 | | |
529 | 529 | | |
| |||
571 | 571 | | |
572 | 572 | | |
573 | 573 | | |
574 | | - | |
| 574 | + | |
575 | 575 | | |
576 | 576 | | |
577 | 577 | | |
| |||
584 | 584 | | |
585 | 585 | | |
586 | 586 | | |
587 | | - | |
588 | | - | |
| 587 | + | |
| 588 | + | |
589 | 589 | | |
590 | 590 | | |
591 | 591 | | |
592 | 592 | | |
593 | 593 | | |
594 | | - | |
| 594 | + | |
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
| |||
630 | 630 | | |
631 | 631 | | |
632 | 632 | | |
633 | | - | |
| 633 | + | |
634 | 634 | | |
635 | 635 | | |
636 | 636 | | |
| |||
667 | 667 | | |
668 | 668 | | |
669 | 669 | | |
670 | | - | |
| 670 | + | |
671 | 671 | | |
672 | 672 | | |
673 | 673 | | |
| |||
0 commit comments