Skip to content

Commit 81bba6c

Browse files
chore(scripts): delete 11 root scripts nothing reaches; --self-test for check-node-version, check-release-notes and check-service-providers (#26235)
<!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9RdxrKhQwWyCt2rysjANPQa)_ Part of #26091 — Wanted 1 and Wanted 3 only. Wanted 2 (one invocation spelling) stays on the card: it edits `.github/workflows/**` and the root alias map, held this round. #26091 remains open. Clause-②: no Metadata-protocol: none ## What changed **Wanted 1 — 11 root scripts nothing reaches are deleted; 9 of the card's 20 stay because something does reach them.** Census: for each of the card's 20 entry points, `git grep -l -F <file stem>` over the whole tree at `7111e14ac9` (every root, `ui/` included), with `scripts/check-nul-bytes.mjs` as the positive control (32 files hit it, among them `package.json` and `lint.yml`). Every hit was read and classified. Deleted — each hit was only a `docs/audits` reading, a release-owned `CHANGELOG.md` entry, a self-test fixture string or a comment: | Script | What named it | |---|---| | `scripts/audits/14096-tenancy-ledger-namespace-regexp-census.mjs` | its `docs/audits` reading | | `scripts/audits/14423-c3-c4-keyed-mechanism-probe.mjs` | its `docs/audits` reading | | `scripts/audits/14423-databaseloader-cost-probe.mjs` | its `docs/audits` reading | | `scripts/audits/14423-filesystemloader-cost-probe.mjs` | its `docs/audits` reading | | `scripts/audits/14423-unbound-declarations-before-count.mjs` | its `docs/audits` reading | | `scripts/audits/14744-before-update-per-row-value-probe.mjs` | its `docs/audits` reading | | `scripts/bench/permission-bench.mts` | 4 `CHANGELOG.md` entries only | | `scripts/bench/runtime-publish-gate.bench.mts` | a path string in `dispatch-gates.self-test.mjs` fed to the pure predicate `isInRootTsProgram` (no disk read) | | `scripts/measure-markdown-ts-blocks.mjs` | 20 `CHANGELOG.md` entries only | | `scripts/measure-reserved-identity-name-census.mjs` | 1 `CHANGELOG.md` entry only | | `scripts/pm/measurement-claim-triage.mjs` | one historical census row in a `dispatch-gates.mjs` docblock | Every `docs/audits` "re-run" citation and comment that named a deleted script now names commit `7111e14ac9`, which holds it, with the `git worktree add --detach` line to re-run it from there (3 audit files and one `scripts/pm/dispatch-gates.mjs` docblock line). `CHANGELOG.md` entries are release-owned and stay as they shipped. No `archive/` folder. Kept — a real caller exists: | Script | Caller | |---|---| | `scripts/ablation-replace.mjs` | the ablation procedure in `.claude/agents/os-dev.md` and `packages/qa/dogfood/README.md` tells agents to run it | | `scripts/audits/14744-before-update-per-row-value-census.mjs` | a `COMPOUND_ANCHOR_LEDGER` row in `scripts/pm/dispatch-gates.data.mjs`, which `check:pm-dispatch-gates` reconciles against the live tree in both directions (deleting it needs that row and the docblock counts moved — a ledger edit outside this card's file surface) | | `scripts/codemod/view-to-viewitem.mjs` | ADR-0017 offers it to teams as the migration codemod; repointing that needs an ADR edit (Tier H) | | `scripts/measure-return-propagating-durability-seams.mjs` | AGENTS.md (durability section) tells authors to read the population from it; `check-durability-degradation-log-level.mjs` names it as the instrument | | `scripts/measure-partial-retirement-annotation.mjs` | the slow tier of `check:pm-dispatch-gates` (`dispatch-gates.self-test.mjs`, the `seamCard` block) spawns the CLI against this path; deleting it reds 16 cases there — measured, see Acceptance notes | | `scripts/measure-self-test-floor.mjs` | AGENTS.md "Writing a --self-test" names it as the probe | | `scripts/pm/fleet-git-credential.sh` | `scripts/pm/with-fleet.sh` executes it and installs it as the git credential helper | | `scripts/pm/fleet-roster.mjs` | the maintainer-ordered generator of the pinned fleet roster issue (landed three days before this census); the roster body's marker names it | | `scripts/qa/qa-rollup.mjs` | `docs/qa/platform-checklist/RUNNER.md` tells runners to run it after filing | **Wanted 3 — `--self-test` for three of the five `check-*` scripts.** `scripts/check-node-version.mjs`, `scripts/check-release-notes.mjs` and `scripts/check-service-providers.mjs`: - each rule moves into a pure function over its inputs (`auditSetupNodeSteps` + `lifecycleVerdict`, `findProblems`, `findProblems` + `parseTable`); `main()` keeps the tree read and prints the same bytes. Proof: old and new copies run side by side on a fixture tree, green path and every red path (missing page + unlisted page + unreachable section; provider typo + missing slot; one mismatched step; EOL, unknown and empty pins) — stdout, stderr and exit identical in all 9 runs; - each self-test follows AGENTS.md "Writing a --self-test", copied from `check-agent-model-declared.mjs`: a literal row roster floored per label (10 / 11 / 14 rows), the roster size pinned, and a `selfTestReachedVerdict` handshake the dispatch refuses to run without. Negative controls are rows that must go RED (a missing page, a non-workspace provider, a mismatched or missing Node pin, an expression-resolved version, an EOL pin, a parser fed a source with no table). Problems now carry a `kind` and subject, so the cases assert what was found, never the message wording; - the three root aliases CI already calls (`pnpm check:X` in `lint.yml`, and `check:release-notes` in `release.yml`) now run `--self-test` first — the house spelling — so `check:self-test-wired` sees each self-test run. `scripts/check-changeset-fixed.mjs` and `scripts/docs-audit/check-drift-comment.mjs` stay without one this round: both are run by direct `node` lines in workflows (`cut-rc.yml`, `release.yml`, `validate-deps.yml`; `docs-drift-check.yml`), so a self-test there is unwired — `check:self-test-wired` reds it, and its `SELF_TEST_RUN_OTHERWISE` ledger forbids a row for that — until a workflow step runs it. That wiring lands with Wanted 2, which edits those workflows anyway. ## Acceptance - Card loop `for f in scripts/check-*.mjs; do grep -q -- --self-test $f || echo $f; done` → `scripts/check-changeset-fixed.mjs` (one line, the deferred one above; was four). - Census re-run on the head: the 11 deleted files have 0 callers. Remaining textual hits are the commit-pinned `docs/audits` citations, the `isInRootTsProgram` fixture string and the one historical `dispatch-gates.mjs` docblock row; `CHANGELOG.md` entries excluded. - `pnpm check:pm-skill-ratchet` → exit 0. - Derived gate families (`dispatch-gates --commands`): 54 derived at `2e05d6c9a`, 54 run, every exit 0; `dispatch-gates --ran` → "54 run, 0 NOT-MEASURED". Includes `check:self-test-wired`, `check:self-test-workflow-commands`, `check:entry-guard`, `check:watch-hint-literal`, `check:node-version`, `check:release-notes`, `check:service-providers` and `check:type-check-debt` (root program still 26 errors, none above its record; the two deleted `.mts` files carried none). - `check:pm-dispatch-gates` slow tier (CI runs it on push to main, not on this PR): `node scripts/pm/check-dispatch-gates.mjs --self-test && node scripts/pm/check-dispatch-gates.mjs --slow` at `2e05d6c9a` → "dispatch-gates self-test: 2182 cases pass", both tiers, exit 0. ## Acceptance notes - **Changed lines: +838 / −4,370 = 5,208, over the 3,000 human-merge threshold** (AGENTS.md, Multi-agent discipline §7 (c)) — almost all of it the deleted files. This PR lands by an authorized approval or a human merge, not by the queue on green alone. - The first head deleted `scripts/measure-partial-retirement-annotation.mjs` too. The slow tier of `check:pm-dispatch-gates` — which CI runs on push to `main` and on the schedule, not on a PR — then failed 16 cases, all in its `seamCard` block (`the seam card still derives at all` first: the CLI answers exit 3, absent path). The script was restored at `2e05d6c9a` and listed as kept; the slow tier was re-run on that head (see Acceptance). - Census correction: the card's list read `measure-markdown-ts-blocks.mjs`, `measure-reserved-identity-name-census.mjs` and `permission-bench.mts` as referenced nowhere; all three are named in shipped `CHANGELOG.md` entries (history, not callers). `fleet-roster.mjs` is named only by a comment, but it is a live maintainer tool, so it stays. Generated by Claude Code, session `session_01LbdJFR3AmcKLZKQafYE1tN`, in a card thread for devx seat 2. --- _Generated by [Claude Code](https://claude.ai/code/session_01LbdJFR3AmcKLZKQafYE1tN)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01LbdJFR3AmcKLZKQafYE1tN --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent a1477de commit 81bba6c

