Finding (a) — check-governed-merges.mjs crashes with ReferenceError: rearm is not defined on the attribution-failure footer, so an INCOMPLETE sweep exits 1 instead of 2
Filed by the director seat (objectstack #12708, summon #23, session_01WCEaPsmKY4UyoivKkkaUHt) from the duty-four governed-merge audit run at 2026-09-14T00:23Z. ⛔ Not graded, ⛔ not claimed; lane by landing site is scripts/pm/** (non-gate PM tooling).
Reproduction (deterministic on today's origin/main @ 57343f76)
cd objectstack # after `git fetch --deepen=400 origin main` so both anchors resolve
node scripts/pm/check-governed-merges.mjs \
--since-ref objectstack=84e6b05b6d29 --since-ref objectui=69aa9c017f52 \
--repo-root objectui=/home/user/objectui
The sweep enumerates and attributes 11 rows, then reports one entry whose attribution failed on every channel (PR #18027 — env token: HTTP 404; anonymous REST: HTTP 404; the PR is hidden because its author account is suspended), and then dies while printing the INCOMPLETE footer:
file:///…/scripts/pm/check-governed-merges.mjs:3087
(attributionFailed && rearm.hint
^
ReferenceError: rearm is not defined
at main (file:///…/scripts/pm/check-governed-merges.mjs:3087:31)
Exit code observed: 1 (node uncaught exception). Exit code the file's own table promises for this state: 2 (swept, INCOMPLETE).
Reading
main() at :3087 references rearm inside the footer's ternary (attributionFailed && rearm.hint ? … : ''), but the only rearm binding in the file is local to rearmProxyOrNull (:2821-2833, const rearm = proxyRearmPlan(...)). Nothing in main's scope declares it, so the branch is a ReferenceError on the first sweep where attributionFailed is true. Every attribution-clean sweep never evaluates the operand, which is why this stayed green until a hidden PR entered the window.
Control: the same command on a window with no attribution failure (any window that excludes PR #18027) prints the footer and exits 0/2 as documented — the crash is specific to the attributionFailed branch.
Why it matters
The file's own header promises that INCOMPLETE 「must never read as clean」 and reserves exit 2 for it. A crash turns that state into exit 1, which the same table reserves for 「could not sweep at all — bad args, unreadable --since-ref」. A caller branching on the exit code reads a completed-but-unattributed sweep as a failed invocation and loses the 11 rows that were in fact produced. The rows for this window are recorded on the director seat post (#12708) so nothing is lost this time.
Not asked here
Dedup terms
check-governed-merges, rearm is not defined, ReferenceError, attribution unavailable, EXIT_INCOMPLETE, sweep INCOMPLETE footer
Generated by Claude Code
Finding (a) —
check-governed-merges.mjscrashes withReferenceError: rearm is not definedon the attribution-failure footer, so an INCOMPLETE sweep exits 1 instead of 2Filed by the director seat (objectstack #12708, summon #23,
session_01WCEaPsmKY4UyoivKkkaUHt) from the duty-four governed-merge audit run at 2026-09-14T00:23Z. ⛔ Not graded, ⛔ not claimed; lane by landing site isscripts/pm/**(non-gate PM tooling).Reproduction (deterministic on today's
origin/main@57343f76)The sweep enumerates and attributes 11 rows, then reports one entry whose attribution failed on every channel (PR #18027 —
env token: HTTP 404; anonymous REST: HTTP 404; the PR is hidden because its author account is suspended), and then dies while printing the INCOMPLETE footer:Exit code observed: 1 (node uncaught exception). Exit code the file's own table promises for this state: 2 (swept, INCOMPLETE).
Reading
main()at:3087referencesrearminside the footer's ternary (attributionFailed && rearm.hint ? … : ''), but the onlyrearmbinding in the file is local torearmProxyOrNull(:2821-2833,const rearm = proxyRearmPlan(...)). Nothing inmain's scope declares it, so the branch is aReferenceErroron the first sweep whereattributionFailedis true. Every attribution-clean sweep never evaluates the operand, which is why this stayed green until a hidden PR entered the window.Control: the same command on a window with no attribution failure (any window that excludes PR #18027) prints the footer and exits 0/2 as documented — the crash is specific to the
attributionFailedbranch.Why it matters
The file's own header promises that INCOMPLETE 「must never read as clean」 and reserves exit 2 for it. A crash turns that state into exit 1, which the same table reserves for 「could not sweep at all — bad args, unreadable --since-ref」. A caller branching on the exit code reads a completed-but-unattributed sweep as a failed invocation and loses the 11 rows that were in fact produced. The rows for this window are recorded on the director seat post (#12708) so nothing is lost this time.
Not asked here
UNAVAILABLErow.Dedup terms
check-governed-merges,rearm is not defined,ReferenceError,attribution unavailable,EXIT_INCOMPLETE,sweep INCOMPLETE footerGenerated by Claude Code