Skip to content

unit-test budget: git- and subprocess-heavy unit tests exceed the 5s budget on a loaded workstation #4469

Closed as not planned

Description

@lex00

Found while running the multi-engine epic-ready suite locally (#4450), on a workstation with other builds running (load average 12 to 27).

The same six files failed and passed by turns, on both main and the integration branch, purely with machine load:

branch load (1m) result for the six files below
integration/choudoufu-engine fb6f309 12.2 11 tests over the 5s budget
main 8cd7346 26.8 2 tests over the 5s budget
integration/choudoufu-engine fb6f309 14.5 158/158 pass

With every worker running (npx vitest run --project unit), 36 tests in 24 files went over; the same set fails on main under the same load. No assertion failed in any run: every failure was the test/unit-test-budget guard ("took N s, over the 5s unit-test budget (chant #2817)"), at 5.0 to 13.6s.

Files: packages/core/src/op/operator.test.ts, op/work-lease-run.test.ts, workspace/ci-green.test.ts, workspace/ci-run.test.ts, workspace/lineage-adopt.test.ts, workspace/lineage-upgrade.test.ts, plus (full-suite run) workspace/ci-green-runs, ci-green-signed, ci-serve, ci-run-index, release-cut*, release-publish, work-lease, work-history, intent-, records-sessions-write, runs, status-*, trust/record-seal, export-import, graph-contract, check-contract, pr-waves-blocked, lexicons/terraform pr-loop.tofu.

Every one spawns git (worktrees, bare remotes, signing) or child processes, so wall time scales with load, not with the code under test. CI's sharded runners don't see it. A check whose verdict flips with load can't be trusted locally in either direction.

Options: move these to *.e2e.test.ts as the budget message suggests, or scale the budget by a measured baseline (for example a calibration spawn at setup), or make the budget a CI-only guard with a local warning.

Activity

  1. lex00 commented on Oct 26, 2026

    @lex00
    ContributorAuthor

    Duplicate of #4472, which has the fuller picture (the CHANT_UNIT_TEST_BUDGET_MS=30000 workaround, the 18-core measurement, and the same file list). The pr-loop.tofu cases listed here are tracked with a likely cause in #4479. Closing in favour of those.

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