14 files changed

Lines changed: 836 additions & 1428 deletions

‎docs/audits/2026-09-loadmany-consumer-census.md‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,9 @@ files that assert today's unkeyed shape.
9696
test-only fixture doubles (`*.test.ts`, not loaders anyone ships). Each shipped loader's
9797
`list()`, `loadMany()` and `loadManyKeyed()` were read at the cited lines, then the cost
9898
claim was **measured**, not guessed — either by counting the calls a fake engine/fs sees,
99-
or by timing the real implementation. Scripts are committed under `scripts/audits/` (see
100-
§5) so every number below is re-runnable.
99+
or by timing the real implementation. Scripts were committed under `scripts/audits/` (see
100+
§5) so every number below is re-runnable; they were later removed from the tree and are
101+
held at commit `7111e14ac9`.
101102

102103
| Loader | `listNames` (via `list()`) | `loadManyKeyed` | Cost of `listNames()` + N × by-name `load`/`loadDiagnosed`, vs `loadMany()` |
103104
|---|---|---|---|
@@ -289,6 +290,8 @@ direct a re-check once the rate limit clears) rather than risk a duplicate.
289290
## Commands to re-run every measurement in this census
290291

291292
```bash
293+
# The four scripts were removed from the tree; run these from a checkout of commit
294+
# 7111e14ac9, which holds them: git worktree add --detach ../objectstack-7111e14ac9 7111e14ac9
292295
# Build the dependency closures this census's scripts import from (dist, not src):
293296
pnpm --filter '@objectstack/objectql^...' build && pnpm --filter @objectstack/objectql build
294297

‎docs/audits/2026-09-multi-update-per-row-value-census.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ SELF-TEST PASSED — 10/10 cases
165165
## 3. Instrument B — runtime behavioural probe on the real engine
166166

167167
`scripts/audits/14744-before-update-per-row-value-probe.mjs`
168-
(`npx tsx … --out <path.json>`). It boots the real `ObjectQL` against a stub driver,
168+
(`npx tsx … --out <path.json>`; removed from the tree after this reading; held at commit `7111e14ac9`). It boots the real `ObjectQL` against a stub driver,
169169
dispatches handlers per row of a genuine `multi: true` update, and reads what actually
170170
reaches `driver.updateMany` — the one `SET` clause D3 gives N rows. **Four of its eight
171171
subjects are the shipped handlers themselves, imported and dispatched unmodified**; the

‎docs/audits/2026-09-tenancy-ledger-namespace-regexp-census.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ which only *mention* the call in comments), filtered to a literal `name: '...'`
7777
matching — a first pass without that step undercounted by 2
7878
(`sys_oauth_client_resource`, `sys_oauth_resource`), both because a doc comment shaped like
7979
`(255, 768]` desyncs a naive bracket scan; see the script's own header comment for detail).
80-
Script: `scripts/audits/14096-tenancy-ledger-namespace-regexp-census.mjs`.
80+
Script: `scripts/audits/14096-tenancy-ledger-namespace-regexp-census.mjs` (removed from the tree after this reading; held at commit `7111e14ac9`).
8181

8282
**Result: 84 registered platform-namespace objects** — all `sys_`-prefixed; zero `cloud_`
8383
or `ai_` object schemas exist in this repository (the ledger's own comment explains why:
@@ -282,6 +282,8 @@ under `scripts/audits/` — no exported symbol, no published payload key, nothin
282282
# Build the dependency closure the script imports from (dist, not src):
283283
pnpm --filter '@objectstack/objectql^...' build && pnpm --filter @objectstack/objectql build
284284

285+
# The script was removed from the tree; run these from a checkout of commit 7111e14ac9,
286+
# which holds it: git worktree add --detach ../objectstack-7111e14ac9 7111e14ac9
285287
# The whole census, in one command — prints the full JSON report to stdout
286288
# and a human-readable summary to stderr; exits 0 (measurement, not a gate):
287289
node scripts/audits/14096-tenancy-ledger-namespace-regexp-census.mjs

‎package.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
"check:slot-lookup": "node scripts/check-slot-lookup-ratchet.mjs --self-test && node scripts/check-slot-lookup-ratchet.mjs",
127127
"check:query-options-erasure": "node scripts/check-query-options-erasure-ratchet.mjs --self-test && node scripts/check-query-options-erasure-ratchet.mjs",
128128
"check:verify-stand-in": "node scripts/check-verify-stand-in-erasure.mjs --self-test && node scripts/check-verify-stand-in-erasure.mjs",
129-
"check:service-providers": "node scripts/check-service-providers.mjs",
129+
"check:service-providers": "node scripts/check-service-providers.mjs --self-test && node scripts/check-service-providers.mjs",
130130
"check:route-envelope": "node scripts/check-route-envelope.mjs --self-test && node scripts/check-route-envelope.mjs",
131131
"check:auth-mount-ledger": "node scripts/check-auth-mount-ledger.mjs --self-test && node scripts/check-auth-mount-ledger.mjs",
132132
"check:error-code-casing": "node scripts/check-error-code-casing.mjs --self-test && node scripts/check-error-code-casing.mjs",
@@ -152,11 +152,11 @@
152152
"check:override-consistency": "node scripts/check-override-consistency.mjs --self-test && node scripts/check-override-consistency.mjs",
153153
"check:vendor-export-contract": "node scripts/check-vendor-export-contract.mjs --self-test && node scripts/check-vendor-export-contract.mjs",
154154
"check:vendor-export-contract-resolve": "node scripts/check-vendor-export-contract.mjs --self-test && node scripts/check-vendor-export-contract.mjs --resolve",
155-
"check:release-notes": "node scripts/check-release-notes.mjs",
155+
"check:release-notes": "node scripts/check-release-notes.mjs --self-test && node scripts/check-release-notes.mjs",
156156
"check:release-page-status": "node scripts/check-release-page-status.mjs --self-test && node scripts/check-release-page-status.mjs",
157157
"check:release-body": "node scripts/release-github-releases.mjs --self-test",
158158
"check:release-index-currency-sync": "node scripts/sync-release-index-currency.mjs --self-test",
159-
"check:node-version": "node scripts/check-node-version.mjs",
159+
"check:node-version": "node scripts/check-node-version.mjs --self-test && node scripts/check-node-version.mjs",
160160
"check:pnpm-acquisition": "node scripts/check-pnpm-acquisition.mjs --self-test && node scripts/check-pnpm-acquisition.mjs",
161161
"check:workflow-status-functions": "node scripts/check-workflow-status-functions.mjs --self-test && node scripts/check-workflow-status-functions.mjs",
162162
"check:workflow-step-name-quoting": "node scripts/check-workflow-step-name-quoting.mjs --self-test && node scripts/check-workflow-step-name-quoting.mjs",

0 commit comments

Comments
 (0)