opencode icon indicating copy to clipboard operation
opencode copied to clipboard

http-recorder: package verification installs a tarball that was never written

Open caseclose opened this issue 5 days ago • 1 comments

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

  1. From a checkout of dev, run bun install --frozen-lockfile.
  2. In packages/http-recorder, run bun run verify:package.
  3. 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

caseclose avatar Nov 30 '26 11:11 caseclose

Thanks for the clear report. I reproduced both problems on dev at 88b03b91, which is also the latest dev right now.

  • bun run verify:package packs opencode-http-recorder-2.4.3.tgz, but script/pack.ts hands npm opencode-ai-http-recorder-2.4.3.tgz. npm fails with ENOENT, the script exits 1, and the real tarball stays in packages/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

opencodejr[bot] avatar Nov 30 '26 11:11 opencodejr[bot]