Skip to content

Update Codex runtime while preserving queued reviews and MCP sessions - #387

Merged
lynnswap merged 8 commits into
mainfrom
codex/deferred-runtime-update
Sep 26, 2026
Merged

lynnswap merged 8 commits into
mainfrom
codex/deferred-runtime-update

Conversation

@lynnswap

@lynnswap lynnswap commented Sep 26, 2026 •

Copy link
Copy Markdown
Owner

Purpose

Update Codex without restarting ReviewMonitor or disconnecting existing MCP calls. New review requests stay in the Store queue while current reviews finish, then continue as the same jobs after app-server is replaced.

Changes

  • Add the application-host updateCodex(when:install:) SPI, supporting deferred and immediate updates. Concurrent requests join one installation operation.
  • Reuse runtime replacement and settings publication while retaining MCP ownership and queued requests. Wait for running reviews and bounded cleanup before installation.
  • Keep installation errors visible even when runtime recovery succeeds. Preserve the queue on close, startup, or publication failure, including repeated manual recovery attempts. Confirm current process closure independently of a cached close failure before retrying.
  • Coordinate updates with startup, account operations, and shutdown without serializing ordinary account reads and login. Stop queued jobs independently of whether a runtime has started.
  • Leave the Monitor UI and periodic/manual update-check wiring to 後回し更新 UI と8時間周期・設定画面の更新チェックを接続する #385.

Testing

  • swift test --build-system swiftbuild --no-parallel: 1,253 tests passed.
  • ReviewMonitor xcodebuild test, macOS arm64, signing disabled, -skipMacroValidation: 42 tests passed.
  • Real MCP HTTP coverage runs review A, accepts B and C during the update wait, and completes their original calls in the same session after one injected installation.
  • Host coverage verifies the old transport closes before installation and queued work starts on the new transport while retaining the MCP listener.
  • Regression coverage includes history-loading and persistence races, history deletion during the wait, cleanup, repeated startup/publication failures, MCP startup failure, account operations, cancellable dependency waits, pending stops, and shutdown during installation.
  • Local Codex review against main: E0323A94-F76D-4516-BA29-B429863ADE89, completed with no findings.

Tests inject the installer and backend/transport; no installed Codex command or running ReviewMonitor was replaced.

Closes #384. Part of #382.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-26T08:26:24.383959Z 8ff02db Manual request
🔒 Security Review ✅ Completed 2026-09-26T07:42:53.095369Z 7018857 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 701885799c

ℹ️ 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".

Comment thread Sources/CodexReview/Store/CodexReviewStoreUpdate.swift Outdated
Comment thread Sources/CodexReview/Store/CodexReviewStoreUpdate.swift

@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. More of your lovely PRs please.

Reviewed commit: 8ff02dbd04

ℹ️ 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 a5f31e2 into main Sep 26, 2026
5 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.

MCP セッションを維持してレビュー完了後に Codex runtime を更新する

1 participant