Skip to content

test(client): import-boundaries spawns nonexistent bun work subcommand (deterministic, outside CI test tasks) #724

Closed

Description

@agenteinstinct1-max

Observed

packages/client/test/import-boundaries.test.ts fails deterministically: at line 57 (bundleInputs, called from :15) it spawns <bun> work <entry.ts> --target=browser --format=esm --packages=bundle --metafile=… --outdir=… and the child exits 1 with stderr error: Script not found "work". Line 42 hardcodes "work" as the subcommand.

  • bun work --help → error: Script not found "work"; bun build --help works. Bun 1.3.14 has no work subcommand; all the flags used are bun build flags.
  • Reproduces in ~11 ms, with and without the rest of the suite.

Why CI never sees it

The linux unit job declares 18 packages in scope but runs only 7 test tasks (@opencode-ai/script, @opencode-ai/core, @opencode-ai/tui, silvercode-ai, + 3); @opencode-ai/client has no test task in that set, so this failure is invisible to CI. Verified against job 124556838520 logs.

Caveats on the observation

  • Found in an Arena sandbox run of the full workspace suites at dev-vibecoded tip 3d4c83f (tree 8328aab672e16ce9ac125bd622eef8cb12bf7850), 8110 pass / 1 fail / 8175 total.
  • Sandbox bun was the npm-distributed 1.3.14 build (GitHub release assets blocked there); CI uses the baseline build. Same version pin, but the binary source differs — worth confirming on a dev machine.

Investigation directions (no fix chosen here)

  1. Intent is probably bun build (every flag is a build flag) — if so, one-word fix plus a check that the bundle output assertions still mean something.
  2. Or the test meant to invoke a repo-local work entry/script (Build → Work rename era, ref fix(agent): legacy build alias and finish work rename #7) that no longer exists — then the test needs re-pointing at the real CLI entry.
  3. Do NOT resolve by skipping the test: the import-boundary metafile assertions are the actual coverage.
  4. Separately worth deciding: whether @opencode-ai/client unit tests should join the CI test tasks (that is a workflow decision, not part of this fix).

Final acceptance

The deterministic nonexistent-command defect is fixed by merged PR #803, commit 75c9d61. It changes only work to build, retaining all ten metafile assertions, arguments and the original 5000 ms client test budget. The merged tree is identical to independently reviewed source 453cb7a.

Fresh post-merge isolated execution: full client suite 16 pass / 0 fail / 75 assertions; boundary test 1 pass / 0 fail / 10 assertions; client typecheck exit 0. The independent pre-merge counterfactual restores work and fails with Script not found work before assertions, then restores the exact reviewed blob. Source-head CI had all five required checks green.

The separate suggestion to add client tests to CI remains a workflow decision, not part of this command repair; no workflow change was made or claimed. Historical unrelated permission-test failure cause remains unproven. The original source PR #741 is not closed by this acceptance.

Merged PR: #803
Acceptance: https://arena.ai/agent/01a19ab6-f664-7e54-bff2-bba6fb140219

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions