Own prepared runtime generations - #133
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e74c6e3b3c
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ad1d873d8f
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3b9f790634
ℹ️ 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".
| previous: previous, | ||
| candidate: candidate | ||
| ) | ||
| if mutationRevision == revision { |
There was a problem hiding this comment.
Reconcile writes that finish after runtime publication
When a runtime snapshot advances mutationRevision while persistSelection is already in flight, this guard suppresses only the local baseline update; it cannot prevent the backend request from committing after the new runtime has read its snapshot. Fresh evidence beyond the resolved thread is that FakeCodexReviewBackend.applySettings applies the stale change after its gate opens (Sources/CodexReviewTesting/TestSupport.swift lines 468-475), and the new regression test manually restores freshSnapshot at line 285 before continuing, masking the resulting backend/UI divergence. In this race the UI shows fresh-runtime-model while persisted configuration contains stale-model, so a subsequent review or restart can use the wrong settings; runtime publication must wait for the write or reconcile the current backend after a stale success.
Useful? React with 👍 / 👎.
| await self?.performRuntimeStop( | ||
| previousState: previousState, | ||
| invalidatedGeneration: invalidatedGeneration, | ||
| purpose: .runtimeFailure |
There was a problem hiding this comment.
Preserve the failure reason when tearing down reviews
When the auth notification stream fails while reviews are active, routing teardown through .runtimeFailure loses the failure message before review cleanup: performRuntimeStop calls the ordinary stopPublishedRuntimeSemantics, and LiveCodexReviewStoreBackend.stop hardcodes ReviewCancellation.system(message: "Review runtime stopped."). The previous failure path passed "Review runtime stopped unexpectedly: …" into cancelActiveReviewsForRuntimeTeardown, so this change now records an intentional-stop reason on jobs that were actually interrupted by a runtime failure; pass the failure cancellation reason through the new teardown path.
Useful? React with 👍 / 👎.
|
Closing without merge. The corrected prepared-runtime generation implementation continues in #139 on top of the merged owner prerequisites. |
Purpose
Prevent stale runtime preparation from publishing after stop or restart, while replacing only AppServer state during same-account restart and retaining the MCP listener generation and URL.
Changes
Testing
swift test --build-system swiftbuild --no-parallelscripts/check-compatibility.shxcodebuild test(15 tests)Screenshots
Not applicable.