Skip to content

test(scripts): batch 10f — six-banner battery roster for pm/bare-root-worklist's self-test - #15408

Merged
baozhoutao merged 2 commits into
mainfrom
claude/issue-13799-batch10f-bare-root-worklist
Sep 4, 2026
Merged

test(scripts): batch 10f — six-banner battery roster for pm/bare-root-worklist's self-test#15408
baozhoutao merged 2 commits into
mainfrom
claude/issue-13799-batch10f-bare-root-worklist

Conversation

@baozhoutao

Copy link
Copy Markdown
Contributor

Part of #13799

Batch 10f of the assertion-floor programme: scripts/pm/bare-root-worklist.mjs
takes the Tier B multi-battery roster over the SIX named section banners of its
selfTest().

failures.length === 0 was this self-test's only success condition, so "every
case held" and "the cases never ran" printed the same verdict line. The roster
closes that: what is pinned is the registered NAMES, not a number.

Shape

  • SELF_TEST_BATTERIES — six keys, each byte-equal to the box-drawing
    banner it stands for (checked mechanically, all six match, six openers, one
    per banner).
  • SELF_TEST_BATTERY_FLOOR = 6 — deleting an entry silences that battery's
    floor as effectively as zeroing it, so the roster's own size is pinned.
  • UNATTRIBUTED_BATTERY — a case registered with no battery open reds by set
    difference rather than inflating whichever battery ran last.
  • battery(name) opens a section; registerCase() is called from the block
    body of the existing t(); the floor is evaluated at this body's own verdict
    site, immediately above the success line, into the same failures sink.
  • The seven cases that run BEFORE the first banner have no section head of
    their own, so the FIRST battery's opener is hoisted to the top of the body and
    they are attributed to it — stated at the banner as well. No comment was
    promoted to a section head.

The landed recipe refuses a floor placed before a plain return. That hole is
not open here and the reason is mechanical: this body's only exit a caller
accepts is the SELF_TEST_VERDICT sentinel returned BELOW the success line, and
the dispatch refuses anything else — so an early return reds at the HANDSHAKE
while a section that runs to the bottom with its cases gone reds at the FLOOR.
Ablation (e) below measures exactly that split.

Floors: MEASURED on a run, never planned from static sites

All six were pinned at 9999 first; one run produced exactly six breach lines
(counted before any number was read), and those numbers are the floors.

# battery (= banner) static t( sites runtime cases why they differ
1 The FOLD: one row per literal, however many invocations reach it 7 + 7 pre-banner 14
2 The triage coupling, both directions 6 6
3 The MECHANISM a repaired reason turns on, held mechanically 4 4
4 The RECORDED SPELLINGS, pinned: LIVENESS and PRECISION 9 65 4 sites inside the loop over 15 distinct spellings: 5 + 4x15
5 The DECLARATION a row describes, read from the gate's own SOURCE 7 43 4 sites inside the loop over the 10 DECLARED-NARROWER rows: 3 + 4x10
6 CENSUS_REFUSE_WIDE, pinned on its OWN terms (#14695) 5 5
total 45 137

Both loop-driven counts are driven by this file's OWN tables (TRIAGE,
SPELLINGS), not by the live tree, so re-measuring a floor is the same edit
that changes a row — the discipline the file already states for its rows.

No behaviour change

  • No assertion condition, message or argument changed. Deletions are the sink
    and verdict lines only: t() gains a registerCase() call in its block body,
    and the FAILURE line gains " (cases and floor)", the landed spelling.
  • The green line is byte-identical to the installed base, stdout and stderr
    both, cmp-clean.
  • Normal mode (which reads live PM state) is byte-identical too, stdout and
    stderr, over 134 lines of output — with a base-vs-base control run first to
    prove the comparison is a measurement and not two empty streams: there is no
    varying line in this tool's normal-mode output.

Ablations

Every mutation proven on disk (anchor count before and after, plus the blob
hash) before its run was read; every restore by git checkout HEAD -- ABSOLUTE PATH proven by blob-hash equality with the HEAD blob AND an empty
git diff HEAD; the driver carries trap ... EXIT INT TERM. No build or dist
is involved — the script is run directly by node.

