Skip to content

[codex] close smoke log groups on failure - #116

Merged
davidiach merged 1 commit into
mainfrom
codex/failure-safe-smoke-groups
May 11, 2026
Merged

davidiach merged 1 commit into
mainfrom
codex/failure-safe-smoke-groups

Conversation

@davidiach

Copy link
Copy Markdown
Owner

Summary

  • centralize CI smoke GitHub Actions group output behind begin_smoke_group / end_smoke_group
  • close any open smoke group from the EXIT cleanup path before removing the temp directory
  • add a source-consistency test that keeps raw group marker emission confined to the helper functions

Why

demo/ci_smoke.sh runs with set -euo pipefail. Before this change, a failure between ::group:: and ::endgroup:: could exit before closing the Actions group, leaving the failing log section folded or visually mangled right when debugging matters most.

Review notes

  • The smoke commands and assertion order are unchanged; only group open/close emission is centralized.
  • Successful groups still close explicitly. Early failures close through trap cleanup EXIT because SMOKE_GROUP_OPEN remains set until end_smoke_group runs.
  • A review finding noted the first static test overfit exact printf spellings. The test now checks the invariant instead: marker emitters must live inside the group helper functions.

Validation

  • python -m unittest demo.test_bridge.KernelMetadataTests.test_ci_smoke_replays_every_shipped_transcript demo.test_bridge.KernelMetadataTests.test_ci_smoke_action_groups_are_failure_safe
  • python -m unittest demo.test_bridge
  • wsl.exe -d Ubuntu bash -n demo/ci_smoke.sh
  • git diff --check -- demo/ci_smoke.sh demo/test_bridge.py
  • wsl.exe -d Ubuntu make ci-check

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@davidiach davidiach left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Self-review pass complete.

Current patch review:

  • Smoke command order and assertions are unchanged; only group marker emission is routed through helpers.
  • SMOKE_GROUP_OPEN remains set during an active group, so trap cleanup EXIT closes it on pipeline, grep, or Python assertion failure under set -euo pipefail.
  • Successful paths call end_smoke_group explicitly and reset the flag, so cleanup does not double-close groups.
  • The source-consistency test checks the important invariant without overfitting exact printf spellings: marker emission must stay inside the helper functions, and cleanup must close before tempdir removal.

Local validation is green: targeted CI-smoke tests, full demo.test_bridge, bash -n, git diff --check, and wsl.exe -d Ubuntu make ci-check.

@davidiach
davidiach merged commit 5b82634 into main May 11, 2026
1 check passed
@davidiach
davidiach deleted the codex/failure-safe-smoke-groups branch May 18, 2026 18:42
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.

1 participant