Name the fork build with SemVer build metadata - #238
Merged
Conversation
The deployed binary is a fork build carrying two local patches, but it reported a bare 1.18.23, attributing fork-only behaviour to upstream in health, --version, the LLM User-Agent, MCP clientInfo and the durable per-session version field. Pin and report 1.18.23+dca.2 instead. Build metadata rather than a prerelease: OpenCode gates plugin loading on semver.satisfies, where a prerelease sorts below 1.18.23 and fails ranges like >=1.18.0, while build metadata is stripped before comparison. Also fix scripts/dev.sh, which extracted only MAJOR.MINOR.PATCH from the pin and would have warned about skew on every start.
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.
Summary
The deployed OpenCode binary is a fork build carrying two local patches, but it reported a bare
1.18.23. That string is what/global/health,--version, the LLMUser-Agent, MCPclientInfoand the durable per-sessionversionfield all report, so every one of them attributed fork-only behaviour — including atask.modelparameter stock 1.18.23 does not have — to upstream.The build now reports
1.18.23+dca.2, and the pin follows it.Why build metadata, not a prerelease
enginesranges1.18.231.18.23-dca.1>=1.18.01.18.23+dca.2OpenCode gates plugin loading on
semver.satisfies. A prerelease only satisfies a comparator set when a comparator with the samemajor.minor.patchalso carries a prerelease, so1.18.23-dca.1would fail an ordinary>=1.18.0range and any plugin declaringengines.opencodewould throw at load. Build metadata is stripped before comparison, so precedence is identical to the release. This also matches what upstream already does for its own non-published builds innix/node_modules.nix.<n>counts the fork patch set: 1 is the deny-inheritance fix from closed-unmerged anomalyco/opencode#45064, 2 is the taskmodelparameter from leoncheng57/opencode#4.scripts/dev.shThe pin was extracted with a bare
MAJOR.MINOR.PATCHregex while the server's version was read whole, so a+dca.2pin would have printed! version skewon everynpm run dev. A warning that always fires is worse than none, especially when this one is the signal that catches an accidental fallback to a stock binary — which silently reintroduces the #75 deny-inheritance bug. The pin is now captured verbatim, with regression tests in both directions.Verification
npm run typecheck— VERIFIEDnpm test— VERIFIED: 1186 passed, 2 skipped, 66 filesnpm run build— VERIFIEDCI=1 PORT=3581 MOCK_OPENCODE_PORT=4784 MOCK_PREVIEW_PORT=4785 npm run test:e2e— VERIFIED: 364 passed, 1 skipped, 1 flaky (settings and tools UI > badges unresolved notifications, unrelated to versioning, passed on retry)npm run test:preview— VERIFIED: 1 passedOPENCODE_VERSION=1.18.23+dca.2 OPENCODE_CHANNEL=prodand verified it in isolation on a throwaway port:/global/healthreports1.18.23+dca.2, and the task tool still advertises an optionalmodelparameter absent fromrequired. The live server on 4097 was not touched.Human verification
npm run devagainst the fork server. Expected: no! version skewline. Failure: a skew warning naming the same two versions.1.18.23+dca.2. Failure: a bare1.18.23.Deployment
Not applied. The new binary is installed at
~/.opencode/bin/opencode-1.18.23-dca.2alongside its rollback artifacts, but the LaunchAgent still points atopencode-1.18.23-dca-taskmodeland no service was restarted.