Rearchitect review runtime and presentation ownership - #85
Conversation
Multi-agent structural/API audit of CodexKit (3f6216c) and CodexReviewKit (6c1b432) against upstream codex (8347b8d) and openai-python (2.43.0): verified findings (50 CONFIRMED / 1 PLAUSIBLE / 2 REFUTED), owner maps, API coverage gaps, prioritized fix plan (P1-P3), and test checklist. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Clarify that Apple APIs are design analogs rather than implementation templates, align DataKit conformance and observation ownership, and complete restart, retention, MCP, and presentation lifecycle contracts.
Move review attempts, cancellation, retention, MCP sessions, projections, and preview runtime resources under explicit owners. Align Host/AppServer integration with the current CodexKit v2 contracts and require shutdown to join cleanup work.
Own each accepted app-server generation, MCP lifetime, event consumers, lifecycle callback, and shared teardown in HostRuntimeSession. Preserve final retention during staged shutdown and reject late generation publication.
Inject one monotonic ReviewWorkerClock for connectivity observations and recovery timers. Keep presentation dates separate and move recovery tests to the same deterministic clock seam.
Centralize account mutations, login cancellation handoffs, runtime generation publication, and durable registry commits under explicit owner contracts. Preserve preview cancellation semantics and cover the lifecycle races with focused integration tests.
Pin the fallback dependency and canonical resolved graph to the PR review-fix commit.
Pin the fallback dependency and canonical resolved graph to the latest PR review fixes.
Reconstruct persisted reviewer rollouts from authoritative turn structure, keep incremental projection invalidation coherent, and display command durations only when app-server timing metadata is available.
Remove persisted text and adjacency heuristics from ReviewMonitor. Suppress typed companion messages only within the review sequence owned by the nearest exited-review marker.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d20750c4a6
ℹ️ 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".
Route authentication operation failures through user-visible UI state, resolve successful list and completed cancel output from the authoritative chat projection, and pin the API gate toolchain. Split build and test execution into cached ten-minute jobs so CI no longer spends the package-test budget on unrelated gates.
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Purpose
Implement the approved July design-audit rearchitecture so review execution, runtime shutdown, authentication, MCP sessions, and chat presentation each have a single typed owner.
This removes duplicated lifecycle and persisted-review reconstruction paths that caused stale or repeated ReviewMonitor output, while adopting the current Codex v2 contracts through the reviewed CodexKit implementation.
Changes
CodexAppServerKit,CodexDataKit, and testing products, pin the merged CodexKit revision, and pin the structured-shutdown MCP SDK fork.CodexChatprojections.TextTransitionsAPI CI gate.Testing
swift test --build-system swiftbuild --no-parallelxcodebuild test -project Tools/ReviewMonitor/CodexReviewMonitor.xcodeproj -scheme CodexReviewMonitor -destination 'platform=macOS,arch=arm64' CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO