Repository navigation
feat: adopt upstream orchestrator v2 - #989
Merged
Merged
Conversation
Pylon's bridge to the Relay Orchestrator Claude plugin was a stand-in while upstream's orchestrator was unavailable. Upstream shipped orchestrator v2, so this removes the bridge rather than carrying two delegation implementations. Deletes RelayWorkerBridge, RelayCli and relayMcpConfig, and unhooks their optional-service wiring from server.ts, ws.ts, OrchestrationReactor and ProviderRuntimeIngestion. The Claude and Codex adapters no longer inject a relay MCP server. Drops the relay-only wire fields (source, relaySequence, relayPriorUsage). cancellable and watchable stay: they are generic capability flags that Prime and native agents also use. Historical events keep decoding because Struct ignores excess properties, covered by a new fold regression test. Collapses the logic those fields carried: - ProjectionSnapshotQuery drops the relay lifecycle pinning CTEs. - ThreadBackgroundLiveness loses its relay set; no work outlives its session, so clearThreadLiveness drops the thread entry outright. - subagentRuntime loses the attempt/sequence fence and cumulative usage accounting; canCancelSessionAgent loses its detached-controls parameter. - planBackgroundAgentStop reduced algebraically to canInterruptParent once detached workers were gone, so ChatView uses that directly. The managed relay tunnels (packages/shared/src/relay*, infra/relay, apps/server/src/relay, deploy-relay.yml) are a different subsystem and are untouched. Migration 063 stays: it is registered and already applied.
rynfar
marked this pull request as ready for review
October 3, 2026 05:48
Contributor
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pylon currently runs the deleted v1 orchestration model. This adopts T3 upstream de34391427 (#2829) in full and moves server, contracts, shared runtime, web, mobile and desktop onto v2 together. The production
apps/server/src/orchestration-v2files are byte-for-byte upstream.Depends on #987, whose prerequisite commit is included while that PR remains open. Closes #988. The adoption WIP history is replaced by seven per-area commits.
userdata/statev2.sqlite, imports legacy transcripts fromstate.sqlite, and registers its new migrations as 68/69 without rewriting Pylon's existing migration history.orchestrationProtocol=2(old/missing→426), and orchestration HTTP requiresx-t3-orchestration-protocol: 2. V2 graph/command/snapshot payloads replace v1 shapes. The native iOS composer also changes, so a rebuilt compatible binary/runtime is required before delivery. Pylon's 1.0.1 release version is retained; the pinned upstream config is 1.4.0. No EAS, OTA or store release was performed. Thepreview:localappVersion override needs an explicit runtime/version decision before shipping.Validation: all affected package direct typechecks pass; changed-scope formatting and lint pass. Eight focused pristine v2 core suites pass 174 tests; Prime bridge/provider suites pass 322 and title suites pass 26. All ten focused provider adapter suites pass 578/578 after the authorized Pylon branding test adaptations. Independent review repairs pass 87 Prime lifecycle tests and 376 web handoff/composer tests; both exact CI Knip commands pass. OpenCode retains Pylon’s 180-second browser-tool budget outside the unchanged v2 adapter, respecting explicit native settings. A read-only Nightly DB copy imported all 307 threads and 48,062 messages, hydrated pending imports to zero, and repeated without duplicates or changing the source copy. Server bundles and rebuilt native iOS simulator build pass. Web and a fresh task-owned simulator verified isolated pairing, transcript rendering, draft retention and reversible settings without sending a provider turn. Pairing and cached transcript also survive native/JS restart, offline cold start and automatic reconnect; fresh Metro logs contain no persistence/asset errors (optional native math warning remains).
Five test-only exceptions to the exact-directory rule are maintainer-approved: Pylon migration-numbering adaptations in the cutover/project-upgrade fixtures, resolved-target importer boundary for Prime, and ACP/Codex Pylon branding assertions. The boundary/ACP/Codex rerun passes239/239; project-upgrade/auth68/68; production v2 code stays unchanged. CI is green on final head
603f8ab3ba(full CI, mobile native analysis); all test shards, typechecks, lint, builds and packaged smoke checks pass. Merge requires maintainer approval.Before and after use the same synthetic completed conversation; no private transcript or database is attached.
ui-v2-settings-draft-verification.mp4
Model: GPT-6.1-Sol. Harness: Codex in Pylon.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.