Add durable GitHub waitpoints to orchestration V2 - #5003
Conversation
Co-authored-by: codex <codex@users.noreply.github.com>
- Initialize provider as unchecked in a pending state - Update initial probe message to reflect session-local status
- Type the runtime effect with `Scope` - Build the ACP session runtime without wrapping it in `Effect.scoped`
- Use strict TurnId and ProviderItemId parsing in Codex session routing - Decode in-memory stdio chunks in streaming mode to avoid split UTF-8 corruption
- Transfer session-owned scopes into adapter state - Ensure runtime scopes close on stop and startup failure - Add regression coverage for scoped lifecycle cleanup
- Close the managed native event logger when the adapter layer tears down - Make session runtime close idempotent with an atomic closed flag - Add coverage for flushing thread native logs on shutdown
- Use codex app-server snapshots for auth, models, and skills - Remove legacy CLI/config discovery paths and related helpers - Update tests for the new provider status flow
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
- Document the target orchestration graph, IDs, lifecycles, and capability model - Add Codex app-server probe fixtures and update the probe test harness
- Introduce orchestration v2 service interfaces and error types - Add replay runtime, fixtures, and integration coverage - Update shared contracts and probe transcripts Co-authored-by: codex <codex@users.noreply.github.com>
- Add Codex adapter and replay harness wiring - Introduce in-memory orchestration projections and provider registry - Expand orchestration contracts for turn and runtime events
Co-authored-by: codex <codex@users.noreply.github.com>
- Add context transfer IDs, schemas, and projections - Support cheap fork creation and Codex native fork rollback - Cover fork idempotency and replay behavior in tests
- Track remaining projection, context transfer, rollback, capability, and subagent work - Clarify current V2 baseline and debugger-only follow-ups
- Map fork and merge-back turns into stored handoffs and transfer resolutions - Add shell snapshot projection support plus coverage tests - Update replay fixtures and web contracts for the new turn flow
Co-authored-by: codex <codex@users.noreply.github.com>
- Move Codex replay recording into `apps/server` - Add Claude Agent SDK replay fixtures and test harness - Update orchestration-v2 fixture scenarios and docs
- Move Claude provider runtime logic into its own module - Share the SDK query runner between live and replay paths - Add replay driver error wrapping for unexpected failures
Port orchestration V2 provider adapter wiring to the provider-instance driver registry. Co-authored-by: codex <codex@users.noreply.github.com>
- persist the selected model on run records - surface run model selection in the debug UI - update replay fixtures and contracts for the new field
- Record Claude SDK transcripts across multiple prompts and restart/query modes - Add approval and tool-call replay coverage for new orchestration fixtures - Update Claude adapter testkit to model open/prompt/permission frames
- Derive Claude SDK query options from runtime policy - Add read-only replay fixture and policy mapping tests - Reuse shared approval-policy fixtures across orchestrator tests Co-authored-by: codex <codex@users.noreply.github.com>
- add active steering and interrupt-restart replay fixtures - update Claude adapter/orchestrator turn handling for steering - refresh replay and integration test coverage
- add interrupt and mid-tool replay fixtures for Claude and Codex - log Claude Agent SDK protocol frames to native event traces - project Codex commandExecution start events into orchestration updates
- Map Cursor SDK agents and runs to V2 thread and turn lifecycles - Update MCP capability, tool, and testing guidance for SDK-based injection
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Effect service conventions review of the new apps/server/src/github/** service modules and their call sites. Three findings, all in the new durable GitHub waitpoint services.
Posted via Macroscope — Effect Service Conventions
a543fd4 to
378615b
Compare
There was a problem hiding this comment.
One convention finding in the follow-up fix commit: the register:reload invariant failure now manufactures an Error purely to satisfy the required cause field. Everything else in this commit (inlined Context.Service interfaces, GitHubWaitpointService["Service"]["get"], and store-error passthrough) matches the conventions.
Posted via Macroscope — Effect Service Conventions
There was a problem hiding this comment.
Three new Effect service modules inline their construction directly into Layer.effect(...) instead of exporting a make. The convention for a module that owns construction is imports → errors/schemas → Context.Service tag → export const make → export const layer = Layer.effect(Tag, make), which is also what the rest of apps/server/src does (e.g. sourceControl/GitHubCli.ts, orchestration-v2/ThreadLifecycleService.ts, checkpointing/CheckpointStore.ts). Everything else in the waitpoint code looks consistent with the conventions: inline service interfaces, Foo["Service"] references, namespace imports from effect/* subpaths and local service modules, structured Schema.TaggedErrorClass failures with real causes, and store errors that pass an existing domain error through instead of re-wrapping it.
Posted via Macroscope — Effect Service Conventions
25de21d to
0af2a6e
Compare
519c42a to
4c55679
Compare
Summary
wait_for_github,list_github_waits, andcancel_github_waittools through the orchestration V2 MCP toolkitghCLI, without T3 Connect, a GitHub App, or a public endpointCloses #4266.
Delivery semantics
wait_for_githubregisters an idempotent one-shot wait and returns immediately so the agent can end its current turn. The server watches for checks to settle, new review activity, or PR closure. When the condition fires, it queues a normal V2 continuation and the existing UI projections show the thread running again.Delivery claims carry random fencing tokens. The observed continuation prompt is persisted before dispatch, and an expired delivery lease retries the same deterministic V2 command without re-probing GitHub or invalidating itself because the continuation advanced the thread.
Verification
@t3tools/contractsand server TypeScript checksIntentional limitations
ghpolling rather than webhook deliverywaitingstate in this milestoneStack note
This draft is based directly on #2829's orchestration V2 branch so its diff contains only the waitpoint feature. After #2829 merges, this branch will be rebased and the PR retargeted to
mainbefore review.Built with gpt-5.6-sol (high reasoning) in T3 Code via the Codex harness.
Note
Add durable GitHub waitpoints to orchestration V2 with polling, lease fencing, and MCP tools
GitHubPullRequestProbe(usinggh pr view), evaluate conditions (checks_settled,new_review_activity,pull_request_closed), and deliver a continuation prompt to the originating thread.GitHubWaitpointStorebacked by a newgithub_waitpointstable (migration 45) with delivery lease fencing to prevent duplicate delivery from concurrent workers.GitHubWaitpointServicewith a background worker that polls due waitpoints every 5 seconds, expires waitpoints when the originating run is interrupted, and uses deterministic IDs for idempotent delivery.OrchestratorMcpService:wait_for_github,list_github_waits, andcancel_github_wait, with input validation (repository format, timeout ≤ 10080 min) and agithubWaitpointscapability flag.📊 Macroscope summarized 25ff158. 13 files reviewed, 0 issues evaluated, 0 issues filtered, 0 comments posted
🗂️ Filtered Issues
No issues evaluated.