Skip to content

ci: run complete local unit proof through existing workers #3238

Closed

Description

@schlessera

Problem

bun run check:pr --all runs the complete unit and integration suite as one bun run test process (localChecks, scripts/check-pr.ts:10), and every later stage (build, browser, layout, endurance, captures, native probes) strictly after it. On a 32-core host the unit tier alone takes roughly two hours, while hosted CI runs the same tiers across parallel jobs in about 20 minutes. The 0.44.0 release fell back to hosted candidate CI as its proof for this reason (#3030).

scripts/unit-workers.ts already runs the suite as concurrent serial Bun processes with per-worker leases (localUnitWorkerCount gives 8 workers on 32 cores / 47 GiB), but the full local run does not use it.

Acceptance criteria

  • check:pr --all runs the complete unit tier through the existing unit-worker runner, with the same file inventory, report validation (validateUnitReports) and BRAIN_REQUIRE_CHROME requirement as the serial run.
  • Stages that do not share an exclusive resource (for example typecheck alongside the unit tier) run concurrently; stages that share Docker, Chrome or the native loop/storage fixtures stay serialized.
  • A missing or failed worker report fails the run exactly as a serial failure does.
  • Wall-clock for check:pr --all on a 32-core host is recorded before and after in the PR.

Scope

Use the existing unit-worker inventory, report validation and worker leases for the full local unit tier. Audit dependencies before overlapping independent stages; keep exclusive Docker/Chrome/native storage work serialized, existing guards and exact failure propagation intact.

Out of scope

No new execution framework, omitted files, relaxed report validation, deadline increases, network-dependent tests, or changes to hosted proof/merge policy. Historical wall-clock figures are reported observations, not this triage’s measurements.

Verification

Inspect localChecks (scripts/check-pr.ts:25-26), localUnitWorkerCount (scripts/unit-workers.ts:15) and validateUnitReports call sites (scripts/unit-workers.ts:344-360). Add focused scheduling/report-failure controls, with restored causal mutations; record comparable before/after full local timing on the requested host when available. Run ordinary focused preflight and complete selected candidate proof. No full local release proof or 32-core timing was run during triage.

Contract impact

Internal local verification orchestration only; preserve CLI/MCP/wire/frontmatter and hosted confirmation semantics. No changes to shipped packages selected.

2026-11-02 triage at main a84d9bfbcb4e608b504aa0a9feb1144ad9a0b77e: Verified serial full-suite selection and existing worker/report machinery, filled scope/exclusions/verification/contract sections from the request. Preserve p2 and native parent #1849; implementation can start without a new product ruling.

Agent-executable verification remaining (access reconciled 2026-11-04)

Implementation is in draft PR #3336, a proof-system change via scripts/check-pr.ts that goes through the serialized lane on main. Two pieces of evidence remain. The current agent machine supplies the required host resources, as verified below:

  1. On a host with unprivileged user namespaces enabled, run bun run test tests/unit-workers.test.ts at the PR head and confirm it passes. Then make the per-worker report read in scripts/unit-workers.ts tolerate a missing file, and confirm the test fails on MISSING_WORKER_REPORT_FAILS_RUN. Restore the file afterwards.
  2. On the 32-core / 47 GiB host, run bun run check:pr --all at c23a5811c and at the PR head. Record both totals and the unit stage's elapsedMs.

Completion evidence: post both actual results on #3336. Host access is now available to the agent; readiness for executing the verification is not a claim that either test or timing run has passed. Landing then follows the proof-system lane: main green, the stability window open, and #3309's turn settled.

2026-11-04 triage at main 53b862123d7b8e4c9d039859fabdc9fc6ad4cd36: Reverified the current serial full-unit path and existing open #3336 handoff; required namespace-enabled and 32-core evidence remains unchanged. No new runtime qualification or implementation is claimed.

Access reconciliation — 2026-11-04: nproc reports 32 CPUs, free reports 47 GiB total RAM, and unshare -Ur true exits 0 in the current agent environment. Root Docker and the native proof image are also available. The original host-access limitation is resolved: remove needs: human and add agent-ready for the specified PR-head positive/missing-report mutation test and comparable full before/after timings. Neither verification has been run by this access check. Preserve the serialized proof-system landing requirements, milestone 0.45.0 and p2; access alone does not qualify or authorize bypassing that lane.

Activity

  1. added
    type: chore
    area: ci
    priority: p2
    on Nov 1, 2026
  2. changed the title [-]check:pr --all runs the complete unit suite in one serial process[/-] [+]ci: run complete local unit proof through existing workers[/+] on Nov 2, 2026
  3. added
    agent-ready
    on Nov 2, 2026
  4. self-assigned this
    on Nov 2, 2026
  5. added this to the 0.45.0 milestone on Nov 2, 2026
  6. schlessera commented on Nov 2, 2026

    @schlessera
    OwnerAuthor

    Claim wi3238-f4c8: working on branch chore/3238-full-local-unit-workers, draft PR #3336 against main. This is a proof-system change (scripts/check-pr.ts), so it waits for the serialized lane: main must be green again (#3315), the stability window must be open, and off-main qualification evidence must be attached. Path collision noted with draft #3309 (same files, also a proof-system squash). Remaining: the hosted run of the new missing-report control and the 32-core check:pr --all before/after timing (both listed in the PR).

  7. removed
    agent-ready
    on Nov 2, 2026
  8. removed their assignment
    on Nov 2, 2026
  9. added
    needs: human
    on Nov 2, 2026
  10. schlessera commented on Nov 2, 2026

    @schlessera
    OwnerAuthor

    Handing off as needs: human. The work is done in draft #3336, but it needs the namespace-enabled test run and the 32-core timing described in the body before it can enter the proof-system lane.

  11. added
    agent-ready
    and removed
    needs: human
    on Nov 4, 2026
  12. self-assigned this
    on Nov 8, 2026
  13. schlessera commented on Nov 8, 2026

    @schlessera
    OwnerAuthor

    Claim wi3238-k7q2: resuming draft #3336 on branch chore/3238-full-local-unit-workers. Plan: refresh it onto current main, run tests/unit-workers.test.ts plus the missing-report causal mutation on this namespace-capable host, record the 32-core check:pr --all before/after timing, then take it through the proof-system lane.

  14. schlessera commented on Nov 8, 2026

    @schlessera
    OwnerAuthor

    Delivered in #3336, squashed as 37123c8e5 on main. Exact-head candidate confirmation run 42491958879 passed at head 6d6826142.

    • check:pr --all now runs its full unit tier through 8 unit workers on the 32-core host.
    • Unit tier: 5,841 s serial at a63e564f0 against 1,551 s with workers at 3832bd1e1. The patch is identical at the merged head.
    • Full --all at the head passed every stage in 5,892 s. The base run stopped after its unit tier because of ui-react: ClampedPre timeline copy-control render test fails when the render directory runs together #3720, so its complete total is an estimate of about 10,250 s. Details are in the PR body.
    • Missing-report control and causal mutation: done (MISSING_WORKER_REPORT_FAILS_RUN).
    • The main run for the squash is in progress.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent-readyarea: cipriority: p2type: chore

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions