opencode
opencode copied to clipboard
http-recorder: package verification installs a tarball that was never written
Description
The HTTP recorder's package verifier fails before it can check the consumer. Bun writes opencode-http-recorder-2.4.3.tgz, but the verifier passes opencode-ai-http-recorder-2.4.3.tgz to npm. It also installs Effect and platform-node from beta.83, while the packed manifest requires Effect 4.1.0.
Steps to reproduce
- From a checkout of dev, run
bun install --frozen-lockfile. - In
packages/http-recorder, runbun run verify:package. - Compare the tarball path printed by Bun with npm's ENOENT. The real tarball remains in the package directory after verification exits.
OpenCode version
dev at 88b03b91
Operating System
macOS (arm64), Bun 1.4.4
Thanks for the clear report. I reproduced both problems on dev at 88b03b91, which is also the latest dev right now.
bun run verify:packagepacksopencode-http-recorder-2.4.3.tgz, butscript/pack.tshands npmopencode-ai-http-recorder-2.4.3.tgz. npm fails withENOENT, the script exits 1, and the real tarball stays inpackages/http-recorder.- With the correct tarball path, the verifier's install still fails. I ran npm by hand with the real tarball and got
ERESOLVE: the packed manifest requires[email protected], but the verifier installs[email protected]and@effect/[email protected].
The script below reproduces both from a checkout. A maintainer will take it from here.
Reproduction script (repro.sh)
#!/bin/sh
# Reproduces anomalyco/opencode#67324 from an opencode checkout.
# Usage: sh repro.sh /path/to/opencode-checkout
set -u
REPO="${1:-/workspace/repo}"
cd "$REPO" || exit 1
echo "commit: $(git rev-parse HEAD)"
bun install --frozen-lockfile >/dev/null 2>&1 || bun install >/dev/null 2>&1
cd packages/http-recorder
rm -f ./*.tgz
bun run verify:package
echo "verify:package exit code: $?"
echo "--- tarballs left in packages/http-recorder:"
ls -1 ./*.tgz 2>/dev/null || echo "(none)"
echo "--- packed manifest dependency ranges:"
for f in ./*.tgz; do
[ -f "$f" ] && tar -xOzf "$f" package/package.json | grep -A4 -E '"(dependencies|peerDependencies)"'
done
echo "--- versions the verifier installs:"
grep -n 'beta.83' script/verify-package.ts
Run it: sh repro.sh