refactor(supervise): delete piExecutor — no harness gets a bespoke executor - #688
Merged
Conversation
…dge path
cli-bridge already routes pi generically (`m === 'pi' || m.startsWith('pi/')`),
so a second pi-only executor was duplication. A pi worker is now the same
`createExecutor({ backend: 'bridge', model: 'pi/...' })` call every other
harness uses.
Removes `piExecutor`, `PI_RUNTIME`, `piSeamKey`, `PiSeam`, `PiExecutorOutput`,
`preparePiMcp`, `piMcpAdapterAvailable`, `buildPiMcpServers`, `PI_MCP_ADAPTER`,
`PI_MCP_ADAPTER_ENV`, `PI_MCP_CONFIG_FLAG`, `PiMcpMount`, `PiMcpMountOptions`,
`PiMcpPreparation`, `PiMcpReceipt`, the `{ backend: 'pi' }` `ExecutorConfig`
arm, and the registry's pre-registered `'pi'` runtime.
The bridge is stricter on profile fidelity, so a pi backend now falls under
`fullProfileMaterialization` rather than the prompt-and-model-only contract:
reasoningEffort, tools, resources, and systemPrompt reach pi natively instead
of being dropped. `WORKER_TRACE_PROPAGATION` loses its `pi: true` row because
the bridge exposes no environment channel to the worker.
The accepted losses (progress/traceSource, turn-boundary steering, seam
args/env/bin) are named in the changelog.
… executor #687 edited pi-executor.ts (describeArgs -> describeToolArgs), so the merge brought the file back against this branch's delete. Re-deleted. Kept main's progress imports, which the new observability code needs. Two comments named piExecutor as the only path with true tool durations. That is now a property of a harness protocol that reports tool completion, not of a particular executor.
This was referenced Aug 1, 2026
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.
−3,360 / +50 across 16 files. cli-bridge already routes pi generically (
matches(m) => m === 'pi' || m.startsWith('pi/')), so a second pi-only code path was duplication. A pi worker is nowcreateExecutor({ backend: 'bridge', model: 'pi/<provider>/<model>' })— the same call every other harness uses.BREAKING, released as 0.118.0.
What went
Both source files (
pi-executor.ts880,pi-mcp.ts534), both test files, 15 public exports, the{ backend: 'pi' }ExecutorConfigarm with its threeswitchcases, and the registry's pre-registered'pi'runtime. The brief named 8 exports; the other 7 came from the samepi-mcpblock and were found by compiling, not by grepping.Two sites the compiler found that a grep would have missed
supervise.ts:187classifiedbackend: 'pi'aspromptModelProfileMaterialization— prompt-and-model only, matching whatpiExecutordocumented itself as dropping. Removing that arm means pi now falls underfullProfileMaterialization. That is the profile-fidelity upgrade made enforceable: a profile that changesreasoningEffort,tools, orresourcesis now honored instead of silently rejected atworkerFromBackend.worker-trace.tsholdsWORKER_TRACE_PROPAGATION ... satisfies Record<ExecutorConfig['backend'], boolean>. Itspi: truerow became an excess property the moment the arm went, along with two prose lines namingPiSeam.envand a backend count that was off by one.Migrated, not deleted
tests/runtime/executor-config-snapshot.test.ts— thepicase asserted that anExecutorConfigis captured at its call boundary. That behaviour still exists for pi on the generic path, so the case becamepi-over-bridgewith a real pi wire id. Zero assertions lost.src/runtime/environment-provider.test.tswas listed in the brief as a consumer and is deliberately untouched — itsbackend: 'pi'is theBackendTypeon the provider input, notExecutorConfig.backend.'pi'remains a valid harness; only the bespoke executor is gone. Editing it would have destroyed real provider-path coverage.The 49 deleted
it()blocks went with their subject: they test the pi RPC protocol adapter and the--mcp-configwriter, neither of which exists here any more. cli-bridge has its own implementations with its own tests.What improves, and what regresses
Better — all four were dropped outright by the old executor:
reasoningEffort→--thinking,profile.tools→--exclude-tools,profile.resourcesmaterialized,systemPromptas a native--system-promptfile rather than glued onto the task text.Worse, stated in the changelog so nobody is surprised — mid-turn steering degrades (the bridge runs pi as
--print --mode jsonwith stdin closed, so a steer lands after the run and an interrupt is a process-tree kill);PiSeam.args/env/per-workerbinhave no wire equivalent;WORKER_TRACE_PROPAGATIONloses itspi: truerow, so a pi worker no longer inheritsTRACE_ID/PARENT_SPAN_ID.progress()andtraceSource()are absent onbridgeExecutor— for every harness, not just pi. Fixed in #687, which should land first.Downstream, none broken until they upgrade
src/pi-worker.ts,extensions/pi/loops.ts. The real migration; steering is a behaviour change, not just a call-shape change.bench/deepswe/live.ts:193, one call site.Not edited here, so the release can be sequenced.
Gates, re-run independently
tsc 0 · examples tsc 0 · 2227 passed / 6 skipped across 197 files · biome clean (535 files) ·
docs:checkOK, no drift ·check:testing-fixturecurrent · merges clean intoorigin/main, 0 behind.