ci(sovereign): cargo test --workspace --lib (PMAT-159)#29
Merged
Conversation
F11 falsifier blind-spot from PMAT-155 investigation (paiml/infra#70): cargo nextest run --lib at repo root only tests the root package, leaving workspace-member libs silent. Per-pilot impact (pre-fix): copia - 227 tests (valid, single-crate repo) bashrs - 5 tests (root only; specs/runtime/oracle/wasm silent) aprender - 0 tests (root lib.rs is a stub; all 60 workspace crates silent) Fix: primary invocation now cargo nextest run --workspace --lib TEST_ARGS. Coverage updated to match. The -p REPO_NAME fallback is retained for harness quirks. Callers that need to skip workspace members (e.g. aprender's GPU crates) pass test_args: --exclude X --exclude Y. Blast radius: every repo's ci / test and ci / coverage will start running workspace-member lib tests that were previously silent. May surface real bugs. Recommended canary: merge, watch copia (no workspace effect), bashrs (4 new members surface), aprender (requires test_args exclusions first). Refs paiml/infra#70, PMAT-155, PMAT-159.
noahgift
added a commit
to paiml/aprender
that referenced
this pull request
Apr 20, 2026
PMAT-155 investigation (paiml/infra#70) found the sovereign-ci.yml reusable workflow runs `cargo nextest run --lib` at the repo root, which only tests the root package. For aprender, the root lib.rs is a stub (added in #19) so ci/test runs 0 tests — all 60 workspace-crate libs are silent. paiml/.github#29 switches the reusable workflow's primary invocation to `cargo nextest run --workspace --lib $TEST_ARGS`. When that merges, aprender's ci/test will try to compile workspace members that don't build in the sovereign-ci container: - aprender-gpu (cuBLAS not present) - aprender-cuda-edge (CUDA toolchain not present) - aprender-compute (SIGSEGV at test-harness exit; workspace-test handles this crate specially with a grep-based pass check) This commit pre-stages `test_args` on the sovereign-ci call so ci/test excludes those three crates, matching the workspace-test job's current exclusions. Safe to land BEFORE paiml/.github#29 — while the reusable workflow still uses --lib (root only), the --exclude flags are no-ops on a 0-test run. Refs PMAT-155, PMAT-159, paiml/.github#29, paiml/infra#70.
Closed
4 tasks
noahgift
added a commit
to paiml/aprender
that referenced
this pull request
Apr 20, 2026
PMAT-155 investigation (paiml/infra#70) found the sovereign-ci.yml reusable workflow runs `cargo nextest run --lib` at the repo root, which only tests the root package. For aprender, the root lib.rs is a stub (added in #19) so ci/test runs 0 tests — all 60 workspace-crate libs are silent. paiml/.github#29 switches the reusable workflow's primary invocation to `cargo nextest run --workspace --lib $TEST_ARGS`. When that merges, aprender's ci/test will try to compile workspace members that don't build in the sovereign-ci container: - aprender-gpu (cuBLAS not present) - aprender-cuda-edge (CUDA toolchain not present) - aprender-compute (SIGSEGV at test-harness exit; workspace-test handles this crate specially with a grep-based pass check) This commit pre-stages `test_args` on the sovereign-ci call so ci/test excludes those three crates, matching the workspace-test job's current exclusions. Safe to land BEFORE paiml/.github#29 — while the reusable workflow still uses --lib (root only), the --exclude flags are no-ops on a 0-test run. Refs PMAT-155, PMAT-159, paiml/.github#29, paiml/infra#70.
The initial PMAT-159 change force-switched every caller to `--workspace --lib`.
That breaks any repo whose workspace members don't build in the sovereign-ci
container (e.g. aprender-gpu needs cuBLAS, aprender-cuda-edge needs CUDA).
Switch to an opt-in `test_workspace` input (default false → current behavior).
Callers that want workspace-wide coverage pair it with `test_args` exclusions:
with:
test_workspace: true
test_args: "--exclude aprender-gpu --exclude aprender-cuda-edge"
Refs paiml/infra#33
noahgift
added a commit
to paiml/aprender
that referenced
this pull request
Apr 20, 2026
paiml/.github#29 merged an opt-in test_workspace input that switches the reusable workflow's test invocation from `cargo nextest run --lib` (root only) to `cargo nextest run --workspace --lib`. Without this, aprender's workspace-member lib tests (the interesting suite) never run in ci/test. Pair it with the existing exclusions so aprender-gpu/cuda-edge/compute are skipped — they don't build in the sovereign-ci container (cuBLAS / CUDA / SIGSEGV at exit). The workspace-test job below still covers them on GPU-ready hosts. Refs paiml/infra#33
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PMAT-159: the reusable workflow ran
cargo nextest run --lib(root package only). For workspace-oriented repos like aprender, the rootlib.rsis a stub — ci/test executed 0 tests. F11 p95 wall-clock was measuring compile/cache-fetch, not nextest signal.Revised design (2026-04-20 after canary failure): ship
--workspace --libbehind an opt-intest_workspace: falseinput so the fleet default is unchanged. Callers that want workspace-wide coverage pair it withtest_argsexclusions for crates that don't build in the sovereign-ci container.Why opt-in
The first draft force-switched every caller. That broke aprender#934 because
--excluderequires--workspace, and broke aprendermainbecause the container can't build aprender-gpu (cuBLAS), aprender-cuda-edge (CUDA), or aprender-compute (SIGSEGV at exit). Opt-in resolves the chicken-and-egg: repos declare workspace-readiness explicitly.Caller pattern (aprender#934)
Changes
test_workspace(defaultfalse= current behavior)$TEST_SCOPEenv (--workspace --libor--lib)-p $REPO_NAMEstill tried on failure)Test plan
test_workspace: true→ CI green--lib, behavior unchanged)Refs paiml/infra#33 (PMAT-155 Phase 2 nextest migration blindspot)