ci: gate cargo test --workspace (minus xtask) over per-crate cargo suites (kd-i9oc)#846
Open
brandonpayton wants to merge 1 commit into
Conversation
…ites Replace the per-crate `cargo-kernel` and `fork-instrument` CI suites with a single `cargo-workspace` suite running `cargo test --workspace --exclude xtask --target <host>`. This gates every workspace crate under crates/ -- including the previously un-gated wasm-posix-shared (19 tests) and wasm-local-root-spill (13) that the kd-7yjx audit found -- and is closed-by-default: a new crate under crates/ is gated with no matrix edit, and integration tests run (no `--lib` trap that would silently run 0 tests for a bin-only crate). xtask is excluded because it is gated separately by its own always-run `cargo-xtask` suite (PR #836): xtask lives under tools/ (outside the kernel change-scope) and its regressions are kernel-independent. Excluding it keeps the workspace suite green on origin/main today with no dependency on #836 (the two changes complement each other and edit adjacent matrix lines). Implements docs/plans/2026-07-05-workspace-unit-test-gating-audit.md (kd-7yjx); see the section 11 addendum for the COMPLEMENT-vs-SUPERSEDE decision and the resolved open questions. Verified under scripts/dev-shell.sh: `cargo test --workspace --exclude xtask --target aarch64-apple-darwin` = 1172 passed / 0 failed / 0 ignored across 22 binaries, both directly and via `scripts/ci-run-test-suite.sh cargo-workspace`. No detect-change-scope edit is needed: all five gated members are under crates/ (already in the kernel scope), and editing ci-run-test-suite.sh sets kernel=true so the new suite self-exercises on this PR. Bead: kd-i9oc (initiative validation-gates, umbrella kd-u7f) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
Replace the per-crate
cargo-kernelandfork-instrumentCI suites with asingle
cargo-workspacesuite runningcargo test --workspace --exclude xtask --target <host>inscripts/ci-run-test-suite.shand thetest-suitematrices ofprepare-merge.yml,staging-build.yml, andforce-rebuild.yml.docs/agent-guidance/validation.mdcollapses the two cargo rows into one.Implements the kd-7yjx audit
(
docs/plans/2026-07-05-workspace-unit-test-gating-audit.md, included here) forbead kd-i9oc (initiative
validation-gates, umbrella kd-u7f).Why
The audit found the cargo gate is an allow-list of packages, so crates go
un-gated by default — the exact failure mode that let the xtask fixtures rot for
a month. Two workspace crates' host tests were never run by CI:
wasm-posix-shared(19) andwasm-local-root-spill(13). A singlecargo test --workspacesuite is closed-by-default: new crates undercrates/are gated with no matrix edit, and it runs integration tests (ahand-written
-p <crate> --libline would run 0 ofwasm-local-root-spill's13
tests/tests while looking green).Why
--exclude xtask(and not a bare--workspace)xtasklives undertools/xtask/, which is outside thekernelchange-scope; PR #836 correctly gates it as an always-run
cargo-xtasksuite (
kernel_only: false) because its regressions are kernel-independent.Folding xtask into one
kernel_only: trueworkspace suite would silently skip iton xtask-only changes; making the whole suite always-run would compile the kernel
crate on every docs/package PR. Excluding xtask lets this suite stay
kernel_only: trueand keeps it green onorigin/maintoday with nodependency on #836. The two PRs complement each other and edit adjacent matrix
lines — either merge order works (second-to-merge rebases trivially).
See §11 of the design doc for the full COMPLEMENT-vs-SUPERSEDE analysis and
the resolved open questions.
Decision requested
This PR implements COMPLEMENT (recommended: unblocked, low-cost, gates the
audit's actual finding now). The alternative is SUPERSEDE — one always-run
cargo test --workspacesuite covering all six members, replacing #836'scargo-xtask too — which is purer but blocked on #836 merging, compiles the kernel
on every PR, and needs a fold/supersede ruling on #836's suite. Switching to
SUPERSEDE is a small documented pivot (drop
--exclude xtask, setkernel_only: false, remove #836'scargo-xtaskafter it merges).Verification
Under
scripts/dev-shell.sh, onorigin/main@24668156b:Same result via the CI entrypoint
scripts/ci-run-test-suite.sh cargo-workspace.Breakdown: kandelo 963 + fork-instrument 177 (25 lib + 152 integ) + shared 19 +
wasm-local-root-spill 13 (integration) + userspace 0. This PR's own
prepare-mergerun exercises the new suite (editingci-run-test-suite.shsetskernel=true).Non-goals
No change to what the kernel/fork-instrument suites assert (
--workspaceis astrict superset). No new tests authored. No non-cargo suites touched. No
detect-change-scopeedit needed (all five gated members are undercrates/).🤖 Generated with Claude Code