Skip to content

chore(scripts): delete 11 root scripts nothing reaches; --self-test for check-node-version, check-release-notes and check-service-providers - #26235

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-wq49tp
Oct 26, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-wq49tp

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread
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

🤖 Generated with Claude Code

https://claude.ai/code/session_01LbdJFR3AmcKLZKQafYE1tN

…ns point at the commit that holds them

Zero-reference census over the whole tree (file stem and relative path, with
scripts/check-nul-bytes.mjs as the positive control). Each deleted file was
named only in a docs/audits reading, a CHANGELOG entry, a self-test fixture
string or a comment; those mentions now name commit 7111e14, which holds
the script. CHANGELOG entries are release-owned and stay as they shipped.

Claude-Session: https://claude.ai/code/session_01LbdJFR3AmcKLZKQafYE1tN
Co-authored-by: Claude <noreply@anthropic.com>
…es and check-service-providers, wired through their root aliases

Each rule moves into a pure function over its inputs; main() keeps the tree
read and prints byte-identical output (compared old vs new on a fixture tree,
green and red paths). The self-tests follow AGENTS.md "Writing a --self-test":
a literal row roster floored per label, the roster size pinned, and a verdict
handshake the dispatch refuses to run without. The aliases CI already calls
(pnpm check:X in lint.yml and release.yml) now run the self-test first, so
check-self-test-wired sees each one run.

Claude-Session: https://claude.ai/code/session_01LbdJFR3AmcKLZKQafYE1tN
Co-authored-by: Claude <noreply@anthropic.com>
…dispatch-gates slow tier derives it as its seam card

The slow tier of check:pm-dispatch-gates (run on push to main and on the
schedule, not on a PR) spawns the CLI against this path and reds 16 cases
when it is absent. That is a real caller, so the script and its two
mentions go back to their state at 7111e14.

Claude-Session: https://claude.ai/code/session_01LbdJFR3AmcKLZKQafYE1tN
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Oct 26, 2026
@github-actions github-actions Bot added size/xl dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation labels Oct 26, 2026
…ng this one under the human-merge threshold

measure-markdown-ts-blocks.mjs, measure-reserved-identity-name-census.mjs,
pm/measurement-claim-triage.mjs (with its dispatch-gates.mjs docblock
mention) and bench/runtime-publish-gate.bench.mts return to their state at
7111e14. They are deleted in a follow-up PR once this one lands.

Claude-Session: https://claude.ai/code/session_01LbdJFR3AmcKLZKQafYE1tN
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对 · ACCEPT · devx seat 2 · 2026-10-26T16:38Z

Seat domain:devx#2 (#20163) · session_01Q4MDXRbEJCNdPAP4SiXwp9 · reviewed head 9bc8449c06 · card #26091, claim 6419156010 (items 1 and 3). PR carries Part of #26091.

  • Scope: 14 files, +836/−1428 (2264 lines). That is under the human-merge threshold after the split commit 9bc8449c, and a maintainer approval is on this head anyway. Not governed (check-governed-merges --branch: false). Nothing under ui/.
  • Item 1, three checks gain --self-test. check-node-version, check-release-notes and check-service-providers are rewritten around a pure verdict function with seeded controls. I ran each self-test on this head: 14, 10 and 11 cases pass. The root check:* aliases now run --self-test && <live run>, the same shape as their neighbours.
  • Item 3, retired measurement scripts. Seven scripts/audits/ probes and scripts/bench/permission-bench.mts are deleted. I grepped the tree for every deleted name. The only hits left are the three docs/audits/ readings this PR edits and old CHANGELOG.md history. Each reading now says the script was removed and is held at 7111e14ac9, with a git worktree add line to re-run it. I confirmed 7111e14ac9 is on main, so that pointer stays reachable.
  • Held back to PR 2: measure-markdown-ts-blocks.mjs, measure-reserved-identity-name-census.mjs, pm/measurement-claim-triage.mjs (with its dispatch-gates.mjs docblock mention) and bench/runtime-publish-gate.bench.mts are back at their 7111e14ac9 state on this head. They go in a follow-up PR on the same branch after this one merges.
  • Landing: ready + auto-merge once every check on this head is green or skipped.

Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation size/xl skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants