- Bump all active workflows to action versions that natively target Node 24:
checkout@v6, setup-node@v6, cache@v5, upload-artifact@v7, download-artifact@v8.
Resolves the "Node.js 20 is deprecated" warning in CI logs. The kept
`FORCE_JAVASCRIPT_ACTIONS_TO_NODE24` env stays as a no-op safety net (also
in upstream OpenCode).
- test-runner: when running under GitHub Actions, emit a `::warning::`
annotation per flaky file and append a markdown table to
`$GITHUB_STEP_SUMMARY`. mikepenz/action-junit-report already surfaces
failures from the JUnit XML, but flakies pass cleanly on retry and were
invisible in the UI.
The per-file JUnit merge was walking `<testsuite>` tags by hand and closing
on the first `</testsuite>` it found. Bun's junit reporter nests one
`<testsuite>` per `describe` block inside an outer `<testsuite>` for the
file itself, so the inner close was matched and the outer one got dropped.
Every file contributed one unclosed `<testsuite>` to the merged output,
pushing XML depth up until mikepenz/action-junit-report's sax parser
failed with "Unexpected close tag" (and xmllint with "Excessive depth").
Switch to grabbing everything between the outer `<testsuites ...>` and
`</testsuites>` of each file's XML — nested structure is preserved
verbatim, no custom walking needed. Read aggregate counts from the root
`<testsuites>` attributes so nested `tests="..."` attrs don't get
double-counted either.
Validated locally: `xmllint --noout` passes on the merged output for a
mix of files with and without nested describes.
- Lower default runner concurrency from `os.cpus().length` to `min(4, cpus)`.
The bottleneck in CI is shared resources (OAuth callback ports, global
filesystem like `~/.local/share/kilo`), not CPU, so eight parallel Bun
processes were triggering port/FS races instead of going faster.
- Raise per-test timeout from 30s to 60s. Slow `spawn` on Windows was
tripping the 30s limit on tests that were just slow, not broken
(e.g. `session/prompt.test.ts` at ~86s, `provider/provider.test.ts` at ~54s).
- Retry failing files once and surface them as FLAKY in the summary plus a
dedicated section. Bugs still fail on every attempt; contention recovers.
- Drop CI runners from 8vcpu to 4vcpu to match upstream OpenCode — with
concurrency capped at 4, the extra cores bought us nothing.
Move the initialization of the MCP OAuth callback server from the layer setup to the point where browser authentication is actually required. This prevents unnecessary port binding when authentication is not needed.
Additionally, improve the test runner's XML parsing to correctly handle multiple testsuite attributes and ensure tags are matched accurately.
- Update `packages/opencode/src/mcp/index.ts` to call `McpOAuthCallback.ensureRunning` only upon `UnauthorizedError`.
- Refactor `packages/opencode/script/test-runner.ts` to use a more robust `open` and `sum` logic for test results.
- Add verification to `packages/opencode/test/mcp/oauth-auto-connect.test.ts` to ensure the callback server remains inactive when not needed.