Skip to content

Commit fc20f7b

Browse files
claude[bot]claude
andauthored
fix(devx): check-regen-pending refuses on an unmet prerequisite instead of reading a crash as a stale artifact (#15722) (#15785)
* fix(devx): check-regen-pending refuses on an unmet prerequisite instead of calling the artifact stale `check-regen-pending` does not regenerate and does not compare bytes: it spawns each deferred artifact's `check:` gate and reads the exit status. Every reason a gate has for exiting non-zero therefore arrived wearing the same clothes, and all of them were printed as one word — `stale` — over three lines of whatever the child said. On a checkout with no `node_modules` that is a verdict about a file nothing read. Grade the failure instead. A gate that could not LOAD is reported in #11557's landed frame — `reportPrerequisiteNotMet`, `EXIT_PREREQUISITE_NOT_MET`, both imported from `scripts/import-prerequisite.mjs`, never restated — and the run exits 3. Three shapes, all measured live on an uninstalled tree across the 14 registered paths: the runner missing (`sh: 1: tsx: not found`, 10), a raw `ERR_MODULE_NOT_FOUND` link failure (1), and a child that already refused with `PREREQUISITE NOT MET` and exited 3 (1) — the landed fix undone one process boundary out. Nothing is loosened. The refusal is still a refusal, the marker still keeps every deferred path, and a gate that RAN and failed still reads `stale` and exits 1. The prerequisite branch sits BELOW `defer`, so a merge commit that cannot run its gates still defers rather than being refused — putting that back would restore the #8047 defect whose learned workaround was skipping the whole hook. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk * fix(devx): join the prerequisite headline with a colon, not a second em dash The shared frame already spells `PREREQUISITE NOT MET — <headline>`, so a second em dash inside the headline read as one sentence broken twice. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk * fix(devx): count the unmeasured artifacts past three instead of listing them The shared frame inlines the `measures` clause into a sentence it does not wrap, so a fourteen-path list there buries the clause that carries the reading. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk * test(devx): assert the DIAGNOSIS, not the echoed child line Two of the new fixture assertions matched a string the raw child output carries either way, so they passed against the pre-fix code — measured under ablation A1, where their parent cases went red and they stayed green. They now assert the text only the refusal produces. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk * docs(scripts): the mirror gate's export count follows the module it describes check-regen-pending.mjs now exports eight functions, not seven; the count is prose in check-declaration-mirrors.mjs, not a pin, and the gate stays green either way — but a stale number there is a lie this change introduced. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent f501453 commit fc20f7b

2 files changed

Lines changed: 344 additions & 5 deletions

File tree

scripts/check-declaration-mirrors.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
// design.
7272
//
7373
// ⛔ One direction is deliberately NOT fatal: a module export that the
74-
// declaration omits. `check-regen-pending.mjs` exports seven functions and
74+
// declaration omits. `check-regen-pending.mjs` exports eight functions and
7575
// declares three, on purpose -- its declaration says "The surface is three
7676
// functions". That partial mirror cannot fail green: a consumer importing an
7777
// undeclared name gets `TS2305`, which is loud, red and immediate. Failing on

0 commit comments

Comments
 (0)