Repository navigation
feat(runner): add OpenCode as a read-only external provider (#68) - #202
Conversation
Restores the OpenCode adapter from 08556cd. Before the authentication preflight, the runner now reads OpenCode's merged configuration with `opencode debug config --pure` under the lane's environment and refuses the lane unless it equals the run-owned read-only lockdown, so a managed, remote, home or project layer cannot add MCP servers, LSP commands, plugins, provider routing or agent changes. The verifier's route patterns accept OpenCode's `/` model IDs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merge Protections🟢 All 2 merge protections satisfied — ready to merge. Show 2 satisfied protections🟢 Queue ready pull requestsAutomatically queue non-draft pull requests targeting main after verify, Unfret, and live-gate pass on the head and every review thread is resolved.
🟢 🚦 Auto-queueWhen all merge protections are satisfied and these conditions match, this pull request will be queued automatically.
|
Live evidence: Open Pstack
|
|
[Medium impact] No new code defect was established that requires a change before merging. SummaryAdds OpenCode as an opt-in external provider for read-only lanes.
ericlitman accepted removing the guard and allowing managed, remote, and repository configuration to affect lanes. ericlitman also pre-accepted the missing- The merge bases differ, so this review used the full PR diff for new-issue discovery. Previous thread bodies and states were not supplied and could not be retrieved; no numbered previous-finding determinations are recorded. No runtime tests were executed. Reviews (2) · Last reviewed commit: "Merge origin/main for #205's REVIEW.md r..." · Reviewed by Greptile |
✅ Accepted riskAccepted by ericlitman: GH-68 (authority 48fa77b) 🟡 Medium · Streams without a step start are marked complete Advisories (1)
DetailsRun: @unfret review · @unfret status · @unfret help |
There was a problem hiding this comment.
🛑 3 blocking findings
🔴 Critical · Guard copies the full resolved OpenCode config, including credentials, into the receipt
🔴 Critical · Remote configuration can bypass the read-only guard
🟡 Medium · Streams without a step start are marked complete
Check
…usal (#68) Read-only means the read-only settings pstack passes to OpenCode (#203). OpenCode lanes no longer refuse a repository holding .opencode/ or a host whose merged configuration differs from the lockdown; the guard's tests and recorded fixtures go with it (approved by Eric, 2026-10-16). The catalog notes say what managed, remote, stored-login and repository configuration still load and what each was measured to do. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Live evidence: Open Pstack
|
There was a problem hiding this comment.
🛑 2 blocking findings
🔴 Critical · Lockdown leaves built-in LSP servers on, so reads run repository code
🟡 Medium · Streams without a step start are marked complete
Check
|
@unfret review |
There was a problem hiding this comment.
🛑 1 blocking finding
🟡 Medium · Streams without a step start are marked complete
Check
|
Waiver for head 095b127 (OpenCode, #68). The one blocking finding on this head, v1:51170472aa4e59fffc7bdc87b65830d1164d53d8bd3ffbafb46afca3bd319b1b "Streams without a step start are marked complete", is classed pre-accepted:
The round's other findings are advisory (the verifier's Live gate on this head: success (issue comment 6222108889). |
|
@Mergifyio refresh |
✅ Pull request refreshed |
Merge Queue Status
This pull request spent 10 seconds in the queue, including 1 second running CI. Required conditions to merge
|
Summary
Adds OpenCode as a read-only external provider, restored from
08556cd(reviewed in #196). Under #203 (merged as #205), a read-only lane means the read-only settings pstack passes to OpenCode; the runner adds no refusal or guard because of the operator's own host, account, repository or organization configuration, and the catalog notes say what that configuration can do. Closes #68.deepseek-v4.1-flash-free(OpenCode Zen, no key), efforts low, high, max, default max. Stored logins authenticate other OpenCode models as the user has them. Proof is the pinned argv..opencode/refusal. Round 1'sdebug config --pureguard, its tests and its nine recorded fixtures are removed (Eric approved the removal, 2026-10-16)..opencode/plugins/*.js, whose top-level code runs even with--pureand the project-config switch; stored logins./in a model ID, and the catalog recipe gains one OpenCode lane, so this PR is verifier-changing.Evidence
pstack-runner --parent claude --provider opencode --model opencode/deepseek-v4.1-flash-free --effort max --mode read-only):complete, preflight passed, output equal to the fixture's marker..opencode/opencode.json: exit 0,complete, no refusal, output equal to the marker..opencode/plugins/canary.jsunder the lane's environment and--pure: its top-level code ran (marker written) and its plugin function did not, which is what the notes say.opencode.test.ts(launch, environment, preflight, parser,adapterSuite);run.test.tsruns the preflight and the model with one config, environment and cwd, and runs a lane in a repository holding.opencode/and anopencode.jsonthat the environment turns off.095b127from its candidate checkout with--self-test, 12 planned sessions: evidence comment. The Claude and Codex parents each dispatchedopencode:opencode/deepseek-v4.1-flash-free@maxread-only through the installed launcher; both lane receipts readcompletewith preflightpassed, and both parents resolved the catalog sheet's OpenCode descriptor as an external route.Merge Danger
Door: two-way. A new provider that no default role uses; reverting removes it.
Blast Radius: opt-in. Only a model sheet that names
opencode:...reaches it. On a host or account whose OpenCode configuration adds tools, servers or routing, a lane gets them, as the notes say.Live gate
Run from a checkout of this PR's head with
--self-test, because the PR changes the verifier (AGENTS.md); the publisher revision equals the candidate SHA. 12 planned sessions, within the verifier's limit.claude:runner,codex:runnerwith--runner-route opencode:opencode/deepseek-v4.1-flash-free@maxclaude:catalog,codex:catalog/; each parent must resolve it as an external route.project-skillin both harnesses (automatic)No
setup: setup's behavior does not change.Acceptance criteria
opencode/deepseek-v4.1-flash-free... with pstack's own lane settings ..., stored logins as the user has them, and no pre-launch guard or.opencode/refusal"opencode.test.ts; the two direct live lanes; the exact-head live gate..opencode/plugin, and anything else OpenCode 1.19.1 reads, and that these can add tools, servers or routing to a lane."references/model-catalog.mdOpenCode notes, from the batch-158 measurements; the repository-plugin note re-measured on this branch.opencodeCLI, provide the necessary configuration and invocation logic, handle missing installations with a clear error"executable: "opencode"(a missing binary isunavailable-cli), run-owned config and argv;adapterSuiteandrun.test.ts.bun run test457 pass, including every existing provider's suite.references/model-catalog.md;opencode.test.ts,run.test.ts,registry.test.ts.Unfret rebuttal
Review round 1 (head
e679251)step_start(medium): pre-accepted; needs output no OpenCode capture shows.catalog.mdrole count: advisory.Gate results
On head
095b127(58ad12fplus a merge of main for #205'sREVIEW.mdsentences), from the worktree root:bun run testbun run typecheckbun run statictsc --strictclaude plugin validate plugins/pstackNot verified
/api/config: no managed Mac and no console account here; the notes say these are from OpenCode's source.🤖 Generated with Claude Code