builder: retain child exit status in stopped-step errors #499

Merged
monsterlag merged 3 commits from fix/child-exit-status into main 2026-11-08 08:19:57 +00:00
monsterlag commented 2026-11-08 06:37:43 +00:00 (Migrated from github.com)

Problem and behavior

When a builder child stops without a Python traceback, the last ordinary progress line can become its entire error message. The excerpt in #478 therefore does not reveal why the lifter stopped.

Keep the child's exit status in @@error, for example lift.py stopped (exit status 7): .... POSIX signal termination reports the signal number; Windows native status values remain numeric exit statuses. The existing compiler diagnostic selection, forwarded output and outer builder failure status are preserved. Close the exhausted output pipe before waiting.

Checks

  • Actual production wrapper with real synthetic children: exit 7 after progress, silent exit 9, success with both output streams, a compiler error above the output tail, and Windows native status 3221225477. The original wrapper failed all four applicable status assertions; the success case passed.
  • Windows: 11 tests passed, with the POSIX signal case skipped. All six existing failure-reason tests remain unchanged. Resource warnings were treated as errors. Existing Unicode child-output and four builder-status tests also passed.
  • The existing Windows/Linux CI step already runs this test file; no workflow steps changed. A normal merge includes the shared import-window fixture repair from #488; the two exit-status production/test files retain their tested bytes. Hosted Linux CI exercised a real synthetic child that terminates itself with SIGTERM. All four checks pass at a6730d8: Windows and Linux source checks, SPIR-V emission and AppImage packaging.

Limits

No Steam Deck reproduction, game build or native build was run. This improves diagnostics; it does not establish an OOM condition, an ADR/ADRP defect, or the cause of #478. The POSIX signal case has not been run locally.

## Problem and behavior When a builder child stops without a Python traceback, the last ordinary progress line can become its entire error message. The excerpt in #478 therefore does not reveal why the lifter stopped. Keep the child's exit status in `@@error`, for example `lift.py stopped (exit status 7): ...`. POSIX signal termination reports the signal number; Windows native status values remain numeric exit statuses. The existing compiler diagnostic selection, forwarded output and outer builder failure status are preserved. Close the exhausted output pipe before waiting. ## Checks - Actual production wrapper with real synthetic children: exit 7 after progress, silent exit 9, success with both output streams, a compiler error above the output tail, and Windows native status 3221225477. The original wrapper failed all four applicable status assertions; the success case passed. - Windows: 11 tests passed, with the POSIX signal case skipped. All six existing failure-reason tests remain unchanged. Resource warnings were treated as errors. Existing Unicode child-output and four builder-status tests also passed. - The existing Windows/Linux CI step already runs this test file; no workflow steps changed. A normal merge includes the shared import-window fixture repair from #488; the two exit-status production/test files retain their tested bytes. Hosted Linux CI exercised a real synthetic child that terminates itself with SIGTERM. All four checks pass at `a6730d8`: Windows and Linux source checks, SPIR-V emission and AppImage packaging. ## Limits No Steam Deck reproduction, game build or native build was run. This improves diagnostics; it does not establish an OOM condition, an ADR/ADRP defect, or the cause of #478. The POSIX signal case has not been run locally.
Commenting is not possible because the repository is archived.
No description provided.