mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[GH-ISSUE #554] pixelforge test harness hangs instead of exiting when an assertion fails #283
Labels
No labels
agent: chess
agent: conversation-calls
agent: eightball
agent: haptic
agent: hierarchical-maps
agent: hierarchical-maps
agent: illustrator
agent: poker
agent: rock-paper-scissors
agent: tic-tac-toe
agent: uno
artifacts
bug
bugfix
build
catalog
ci
client
dependencies
docs
documentation
enhancement
feature
fixed-in-staging
in-pr
normal-scope
packages
pull-request
qol
regression
roadmap
scope-risk
server
soup
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Agents#283
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kolacheee on GitHub (Aug 24, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/554
Originally assigned to: @kolacheee on GitHub.
When an assertion fails in
packages/pixelforge/test-brief.mjs, the node process can hang indefinitely instead of exiting non-zero. The assertion error is printed, and then the process just sits there — one observed instance ran past a 10-minute shell timeout. Green runs are unaffected: every passing run exits 0 promptly.This was noticed during 0.12 development while doing fail-first red replays (temporarily reverting a production change to prove a new test catches it). The failure-path code involved is untouched by that branch, so this is believed to be pre-existing on
staging— but the belief comes from reading the diff, not from a bisect.Why it matters: the harness currently runs locally, where a human notices the hang and kills it. If it is ever wired into CI, a red run would stall the job until the CI timeout instead of failing fast — the worst possible failure mode for a regression harness, since a hang is easy to misread as infrastructure trouble rather than a failing test.
Repro sketch (against
staging):packages/pixelforge/test-brief.mjsand break any assertion so it fails (e.g. flip an expected value in one of the world-shape lanes).node packages/pixelforge/test-brief.mjsAssertionErrorprints, the process does not exit.Not every failing assertion may reproduce it — the observed hangs were on lanes that had constructed sim/HUD state before failing, which also points at the likely mechanism.
Likely mechanism (hypothesis, unverified): a stray open handle keeps the event loop alive after the throw. The harness builds live objects (sim, HUD over the FakeNode shim) that arm timers/intervals; a passing lane presumably reaches its teardown, while a thrown assertion skips teardown and leaves the handle armed, so node never drains the loop. If that is right, the fix is small: either an
unref()on harness-created timers, atry/finallyteardown around lanes, or a top-levelprocess.exitCode = 1; process.exit()in a final catch.Suggested acceptance: any failing assertion exits non-zero within seconds; passing behavior unchanged.
@kolacheee commented on GitHub (Aug 24, 2026):
Status update from independent verification, correcting this issue's confidence level.
A second agent attempted to reproduce the hang as part of adversarially verifying the same 0.12 work, and could not — six attempts, all under a shell timeout:
AssertionErrorand exited 1 promptly.assert.equal(1, 2, …)inserted at the equivalent location in a clean detached worktree atstaging(45845e4b) exited 1 in ~2 seconds — so the "pre-existing on staging" claim in the issue body is also unconfirmed.So the current evidence is: one observed hang (a red-replay run that sat past a 10-minute shell timeout during implementation) against six clean fast-fail reproductions of the same class, including the same lane. Possibilities that fit both observations: an environment-specific factor in the original run (shell/timeout interaction, another process holding something), a failure lane not among the six retried, or a genuine intermittent open-handle race that needs specific timer state to be armed at throw time.
Downgrading this from "known trap" to unconfirmed, needs a second observation. The CI concern in the body stands if the hang is real, and the acceptance bar ("any failing assertion exits non-zero within seconds") is cheap to assert regardless — a
try/finallyteardown or final-catch exit would make the question moot rather than requiring it to be settled. Fine to close as not-reproducible if nobody hits it again; if anyone does, please captureprocess._getActiveHandles()(or run withnode --trace-exit) before killing it.