fix(devx): give the last four --self-test dispatches a verdict handshake - #15729
Conversation
The four remaining DEFEATED rows of the self-test floor census discard the self-test's completion, so an early `return` yields `undefined`, `process.exit(undefined)` is exit 0, and the run prints zero bytes — "40 assertions held" and "the 40 assertions never ran" are the same green to a CI wrapper that reads only the status. All four now carry the one spelling the other 165 already do: a module-level `selfTestReachedVerdict` flag set once a verdict is printed, read at the dispatch, which refuses to exit 0 without it. The flag is set on the FAILURE path too, so the refusal fires only when neither verdict was printed and a genuine red keeps its own message. No assertion is changed: all four unmutated verdict lines are byte-identical before and after. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
|
ACCEPT — PM seat Reviewed against the three-dot diff at What the diff does — one spelling on all four dispatch sites: a module-level Measured by this seat on the PR head (plain The dev's probe rows for all four (BEFORE Fences held: the four scripts only; Recorded, not filed (the dev's observation, matching PR #15651's ACCEPT note): 79 of the 82 handshake carriers under Generated by Claude Code |
Fixes #15614
Fixes #15657
The last four
--self-testdispatches inscripts/**discarded the self-test'scompletion, so an early
returnyieldedundefined,process.exit(undefined)wasexit 0, and the run printed zero bytes. To a CI wrapper reading only
result.status, "40 assertions held" and "the 40 assertions never ran" were thesame green. These are the measured, closed residue of the handshake programme —
165 of the census's 179 members already carry the repair.
The four sites (re-measured on this branch's base
a5cef3769)All four line numbers and spellings are verbatim as triage measured them, and each
file carried
ReachedVerdict0 occurrences (positive control: 82 files underscripts/carry the flag, so zero was the file's property, not the grep's).The repair — ONE spelling, four files
A module-level
selfTestReachedVerdictflag, set once a verdict has been printedand read at the dispatch, which refuses to exit 0 without it:
The flag is set on the FAILURE path too, following the landed precedent in
scripts/check-i18n-walk-parity.mjs. Without that, a self-test that prints itsfailures and returns non-zero also trips the guard and prints the
"never reached its verdict" sentence on top of a genuine red — the wart recorded on
PR #15651's ACCEPT. Here the refusal fires only when neither verdict was
printed. (
check-settings-bind-window's failure path callsprocess.exit(1)frominside its
assert, so it has no returning failure leg to flag.)Red/green, taken with the probe — not by eye
scripts/measure-self-test-floor.mjs'sprobeEarlyReturndriven against exactlythese four files, on an installed tree (an uninstalled checkout reports the
flattering answer), before and after:
scripts/check-closing-keyword-parity.mjsDEFEATEDbaselineExit=0 mutatedExit=0 mutatedBytes=0HELDmutatedExit=1 mutatedBytes=214 mutatedSpoke=truescripts/check-pnpm-filter-targets.mjsDEFEATEDbaselineExit=0 mutatedExit=0 mutatedBytes=0HELDmutatedExit=1 mutatedBytes=211 mutatedSpoke=truescripts/check-settings-bind-window.mjsDEFEATEDbaselineExit=0 mutatedExit=0 mutatedBytes=0HELDmutatedExit=1 mutatedBytes=212 mutatedSpoke=truescripts/pnpm-filter-targets.mjsDEFEATEDbaselineExit=0 mutatedExit=0 mutatedBytes=0HELDmutatedExit=1 mutatedBytes=205 mutatedSpoke=trueEvery AFTER row's
mutatedHeadis that gate's own refusal sentence, e.g.✗ check-pnpm-filter-targets self-test: selfTest() returned without reaching its verdict,.The assertions are untouched — verdict lines byte-identical
Captured to files before and after and compared with
diff; all four reportedVERDICT LINE IDENTICAL to before, exit 0 both times:Ablation, by hand, on the fixed tree
return;injected asselfTest()'s first statement inscripts/check-pnpm-filter-targets.mjsafter the fix was committed, trap-guarded,absolute paths, mutation and restore both proven on disk:
Before the fix the same mutation exited 0 printing nothing; that is the whole defect.
Out of scope, deliberately
scripts/audits/14744-before-update-per-row-value-census.mjs— the ACCIDENT row, carried elsewhere; not touched here.scripts/measure-self-test-floor.mjs— the instrument; not touched here.docs/audits/2026-09-self-test-shape-census.md— a dated audit, a historical reading; not edited.scripts/publishes nothing (skip-changeset).Verification (all on the final head
e193c0189)Derived family —
node scripts/pm/dispatch-gates.mjs --changed --commands --repo objectstack-ai/objectstackderived 29 commands from the 4-path change set (exit codes captured before any pipe);
all 29 exited 0, run under
scripts/pm/os-verify-lock.shwithOS_VERIFY_LOCK_SLOT=issue-15614:Verdict lines from the ones that speak to this change:
Repo-wide lint, run in full rather than narrowed:
eslint . --no-inline-config --format json→ 5974 files linted, 0 errors, 0 warnings, exit 0 (97s).
Also re-run per the ruling, in case a roster counted the DEFEATED rows:
check-self-test-wiredand its
--self-test(both exit 0, no roster mentions any of the four); no gate in the treerosters handshake carriers by name, and the census document is a dated audit, left untouched.
NOT MEASURED: the three CI-variable families
dispatch-gatesprints as⊘ NOT MEASURED(
check-cross-package-test-inputs --union-into "$RUNNER_TEMP/...",check-shard-attestation --emit --job test --shard ${{ matrix.shard }},check-test-completeness "$RUNNER_TEMP/test-core.log")— their argv carries a value that exists only inside a CI run. The always-runs workflow tail is CI's.
🤖 Generated with Claude Code
https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
Generated by Claude Code