# mutation result
a one battery opener renamed BOTH halves: the declared battery "DID NOT RUN — 0 cases registered, 6 pinned" and the renamed one "registered 6 case(s) but is not declared" — 3 failures
b registerCase() removed from t() ALL SIX report DID NOT RUN with 0 registered; every case still green (7 failures = 6 breaches + the remedy line, no case failure)
c one banner's section skipped by a forced if (false) guard ONLY that battery: CENSUS_REFUSE_WIDE DID NOT RUN, 0 of 5; the other five silent
d1 SELF_TEST_BATTERY_FLOOR pinned at 9999 "SELF_TEST_BATTERIES declares 6 batteries, below the pinned 9999"
d2 one roster entry DELETED both halves of the size pin: "declares 5 batteries, below the pinned 6" AND the orphaned battery's 4 cases reported as not declared
e early return after the first case NO floor line at all — the run reds at the #13798 HANDSHAKE ("selfTest() returned without reaching its verdict"), exit 1. Handshake and floor stay orthogonal: the handshake owns early exits, the floor owns sections that stop registering
f the floor deleted, with (b) applied EXIT 0 and the full green line printed with ZERO cases registered — the vacuous green this batch exists to make impossible. Restored

Gates

Exit codes captured by redirect before any pipe.

Derived family, node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack (re-derived after merging current main, so the
answer is not from a stale tree): 22 commands, ALL GREEN.

check:pm-dispatch-gates ran in the foreground under the shared verify lock
(scripts/pm/os-verify-lock.sh), five attempts across a busy queue, then
VERDICT command-exit 0 · held the lock 375s (6m15s) · waited 127s, with the
gate's own line: ✓ dispatch-gates self-test: 1392 cases pass. The four earlier
attempts returned the lock's exit 99, which is NOT MEASURED — neither a red nor
part of any green count.

Always-runs tail: check-self-test-workflow-commands.mjs and its --self-test,
check:declared-population-live, check-self-test-wired.mjs (+ --self-test),
check:ratchet-remedy-authority, check:nul-bytes, check:watch-hint-literal
— all exit 0. Verdict lines, quoted:

  • check-nul-bytes: OK (scanned 7465 text file(s) -- 7465 tracked, 0 untracked-not-ignored; skipped 7 binary; no raw ASCII control bytes).
  • OK check-ratchet-remedy-authority: 202 scripts swept ...
  • check:declared-population-live — 201 of 252 famil(ies) declare a path population, and every one of them reaches this tree's 7472 tracked file(s).

The file's own --self-test: exit 0, green line byte-identical to base.

Instrument, before and after (node scripts/measure-self-test-floor.mjs --json): 170 records before, 170 after; exactly ONE record moved —
scripts/pm/bare-root-worklist.mjs floor: NONE to floor: ROSTER. Nothing
entered the population and nothing else left it.

extractWatchHints over this file: [] before, [] after — identical, with a
positive control in the same session (check-cli-command-ids.mjs returns four
hints, check-nul-bytes.mjs two), so the empty answer is a measurement rather
than a silent extractor. This file still declares no population of its own.

Whole-repo pnpm lint (eslint . --no-inline-config): exit 0 in 88s. No
narrowing was needed or claimed.

Gate union run at 7f1242569.

skip-changeset: this PR publishes nothing from any package — the only changed
path is scripts/pm/bare-root-worklist.mjs.

🤖 Generated with Claude Code

https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk


Generated by Claude Code

…self-test

`failures.length === 0` was this self-test's only success condition, so "every
case held" and "the cases never ran" printed the same verdict line. The Tier B
multi-battery recipe closes that: one battery per named section banner, each
roster key byte-equal to the banner it stands for, opened under it, with every
case registered after that line attributed to it. A battery that stops
registering names the banner a reader can go find instead of a number that says
only that something moved.

The floors are MEASURED on a run, never planned from static `t(` sites: eight of
this body's sites sit inside loops over the file's own tables, so two batteries
run several times their static count (65 and 43 against 9 and 7 static). The
seven cases that run before the first banner have no section head of their own,
so the first battery's opener is hoisted to the top of the body and they are
attributed to it — no comment is promoted to a section head.

The check sits at this body's own verdict site, immediately above the success
line. The early-return hole an end-of-body floor would leave open is closed by
the existing `SELF_TEST_VERDICT` handshake, which the dispatch refuses anything
else than, so the two holes keep their own guards.

No assertion condition, message or argument changes; the green line is
byte-identical, and so is normal-mode output.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
@baozhoutao baozhoutao added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 4, 2026 — with Claude
@github-actions github-actions Bot added the size/m label Sep 4, 2026
@baozhoutao
baozhoutao marked this pull request as ready for review September 4, 2026 14:43
@baozhoutao
baozhoutao enabled auto-merge September 4, 2026 14:43
@baozhoutao
baozhoutao added this pull request to the merge queue Sep 4, 2026
Merged via the queue into main with commit d786b16 Sep 4, 2026
36 checks passed
@baozhoutao
baozhoutao deleted the claude/issue-13799-batch10f-bare-root-worklist branch September 4, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m 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.

2 participants