Repository navigation
test(stack): report why an interrupted restore check of ST-50 failed - #38
Merged
knittingcode merged 3 commits intoOct 28, 2026
Merged
Conversation
The three ST-50 checks built on interrupted_restore (SIGKILL and SIGINT right after the edge started again, SIGTERM before it) reported only exit codes, the edge ID, the gate and one probe. CI run 40215242347 failed the SIGTERM check with exit 6 instead of 143, and the report could not say which fail-closed path of the rotation stopped it. On a failure the report now adds make status's verdict, the gate and the edge's answers after make up and the container identity line, and shows the stderr of the interrupted command, of make status and of make up. The conditions, their order and their waits are unchanged.
knittingcode
deleted the
test/fcrm-int5-interrupted-restore-diagnostics
branch
October 28, 2026 10:08
This was referenced Oct 28, 2026
knittingcode
added a commit
that referenced
this pull request
Oct 28, 2026
knittingcode
added a commit
that referenced
this pull request
Oct 28, 2026
knittingcode
added a commit
that referenced
this pull request
Oct 28, 2026
knittingcode
added a commit
that referenced
this pull request
Oct 28, 2026
knittingcode
added a commit
that referenced
this pull request
Oct 28, 2026
This was referenced Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When one of the three ST-50 checks built on
interrupted_restorefails, it now reports which step failed and why. These are the SIGKILL and SIGINT checks right after the edge started again, and the SIGTERM check before it.This is a test-only change to
tests/app/stack.sh. No condition is removed, loosened, reordered or retried, and no wait or timeout changes.Motivation and technical context
CI run 40215242347 (on #35's synced head
325471d) failed a check that #35 does not touch:The rotation runs with fault
restore-before-edgeand should be killed by SIGTERM just beforerestore_edge, exiting 143. It exited 6 (EX_SAFETY) instead.The stack stayed fail-closed: no edge, gate recorded, every probe 000. The following
make uprecovered (exit 0).In
cmd_rotate_db_passwordthe exit-6 paths beforerestore_edgeare:rotation_prepare;protect_for;verify_role_client.refresh_secret_mountsfails with exit 2, not 6. The report did not include the rotation's stderr, so the path cannot be identified.The same pattern now appears in three checks, each passing on rerun:
make upwithup-after-migrations:killup=6/000/yes/0: exit 6 before the migration, edge down, gate recordedexit 6instead of 143, fail-closed state,make uprecoveredbin/devenvshortly after earlier steps recreated the db or api containers (refresh_secret_mounts,make up).Implementation
interrupted_restorekeeps its condition chain unchanged and records its status.When that status is a failure, it builds
IR_DIAGafter the checks.IR_DIAGnever contains a secret value and holds:make statusand its first line (with the real devenv this is theproject: …line; theblocked: …verdict appears in the fullstatus>lines printed below the check);make up;lifecycleline (db and api container ID, start time, restarts, health and secret-mount comparison).Each of the three checks:
ir=$?) right after it;IR_DIAGto the report;ir_details, which shows the stderr tail of the interrupted command, the output and stderr ofmake status, and the stderr ofmake up.On a pass, nothing extra is computed or printed.
Testing performed
The branch is synced with main
202ea9e(#39) atbfbde64. Against main it changes onlyinterrupted_restore, addsir_detailsand changes the three ST-50 checks; #35's ST-50 owner and ST-64 reporting is unchanged.bash -n tests/app/stack.sh: OK.tests/devenv/unit.shon843a00aand onbfbde64:TOTAL 287 passed=287 failed=0(macOS). U-16 needs passwordless sudo and runs only in CI.stack.shwith stubbed Docker, curl and devenv, for main5e4a150and this branch:exit 6, edge [], gate recorded, probe: …, make up 0. This branch addsstatus 1 [<first status line>], after make up: gate removed, probe: …, db=… api=…, then the rotation's stderr (| devenv: ERROR: …), thestatus>lines andmake up's stderr;bfbde64: success. Repository guard and Dev environment pass every step.status>lines).TOTAL 124 passed=124 failed=0, production-like stack39/39, allocator unit288/288, integration140/140.SC api-prod,SC edge-prodandSC db (runtime)report no HIGH or CRITICAL vulnerabilities,TOTAL 14 passed=14 failed=0.843a00afailed only at Trivy (curl/libcurl CVE-2026-92392 in the runtime images), which fix(security): upgrade curl and libcurl in runtime images #39 fixed on main.Security considerations
The added output is exit codes,
make statustext, HTTP status codes, container IDs and timestamps, secret-mount comparisons (same, different or missing) and devenv's stderr. devenv never prints password values. The fail-closed behaviour ofbin/devenvis unchanged.Known limitations
make upfinished starting the edge, the probe can show 000 or 502 while the edge is still starting.interrupted_restorepasses but the check's own edge or probe condition fails, there is noIR_DIAG; only the stderr andmake statusdetails are printed.Note (review, FCRM-INT-007): the stubbed
make statusin the harness printedblocked: …first; the realmake statusprintsproject: …first. The status excerpt is therefore less specific than intended, but no information is lost, becauseir_detailsprints the last 15 lines of the status output, which include theblocked:line.