Skip to content

fix(ci): report runtime shutdown failure diagnostics - #2016

Merged
joshuajbouw merged 2 commits into
mainfrom
fix/e2e-shutdown-diagnostics
Sep 30, 2026
Merged

joshuajbouw merged 2 commits into
mainfrom
fix/e2e-shutdown-diagnostics

Conversation

@joshuajbouw

@joshuajbouw joshuajbouw commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Linked Issue

Closes #2015.

Summary

Report why the runtime harness fails while stopping its daemon. This does not fix or waive the shutdown failure observed in #2012.

Changes

  • Report PID, elapsed seconds, child exit status and whether the force-kill branch ran.
  • Preserve the existing wait, failure return and PID cleanup.
  • Exercise clean exit, nonzero exit and timeout using stubbed process operations; run these tests in the existing contract suite.
  • Do not print runtime logs or secrets.

Verification

Before the change, two of the three unchanged tests failed because failure diagnostics were empty. After the change all three pass. Bash syntax, ShellCheck and git diff --check pass. These tests prove the reporting contract, not the root cause of the real daemon failure. The full scripts/ci/test-release-contracts.sh suite also passes. Independent review accepted c4b7699 and reproduced the parent/head failure-reporting difference. Follow-up 3d01e42 addresses Copilot's test-coverage finding: both failure branches now require the correct PID, numeric elapsed seconds, exit status and force-kill flag, and clean exit requires empty stderr. All three focused tests pass on the follow-up. Required CI is pending on the new head.

Test Plan

Run python3 scripts/test_runtime_shutdown_diagnostics.py and shellcheck scripts/e2e/runtime-process-helpers.sh. On a future failing real harness run, use the emitted exit status and force-kill field to distinguish early daemon failure from a hung process.

AI / Tool Assistance

Assisted-by: Codex

AI assistance implemented the diagnostics and tests. The complete diff was reviewed and the executable regression was run before and after the change.

Checklist

  • Linked to an issue
  • CI-only change; no product changelog required
  • Reviewed the complete diff
  • Executed the focused regression
  • Signed commit with matching DCO trailer

Signed-off-by: Joshua J. Bouw <jjb@unicity-labs.com>
Copilot AI balanced review requested due to automatic review settings September 30, 2026 13:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The tests do not yet enforce the required PID and elapsed-time diagnostics.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds actionable daemon shutdown diagnostics to the runtime E2E harness.

Changes:

  • Reports PID, elapsed time, exit status, and force-kill usage.
  • Adds stubbed shutdown tests and integrates them into CI contracts.
  • Preserves existing cleanup and failure behavior.
File Description
scripts/​e2e/​runtime-process-helpers.sh Emits shutdown failure diagnostics.
scripts/​test_runtime_shutdown_diagnostics.py Tests shutdown outcomes and reporting.
scripts/​ci/​test-release-contracts.sh Runs the new regression tests.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/test_runtime_shutdown_diagnostics.py Outdated
Signed-off-by: Joshua J. Bouw <jjb@unicity-labs.com>
@joshuajbouw
joshuajbouw merged commit 2e0a78b into main Sep 30, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Runtime E2E hides daemon shutdown exit status and forced-kill failures

2 participants