You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
x86 prod gate: the console-prompt count assertion aborts via set -e instead of failing through the verdict trap (PROMPT_BEFORE=0 under host contention) #884
The x86 production-profile boot test script (docker/qemu/run-x86-prod-profile-boot-test.sh) has a bare test assertion that checks the console prompt count, which aborts via set -e instead of routing through the verdict trap. This is the #802 class of pre-empting exit that bypasses proper failure handling and reporting.
These assertions validate the liveness signal: a steady-state prompt is printed once at start (PROMPT_BEFORE=1), and exactly one additional prompt is earned by the stimulus (PROMPT_AFTER=2). This proves the kernel is executing and responding to UART input.
Observed Failure
During PR #883 landing on beast (attempt 1): the script aborted with set -e at the PROMPT_BEFORE assertion when PROMPT_BEFORE=0 and PROMPT_AFTER=1, indicating the steady-state prompt was never printed (typical under host contention). The abort bypassed the verdict trap, leaving no proper error reporting, GATE_BOOT_FACTS record, or ended_by marker.
PR #805 fixed a similar issue: AF_UNIX preflights in this same script were aborting via bare exit before the ERR trap was installed, pre-empting the verdict path. PR #818 widened that fix to six sibling gate scripts. The PROMPT assertions carry the same pre-empting shape — they run after the trap is armed but under set -e, so a failure kills the script without invoking report_gate_failure.
Record failure facts: Ensure the error captures PROMPT_BEFORE and PROMPT_AFTER values in the diagnosis output and/or a distinct FAIL text for this class of failure.
Extend the ratchet: Update tests/teardown_structure.rs to include run-x86-prod-profile-boot-test.sh in the verdict-trap shape census (similar to the test at line ~6815 for other x86 gates), verifying that:
The script installs its ERR trap before any assertion that could fail
All failures route through the trap (no bare exits or set -e aborts pre-empting verdict)
Summary
The x86 production-profile boot test script (
docker/qemu/run-x86-prod-profile-boot-test.sh) has a baretestassertion that checks the console prompt count, which aborts viaset -einstead of routing through the verdict trap. This is the #802 class of pre-empting exit that bypasses proper failure handling and reporting.What the Assertion Checks
Lines ~1248-1249:
These assertions validate the liveness signal: a steady-state prompt is printed once at start (
PROMPT_BEFORE=1), and exactly one additional prompt is earned by the stimulus (PROMPT_AFTER=2). This proves the kernel is executing and responding to UART input.Observed Failure
During PR #883 landing on beast (attempt 1): the script aborted with
set -eat the PROMPT_BEFORE assertion when PROMPT_BEFORE=0 and PROMPT_AFTER=1, indicating the steady-state prompt was never printed (typical under host contention). The abort bypassed the verdict trap, leaving no proper error reporting, GATE_BOOT_FACTS record, or ended_by marker.Why This Is #802 Class
PR #805 fixed a similar issue: AF_UNIX preflights in this same script were aborting via bare
exitbefore the ERR trap was installed, pre-empting the verdict path. PR #818 widened that fix to six sibling gate scripts. The PROMPT assertions carry the same pre-empting shape — they run after the trap is armed but underset -e, so a failure kills the script without invokingreport_gate_failure.The Ask
testassertions to a check-and-false idiom that routes failures throughreport_gate_failure, similar to PR gates: every gate script with a verdict trap fails through it - six sibling gates repaired, 66 pre-empting exits removed, the ratchet widened by shape (the #802 class) #818's pattern (e.g., use||groups andfalse).tests/teardown_structure.rsto includerun-x86-prod-profile-boot-test.shin the verdict-trap shape census (similar to the test at line ~6815 for other x86 gates), verifying that:Related
#802 #805 #818 #826 #865 #871