Skip to content

ci: run every package's tests, not five of them - #108

Merged
filipeforattini merged 7 commits into
mainfrom
fix/ci-runs-every-suite
Sep 4, 2026
Merged

ci: run every package's tests, not five of them#108
filipeforattini merged 7 commits into
mainfrom
fix/ci-runs-every-suite

Conversation

@filipeforattini

@filipeforattini filipeforattini commented Sep 4, 2026

Copy link
Copy Markdown

What was happening

turbo.json declared the test task for exactly five names:

"opencode#test", "@reddb-io/redcode-core#test", "@reddb-io/redcode-app#test",
"@reddb-io/redcode-ui#test", "@reddb-io/redcode-session-ui#test"

opencode#test has matched nothing since the rename, so bun turbo test — the entire unit job —
never ran packages/redcode or packages/tui, the two largest suites in the repo. That is
not a hypothetical: the projection regression I shipped in #96 broke three TUI tests and CI stayed
green; I found it by running them by hand.

The change

One test task declaration instead of five per-package ones, so every package with a test script
is covered — 30 suites instead of 5 — and the job timeout goes to 35 minutes to match.

What to expect from this PR's own run

This is the first time most of these suites have run in this job, so CI is the arbiter here rather
than my machine. Running the whole workspace locally surfaced three failures, all of which look like
load artifacts of many suites running at once rather than broken code:

  • sdk-next — "embedded client uses the real router and handlers", timed out at 5074 ms against a
    5000 ms limit while booting an embedded server;
  • core — "WebFetchTool registration › returns an error result when HTML-to-Markdown conversion
    throws", 8999 ms; the same suite passes 1143/1143 when run on its own;
  • app — "last-turn diff source requests session diff".

If CI reproduces any of them they are real and get fixed here; if it does not, the suites go in as
they are. Either way the answer arrives from a machine that is not this one.

https://claude.ai/code/session_01U29Yk1UscZJ5ZVBXV1Sn8b


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

turbo.json declared `test` for five task names, one of which — `opencode#test`
— stopped matching anything at the rename. The main package and the TUI have
not run in CI since: a regression I shipped in #96 broke three TUI tests and
nothing noticed until I ran them by hand.

Declare the task once so every package that has a test script runs it, and
raise the job timeout to match the new scope.

Claude-Session: https://claude.ai/code/session_01U29Yk1UscZJ5ZVBXV1Sn8b
The turbo `test` task was declared for five names, one of which — `opencode#test`
— stopped matching anything at the rename, so the main package and the TUI have
not run in CI since. Declaring it once covers all 30 suites.

Turning them on surfaced two real defects, both mine:

- mise detection matched any `mise/installs` path, so a machine whose Bun comes
  from mise called every install mise-managed;
- a source-text assertion pinned the exact shape of the worker's `env` literal
  and broke when #103 added a key, while saying nothing about whether the
  environment still reaches the worker.

Keep `^build` only on the four tasks that already had it: the generic task made
every test run build the release binaries.

Claude-Session: https://claude.ai/code/session_01U29Yk1UscZJ5ZVBXV1Sn8b
@blacksmith-sh

This comment has been minimized.

- `redcode run`: #98 made an unknown finish continue the turn instead of ending
  it in silence, which is the recovery we want; the two tests still pinned the
  old shape. They now assert the recovery and what must not change with it.
- `httpapi-codegen`: expectations pinned "/" separators and read a fixture
  directory through `URL.pathname`, which is "/C:/..." on Windows. Neither had
  ever run there.

Claude-Session: https://claude.ai/code/session_01U29Yk1UscZJ5ZVBXV1Sn8b
…et Linux box

Everything here failed for a reason unrelated to what the test was checking:

- TUI frame captures gave up after 125 ms and command registration after 250 ms,
  so the whole-suite run read a blank frame as a broken component;
- `tool.write` asserted 0644, which is only what a umask of 022 produces —
  forcing the mode would be worse than the bug, so the test now follows umask;
- the codegen fixture compared bytes across a CRLF checkout;
- the webfetch converter test builds 10,000 nested divs on purpose and the
  embedded-server suite boots a server per test, both against a 5 s default.

Claude-Session: https://claude.ai/code/session_01U29Yk1UscZJ5ZVBXV1Sn8b
…e_modules

`packages/client/node_modules` does not exist on the Windows runner — the
installer hoists to the workspace root — so the file threw at import time and
the whole suite failed before a test ran.

Claude-Session: https://claude.ai/code/session_01U29Yk1UscZJ5ZVBXV1Sn8b
Both tests build paths with `path`, and both asserted the result with a
hard-coded "/". They described a POSIX machine, which is the only kind they had
ever run on.

Claude-Session: https://claude.ai/code/session_01U29Yk1UscZJ5ZVBXV1Sn8b
…e way PowerShell needs

- `@reddb-io/redcode#test` spawns the real CLI, which reads generated SDK
  sources; without `^build` it read a file that had not been generated yet.
- One shell test built a quoted command without the call operator that the
  helper beside it already applies, so PowerShell parsed the path as a string
  and the first flag as a syntax error.

Claude-Session: https://claude.ai/code/session_01U29Yk1UscZJ5ZVBXV1Sn8b
@filipeforattini
filipeforattini merged commit 95297f3 into main Sep 4, 2026
8 checks passed
@filipeforattini
filipeforattini deleted the fix/ci-runs-every-suite branch September 4, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant