Repository navigation
opencode: 1.19.4 -> 2.2.5 (CLI moved to packages/cli; triage pkgscan FP) - #1264
Conversation
The nightly bump has failed since 10-31 for two reasons: - pkgscan gate: Critical CredentialAccess `.aws/credentials` in packages/gui-plugins/src/browser/policy.test.ts:35-37. These are the negative cases of a sandbox test (fileURLWithin must refuse the path, also via ../ and %2e%2e traversal). Recorded in pkgscan-allow.toml, pinned to the file's sha256. - opencode 2.x moved the CLI from packages/opencode to packages/cli and build.ts now writes dist/cli-<os>-<arch>/, so build.sh would fail on `cd packages/opencode`. Follows upstream's nix/opencode.nix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reached
This review includes 3 billable files and costs up to $0.75.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 9 minutes for your next included review. View limit details
|
There was a problem hiding this comment.
The v2.2.5 tag archive hashes to 04621edf…4fba. packages/gui-plugins/src/browser/policy.test.ts hashes to the pinned 03b90443…4691, and lines 35-37 are the negative cases of a bun:test sandbox test. That test came in with #55246, and nothing in packages/cli imports it. The build change matches upstream: nix/opencode.nix at v2.2.5 runs the same build.ts in packages/cli, and build.ts names its output dir cli--. The build bot rebuilt opencode, and the smoketest passed on amd64 and arm64. This approval takes the 2.x line: upstream's GitHub release marked latest is still v1.19.5, so don't merge this if you want to stay on 1.x.
Why the bot could not bump this
pkgmgr has tried opencode 1.19.4 -> 2.2.5 since 2026-10-31 and aborted each time. Runner execution
pkgmgr-runner-tskh4:Since then auto-fix has skipped it as
in-flight, because thefailedaction state parks it.There are two separate problems, and this PR fixes both.
1. pkgscan Critical (false positive)
I re-ran
pkgmgr pkgscan diff opencode --old 1.19.4 --new 2.2.5in the production runner image (pkgmgr:0b705d3-sc2e851aa, Cloud Build2cfb3f5b). It found exactly three Criticals, all the same thing:packages/gui-plugins/src/browser/policy.test.ts.aws/credentialsThose lines are the negative cases of the GUI browser plugin's file-root sandbox test:
The file is a
bun:testfile, added in anomalyco/opencode#55246, and it is not in the CLI binary. It is recorded inpkgscan-allow.toml, pinned to the file's sha256 (03b90443…). That regrades the finding to Medium; it does not hide it. Every other finding in the diff is Info. The 10-31 run was 6.3h after the release, so the recency signal was Medium and was not the cause.2. build.sh: the CLI moved
In opencode 2.x the CLI moved from
packages/opencodetopackages/cli, andscript/build.tsnow writesdist/cli-<os>-<arch>/bin/opencode. The old build.sh would have failed oncd packages/opencode. This PR follows upstream'snix/opencode.nixat v2.2.5, which runs the samebun --bun ./script/build.ts --single --skip-installinpackages/cliand installsdist/cli-*/bin/opencode. Config and data paths (~/.config/opencode,~/.local/share/opencode) are unchanged.Review notes
opencode-ai, the release marked "latest" is still 1.19.5. 2.x ships as@opencode/cli(latest = 2.2.5), and it is what upstream's README now tells users to install. 2.x drops thecompletionsubcommand (it is now--completions). If we would rather stay on 1.x for now, close this PR and bump to 1.19.5 instead. The bot will keep offering 2.x either way.04621edf6c47c2c7a36982ef39914d482c16977708fbd7b779f49f928bdc4fbais the GitHub tag archive for v2.2.5. The same download path reproduces the 1.19.4 pin byte-for-byte./buildis the first real build.🤖 Generated with Claude Code