Skip to content

Make CLI completion reflect simulator cleanup - #93

Merged
lynnswap merged 2 commits into
mainfrom
codex/issue-92-cli-terminal-result
Aug 27, 2026
Merged

Make CLI completion reflect simulator cleanup#93
lynnswap merged 2 commits into
mainfrom
codex/issue-92-cli-terminal-result

Conversation

@lynnswap

Copy link
Copy Markdown
Owner

Purpose

The generation summary was rendered before a run-owned Simulator was deleted, leaving a pre-action cleanup message as the last visible line. Partial and interrupted runs could therefore lose their definitive status in the final screenful, while the displayed RunID was truncated and internal state appeared beside the consumer output path.

Changes

  • carry the typed run status through the CLI session and render the final Finished block only after run-owned Simulator cleanup succeeds
  • report successful cleanup only after simctl delete returns, and include the exact recovery name and UDID when cleanup fails
  • move Simulator lifecycle presentation out of Simctl direct prints and into the injectable CLI output owner
  • keep Headers under Output, move internal state and RunID under Diagnostics, and print the complete RunID
  • preserve cancellation ownership: typed interrupted runs remain visible, while the signal coordinator continues to own numeric SIGINT/SIGTERM exit codes
  • document the completion contract and add deterministic coverage for completed, partial, interrupted, borrowed-device, cleanup-failure, stream-routing, and recovery-identity paths

Review focus

  • terminal status is emitted only for typed run outcomes and only after successful run-owned cleanup
  • successful output hides the random recovery suffix, while failure diagnostics retain enough exact identity for manual cleanup
  • generated-header paths, opaque state identity, RunID generation, Simulator ownership, and recovery naming are unchanged

Testing

  • swift test — 632 tests across 46 suites passed
  • git diff --check
  • branch-wide local Codex review against main — 0 findings after one fixed P2 finding

Closes #92

@lynnswap lynnswap 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.

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: d7ef872d0c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@lynnswap
lynnswap merged commit a182d39 into main Aug 27, 2026
1 check 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.

CLI completion output obscures partial runs and truncates diagnostic identity

1 participant