Uh oh!
There was an error while loading. Please reload this page.
build(opencode): release-default vendoring + one-command fork dev loop - #128
Merged
Conversation
Make `pnpm install` / `package` / F5 "just work" off the pinned, features-ON opencode release — no clone, no bun, no ref-alignment. Entering source mode is now an explicit command, never a committed lock edit. - opencode.lock.json: source local → release (keep ref as provenance). Kills the diverged-clone hard-error for everyone not changing the fork; CI is unchanged (it already used the release fallback). - scripts/opencode_dev.mjs (pnpm opencode:build / opencode:pin): rebuild the binary from ../opencode with OPENCODE_CHANNEL=dev and re-vendor it; adopt a cut release by downloading + sha256-verifying both assets and rewriting the lock. - scripts/assert_ui_gate.sh: shared UI-gate check (newLayoutDesigns default ON). release.yml now calls it; ci.yml vsix-gate calls it too — a feature-dead binary reds a PR, not just a release. - AGENTS.md: add "Changing opencode" section; drop the stale testing-branch checkout. Tests: pinFromRelease (fake seam + live release), gate on/off/absent fixtures. Full extension suite 447 pass, typecheck clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…-default # Conflicts: # packages/extension/opencode.lock.json
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.
Why
Making a change and seeing it in amicode was fragile in two ways:
source: localpinned to an opencode ref. If your sibling../opencodeclone sat on any other ref,pnpm install/package/fetch:opencodehard-errored — and the people guaranteed to hit it are exactly those developing opencode.settings.general.newLayoutDesigns, whose default isVITE_OPENCODE_CHANNEL !== "prod". A binary built withOPENCODE_CHANNEL=latestcompiles the features in but hides them — a feature-dead build that looks broken.What changed
opencode.lock.json:sourcelocal → release. A plainpnpm install/package/ F5 now downloads the pinned, features-ON release binary — no clone, no bun, no ref-alignment. CI is unchanged (it already used the release fallback). Entering source mode is now an explicit command, never a committed lock edit (committinglocalwould force clone+bun on everyone and break fork-PR CI).scripts/opencode_dev.mjs(pnpm opencode:build/opencode:pin):opencode:build— rebuild the binary from../opencodewithOPENCODE_CHANNEL=dev(UI gate ON) and re-vendor it.opencode:pin <tag>— adopt a cut release: download + sha256-verify both platform assets and rewrite the lock (automates the old manual bump).scripts/assert_ui_gate.sh— shared UI-gate check, extracted fromrelease.yml. Now called by bothrelease.ymlandci.yml'svsix-gate, so a feature-dead binary reds a PR, not just a release (closing a real CI gap).AGENTS.md— new "Changing opencode (the vendored fork)" section; dropped the stale testing-branch checkout and thesource=localdefault description.Scope note
The "fast source-run" inner loop is intentionally not shipped:
opencode servefrom source reverse-proxies the publicapp.opencode.ai(see the fork'sAMICODE-PATCHES.md§4), so it can't show amicode's branded/gated surfaces. The reliable loop is the one-command rebuild (opencode:build). A true web-UI HMR path (opencode's own vitedev:web, needs amicode webview rewiring) is a possible fast-follow.Testing
test/opencode_dev.test.ts):pinFromRelease(fake seam), gate script on/off/absent fixtures, committed-lock defaults to release.opencode:pin v1.17.3-amicode.4against the live private release (downloaded both assets, shas matched, lock rewritten identically);assert_ui_gate.shagainst the real vendored binary → gate ON; boot smoke →[smoke] PASS.Companion doc PR: harmoniqs/opencode#15 (AMICODE-PATCHES.md §5).
🤖 Generated with Claude Code