Skip to content

Windows CI: native plugin loading test times out because the child's tsx imports take 13-15 s #7656

Closed

Description

@lanjak

Summary

The Windows CI test native plugin server loading > resolves BB-provided externals in a native Node import times out at 15 s in about 1 of 20 CI runs, on main and on PR branches. The progress logging added in #7204 shows where the time goes: the child Node process takes 13 to 14 s, or more, only to import its modules (tsx over the server's module graph). The plugin reload itself never gets the time it needs. The test is not hung, it is slow.

Versions and environment

  • GitHub Actions workflow CI, job Windows tests (server-2, Node 22.x).
  • Runner: blacksmith-4vcpu-windows-2025.
  • main at 7fd9272e95 and 49982f7fbd, and three PR branches.

Steps to reproduce

I could not reproduce it on demand. It happens in CI only:

  1. Look at the failed Windows tests (server-2, Node 22.x) jobs in the runs listed under Evidence.
  2. Search the log for Native plugin child progress.

Expected vs actual

Expected: the test passes. A passing run on Windows takes about 8.3 s (resolves BB-provided externals in a native Node import 8328ms in run 43991224705).

Actual, main at 7fd9272e95 (run 43966244357):

Error: Test timed out in 15000ms.
Native plugin child progress {
  elapsedMs: 15032,
  exitCode: null,
  signalCode: null,
  progress: '{"phase":"imports-ready","uptimeSeconds":13.9291783}\n' +
    '{"phase":"database-ready","uptimeSeconds":13.945133}\n' +
    '{"phase":"service-ready","uptimeSeconds":13.9647358}\n'
}

Evidence

All 5 failures of this test in the last 99 completed CI runs (2026-11-16 01:36 to 2026-11-17 01:15 UTC). Each one timed out at 15 s with the child still running:

Run Branch Last phase reached Time to imports-ready
43933095733 main (49982f7fbd) none more than 15 s
43949347859 feat/grok-stdio-acp-parity imports-ready or later 13.26 s
43966244357 main (7fd9272e95) service-ready 13.93 s
43973765802 acp-stop-model-sweep-4478 imports-ready or later 14.07 s
43991217575 fix-7340-retention-sweep (#7651) none more than 15 s
  • The import phase runs before the first progress marker (test L75-L83). The child starts with --import tsx (L138-L150).
  • In every run with markers, the database and plugin service were ready within 0.04 s of the imports. So imports take almost all of the time.
  • The deadline is the server-wide testTimeout: 15_000 (vitest.config.ts L9).
  • The two other native-loading cases in the file start the same kind of child. They did not fail in these runs.

What you ruled out

  • Not a hang after the imports: with markers, the database and service were ready right after the imports. The remaining time was the reload, and it ran out of deadline.
  • Not caused by the PR branches: two of the five failures are on main.
  • Not a duplicate: no issue found for "plugin-native-server-loading", "resolves BB-provided externals" or "native plugin Windows timed out". Report native plugin child progress when its integration test fails #7204 added the diagnostics and says the cause was not known yet.

Suggested priority and effort

Low priority, small effort. It is a CI flake (about 5% of runs) that turns PRs red, and there is no product impact. Possible fixes: give this test its own longer timeout on Windows, or warm the tsx cache before the child starts.

AGENT GENERATED

Activity

  1. added a commit that references this issue on Nov 17, 2026
  2. added theissue type on Nov 17, 2026
  3. added
    plugins
    partial-repro
    on Nov 17, 2026
  4. bb-slop-cop commented on Nov 17, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Applied classification: Bug · Priority Low · Effort Low · area plugins.
    • Reproduction report: PARTIALLY REPRODUCED · root-cause confidence medium · reproduction label partial-repro.
    • Root cause: independently retrieved main CI logs show child startup reaching the post-import marker at 13.929 seconds against a 15-second enclosing deadline. This establishes budget exhaustion, not why the source-loader startup was slow or whether reload eventually completes.
    • Reproduction probe: pnpm exec turbo run test --filter=@bb/server --force --output-logs=full -- test/services/plugins/plugin-native-server-loading.test.ts. All three cases pass in each of two clean Linux checkouts of trusted main d2fd33885bb3923f3627bb35fd618908008f692e.
    • No pull request: the natural Windows failure was not reproduced on current main, so no failing-before/passing-after regression supports a safe automatic fix.

    AGENT GENERATED

  5. ymichael commented on Nov 17, 2026

    @ymichael
    Collaborator

    closed by #7685

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

    partial-reproplugins

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions