fetch:opencode: build from local fork clone pinned by git ref - #91
Merged
jack-champagne merged 3 commits intoJul 8, 2026
Merged
Conversation
Lock gains source=local + ref (merged fork PR #1 head). The fetcher builds from a harmoniqs/opencode clone (sibling ../opencode, AMICODE_OPENCODE_SRC, or --local <path>) after verifying HEAD matches the locked ref and the tree is clean (--any-ref to bypass), then stamps the ACTUAL binary sha256 plus a .source provenance file — replacing the hand-swap workflow that left the stamp lying at the manifest value. No clone present (CI) → falls back to the pinned release download.
jack-champagne
force-pushed
the
jack/opencode-local-source
branch
from
July 8, 2026 00:19
1e02667 to
91e3382
Compare
jack-champagne
changed the base branch from
aaron/problem-workspaces
to
rchari/workbench
July 8, 2026 00:19
Same source (ab0e798) as amicode.2, rebuilt with OPENCODE_CHANNEL=dev so CI and clone-less installs get the amicode UI surfaces by default.
jack-champagne
changed the base branch from
rchari/workbench
to
aaron/problem-workspaces
July 8, 2026 04:33
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.
The vendored opencode now builds from a local
harmoniqs/opencodeclone at a git ref pinned inopencode.lock.json, instead of trusting release binaries. This also fixes the bug that made the releases look broken: binaries built with the documented recipe hid every amicode UI surface (home cards, institution card, v2 titlebar) — see Channel gate below.Lock (
opencode.lock.json):source: "local"+ref= merged fork PR #1 head (ab0e798).repo/tag/platformsstay as the release fallback.Fetcher (
fetch_opencode.mjs):--local <path>>AMICODE_OPENCODE_SRC> sibling../opencode.--any-refbypasses for iteration;--no-buildreuses an existing artifact.OPENCODE_VERSION=<v>andOPENCODE_CHANNEL=dev(see below), bun dir prepended to PATH..sourceprovenance file (local <ref>[+dirty]/release <repo>@<tag>) — replaces the hand-swap workflow that left the stamp lying at the manifest value.--local/--releaseforce a mode.Channel gate (the release bug):
OPENCODE_VERSION=1.17.3(per the fork's AMICODE-PATCHES.md §3 recipe) forcesScript.channel=latest→ the web-UI embed compiles withVITE_OPENCODE_CHANNEL="prod"(app/vite.js) →settings.general.newLayoutDesignsdefaults off (settings.tsx:55) →home.tsx:142rendersLegacyHome: all amicode surfaces hidden at runtime despite being compiled in. Confirmed in the bytes: release amicode.2 and the old recipe both inline the gate asfalse; withOPENCODE_CHANNEL=devit inlinestrue. Every smoke layer (boot, /event, --version, title) passes either way, which is why no gate caught it. Follow-up: fix the recipe in the fork's AMICODE-PATCHES.md.Verified: 14/14 fetcher tests; full suite 430 pass + 1 pre-existing stale-VSIX packaging failure (fails on clean tree too); real end-to-end on linux-x64 — clone at
ab0e798→ build → smoke1.17.3→test:smokePASS → gate constant!0in the vendored binary; homepage cards confirmed rendering in the live extension (Jack).Base is
rchari/workbench(the fork-release machinery + amicode.2 pin aren't onmainyet).