Skip to content

fix(cli): reject exiting dispatch leaders on macOS - #2501

Merged
limityan merged 1 commit into
GCWing:1.0.0-explorefrom
wgqqqqq:codex/fix-macos-cli-cancellation-test-explore
Aug 25, 2026
Merged

fix(cli): reject exiting dispatch leaders on macOS#2501
limityan merged 1 commit into
GCWing:1.0.0-explorefrom
wgqqqqq:codex/fix-macos-cli-cancellation-test-explore

Conversation

@wgqqqqq

@wgqqqqq wgqqqqq commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Backport only the macOS dispatch fix from #2497 to 1.0.0-explore:

  • reject ps states carrying the exiting E modifier before SIGKILL escalation
  • accept only known live primary states (I, R, S, T, U)
  • fail closed for empty, zombie, exiting, and unknown states
  • add focused state-parser coverage

No telemetry/configuration changes from #2497 are included.

Root cause

The intermittent failure exposed a real exit-window race. kill(pid, 0) can still observe a leader that is already trying to exit, while macOS ps marks that state with the E modifier. The previous zombie-only check accepted values such as SE and UEs, re-authenticated the leader, and allowed SIGKILL escalation after SIGTERM had already initiated exit.

Signal ordering and timeout behavior remain unchanged.

Verification

  • source file is byte-identical to the merged main fix at eadedaded
  • fix: preserve models and reject exiting dispatch leaders #2497 passed macOS CLI and Rust build checks on main
  • focused parser tests cover live, zombie, exiting, empty, and unknown states
  • this PR runs the current impact-selected CI without desktop package producers

@wgqqqqq
wgqqqqq force-pushed the codex/fix-macos-cli-cancellation-test-explore branch from c86bb3d to de4b85d Compare August 25, 2026 12:01
@wgqqqqq
wgqqqqq force-pushed the codex/fix-macos-cli-cancellation-test-explore branch from de4b85d to 1f006de Compare August 25, 2026 12:55
@wgqqqqq wgqqqqq changed the title test(cli): make dispatch cancellation handshake deterministic fix(cli): reject exiting dispatch leaders on macOS Aug 25, 2026
@limityan
limityan merged commit 63d526d into GCWing:1.0.0-explore Aug 25, 2026
11 checks passed
@wgqqqqq
wgqqqqq deleted the codex/fix-macos-cli-cancellation-test-explore branch August 25, 2026 13:27
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.

2 participants