Skip to content

Close runtime admission before transitions - #142

Merged
lynnswap merged 1 commit into
mainfrom
codex/runtime-admission-close-pr
Aug 22, 2026
Merged

Close runtime admission before transitions#142
lynnswap merged 1 commit into
mainfrom
codex/runtime-admission-close-pr

Conversation

@lynnswap

@lynnswap lynnswap commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Purpose

Prevent stale callbacks from a retiring runtime from mutating Store state after a replacement, recycle, stop, or runtime-failure transition has been admitted.

Changes

  • Make runtime lifecycle admission close a synchronous MainActor operation.
  • Close the currently published runtime admission before generation changes, task creation, or the first suspension.
  • Preserve later physical close and drain as one idempotent lifecycle operation without closing admission twice.
  • Strengthen Store and Host race coverage for force restart, account recycle, explicit stop, runtime failure, and stale account notifications.

Testing

  • Store lifecycle and Host focused suites
  • Full Host bundle repeated 100 times
  • Store bundle repeated 100 times
  • swift test --build-system swiftbuild --no-parallel
  • Compatibility consumer, API, and MCP gates
  • ReviewMonitor xcodebuild test
  • Root audit and Codex review with 0 findings

Screenshots

Not applicable.

Close the published runtime admission synchronously when Store admits restart, account recycle, stop, or failure. Keep semantic and physical teardown asynchronous while preventing stale runtime completions from publishing into a successor generation.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@lynnswap lynnswap changed the title fix(runtime): close admission before transitions Close runtime admission before transitions Aug 22, 2026
@lynnswap

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 6ed9560f00

ℹ️ 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 afab637 into main Aug 22, 2026
2 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.

1 participant