Uh oh!
There was an error while loading. Please reload this page.
feat(headless): add OpenCode Pier arm for DeepSeek-metered full DeepSWE - #1731
Merged
Conversation
Astro-Hanforce-pushed
the
feat/headless-opencode-pier-arm
branch
from
August 1, 2026 03:57
7e828da to
0113e3aCompareAstro-Han
changed the base branch from
feat/headless-deepseek-flash-runtime
to
mainAugust 1, 2026 03:57
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Summary
Stacks on #1730 (the
deepseek-v4-flash-maxruntime profile). Makesdeep-swe-1.1-full | deepseek-v4-flash-max | opencoderunnable end to end: an external runner can now execute the full 113-task DeepSWE v1.1 leaderboard set, Maka vs OpenCode, both on DeepSeek V4 Flash at max reasoning with metered official-API billing.DeepSWE executes under Pier, and OpenCode had no Pier arm —
PierAgentwasmaka | kimi-code | codex, andopencode_agent.pywas built on the plain-Harbor tree only. This PR ports the arm following the exact seam #1398 cut for Codex:opencode_agent.pymoves ontoharness_compat(pier tree under Pier, harbor tree under plain Harbor — the trees are type-incompatible and Pier'sTrialResultrejects harbor-treeAgentInfo), and implements the Pier-requiredinstall_spec()(None — the pinned toolchain is bind-mounted and checksum-verified, never reinstalled from the network) andnetwork_allowlist()(host provider proxy only, no fallback domain)pier-task-runner.tsgains theopencodearm: pinned-toolchain mount at/opt/maka-opencode-toolchain, adapter version pinned toOPENCODE_TOOLCHAIN_SPEC, toolchain fingerprint andMAKA_OPENCODE_VARIANT(reasoning effort) forwarded via--ae; provider auth flows through the per-attempt host proxy lease (env-file only, never argv) like every competitor armdeep-swe-1.1-full | deepseek-v4-flash-max | opencode→ run iddeepseek-v4-flash-maka-vs-opencode-deepswe-full-v1Verification
packages/headlesssuite: 1453 pass / 0 fail (new: 4 OpenCode Pier-arm runner cases — adapter import path, version pin, toolchain mount requirement, proxy/toolchain/variant wiring; 1 composition case)harbor/tests/test_harness_compat.py: 9 pass / 0 fail under the Pier venv (new: OpenCode network-shape + install_spec case; the tree-contract test now covers all four adapters), 4 pass + 4 skips under plain Harbor — historical shape preservedbenchmark=deep-swe-1.1-full (113 frozen tasks via pier); runtime=deepseek-v4-flash-max (deepseek/deepseek-v4-flash, max, metered); competitor=opencode@1.17.18npm run format/npm run lintcleanReview response
External review (reproduced against the real Pier venv) found three defects in the first revision; all fixed in
d34f8a1ab:deepseek-v4-flash) via-m, but the OpenCode adapter requiresprovider/model— every competitor cell would have failed before any model call. The runner now reuses the Harbor runner'smodelForOpenCodeseam for the opencode arm.--ak version=…like Codex, so trial/trajectory metadata records1.17.18instead ofunknown.host.docker.internaldoes not resolve on native Linux Docker. NewMAKA_HARNESS_AB_PROVIDER_PROXY_ADVERTISED_HOSTenv feeds the existingproviderProxyAdvertisedHostseam (e.g.172.17.0.1), documented in the README.New test coverage: argv asserts
-m deepseek/deepseek-v4-flashand--ak version=…on the opencode wiring case; a hub-options resolver case for the advertised-host env.Second review round (fresh eyes, verified against the real Pier venv and pier's docker.py):
7e828da9b— container-log hydration: Pier's explicit--mounts-jsonreplaces the default/logsbind-mount (pierenvironments/docker/docker.py), so the OpenCode CLI stream stayed inside the container;_error_messages()and trajectory/cost parsing would have seen nothing and misclassified real provider errors. The adapter now downloads/logs/agent/opencode.txtbefore the error-event check and again inrun()'s finally — the same seam the Kimi and Codex arms already carry. New adapter test pins remote path, host target, and idempotence under both interpreters.systemPromptHashon competitor cells: all three competitor adapters (kimi, codex, opencode) record the controller prompt hash fromMAKA_SYSTEM_PROMPTwhile the CLIs run with their native prompts; that is the established execution-identity contract on main, and the published TB2.1 report (docs: publish DeepSeek Flash Terminal-Bench comparison #1719) was produced under it. Changing the semantic in this PR would make new runs incomparable with published results. If the identity should become model-visible per arm, that is a cross-cutting change for all arms and deserves its own PR.Review focus
The plain-Harbor OpenCode path (Terminal-Bench 2.1 × DeepSeek, #1730) must stay behavior-identical: the harness_compat switch selects the harbor tree when pier is absent, and the adapter's run logic is untouched — verified by the existing stub contract and the harbor-tree test run.