Skip to content

feat(sovereign-ci): opt-in cargo nextest run (Phase 2 §4.3)#26

Merged
noahgift merged 1 commit into
mainfrom
feat/nextest-opt-in
Apr 18, 2026
Merged

feat(sovereign-ci): opt-in cargo nextest run (Phase 2 §4.3)#26
noahgift merged 1 commit into
mainfrom
feat/nextest-opt-in

Conversation

@noahgift
Copy link
Copy Markdown
Contributor

Summary

  • Adds workflow_call boolean input use_nextest (default: false) to the shared test job.
  • Safe fallback: if nextest fails for any reason, falls back to cargo test with a warning annotation.
  • Image already ships cargo-nextest --locked (Dockerfile line 39), so no additional deploy needed.

Rollout pattern (mirrors PMAT-151 sccache)

  1. This PR: add the opt-in input (no behavior change for existing callers).
  2. Follow-up: opt in pilot repos (copia, bashrs, aprender) via their ci.yml with: use_nextest: true.
  3. Measure: F11 falsifier records p95 test-job duration (cargo run --example falsify_f11_test_job_p95).
  4. After 7 days + ≥10 samples: flip default false → true if F11 PASSES (p95 ≤ 300s).

Baseline F11 (2026-04-18, limit=15)

paiml/copia    n=15 p95=168s
paiml/bashrs   n=15 p95=222s
paiml/aprender n=15 p95=449s
fleet          n=45 p95=446s (driven by aprender's 60+ workspace crates)

Expected post-nextest: ~290s fleet p95 (35% reduction per nextest docs + Phase 2 §4.3).

Test plan

  • use_nextest: false (default) unchanged — all 20 non-pilot repos continue using cargo test
  • use_nextest: true verified on pilot repo CI runs once merged
  • F11 p95 drops ≥20% over 7 days on pilots

Refs PMAT-155

Adds a new workflow_call boolean input `use_nextest` (default: false).
When true, the test job uses `cargo nextest run --lib` instead of
`cargo test --lib`. nextest is already installed in sovereign-ci:stable
(Dockerfile line 39).

Pattern mirrors enable_sccache opt-in rollout (PMAT-151):
- opt-in with default false for safe pilot
- pilots opt in via caller workflow's `with: use_nextest: true`
- F11 falsifier will measure test-job p95 before/after on pilots
- after 7 days, flip default true if p95 ≤ 300s

Safety: if nextest fails for any reason (test harness quirks, workspace
structure), fall back to cargo test with a warning annotation so CI
doesn't break if a repo has incompatible test code.

Baseline F11 on pilot repos (2026-04-18, limit=15 runs):
  copia    n=15 p95=168s
  bashrs   n=15 p95=222s
  aprender n=15 p95=449s
  fleet    n=45 p95=446s (driven by aprender)

Expected post-nextest: ~290s fleet p95 (35% reduction).

Refs PMAT-155
@noahgift noahgift enabled auto-merge (squash) April 18, 2026 18:20
@noahgift noahgift merged commit a053b46 into main Apr 18, 2026
2 checks passed
@noahgift noahgift deleted the feat/nextest-opt-in branch April 18, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant