Commit Graph

10 Commits

Author SHA1 Message Date
Catriel Müller f40970557f refactor: renegare sdk 2026-05-06 14:26:06 -03:00
Catriel Müller 0de07760a7 ci: bump actions to Node 24 and surface flaky tests to the UI
- 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.
2026-05-05 12:53:03 -03:00
Catriel Müller 3f5ed52cd3 refactor: include quarantine on the same runner file 2026-05-05 12:53:03 -03:00
Catriel Müller c21a1b855f fix(cli): produce well-formed JUnit when bun emits nested testsuites
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.
2026-05-05 12:53:03 -03:00
Catriel Müller 3d063eb47f test(cli): stabilize flaky unit test CI
- 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.
2026-05-05 12:53:03 -03:00
marius-kilocode c0c982befd test(cli): allow explicit quarantined test runs 2026-05-05 13:47:34 +02:00
marius-kilocode 279a86c2b6 test(cli): quarantine flaky MCP OAuth browser tests 2026-05-05 13:43:00 +02:00
kiloconnect[bot] 325bdae8a4 chore(cli): annotate MCP OAuth fix 2026-05-04 14:29:05 +00:00
kiloconnect[bot] acc30a6458 feat(mcp): defer oauth callback server startup
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.
2026-05-04 14:14:09 +00:00
Catriel Müller d039bdf6c3 feat: test runner 2026-04-15 15:11:33 -03:00