Skip to content

ci: gate PRs on focused cargo test packages (H4) - #24

Merged
ElSargo merged 1 commit into
mainfrom
ci/focused-cargo-test-gate
Sep 16, 2026
Merged

ElSargo merged 1 commit into
mainfrom
ci/focused-cargo-test-gate

Conversation

@ElSargo

@ElSargo ElSargo commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • Closes audit H4: default PR CI (nix run .#ci → checks.*.lint) now builds a focused craneLib.cargoTest derivation (unitTestCheck) so unit/integration regressions cannot merge on typecheck alone.
  • Matrix (lib + integration tests, doctests skipped): brood-protocol, brood-ipc, brood-transport, brood-wasm, brood-layout, brood-plugin-sdk, brood-keybindings, brood-theme, brood-package-contract, brood-graphics, brood-computer-use, brood-profiler, brood-wayland-drop, bmux, brood-cli, brood-remote, broodd, brood-client.
  • Nested Wayland e2e (tools/test-*-nested.sh) is not part of this gate.
  • Same package set is wired into nix run .#lint and cache-ci for local/CI cache parity.

How to verify locally

# Same command the interactive linter runs (after deps):
cargo test --locked \
  -p brood-protocol -p brood-ipc -p brood-transport -p brood-wasm \
  -p brood-layout -p brood-plugin-sdk -p brood-keybindings -p brood-theme \
  -p brood-package-contract -p brood-graphics -p brood-computer-use \
  -p brood-profiler -p brood-wayland-drop -p bmux -p brood-cli -p brood-remote \
  -p broodd -p brood-client \
  --lib --tests -- --test-threads=2

# Nix CI path (builds unitTestCheck as part of lint):
nix build --print-build-logs .#unitTestCheck
# or full local CI:
nix run --print-build-logs .#ci

Residual gaps / expansion path

  • brood-capsuled: --lib passes; full package test blocked by host_smoke needing missing CARGO_BIN_EXE_brood-capsuled.
  • brood-launch / brood-dmabuf: no meaningful tests yet.
  • Nested e2e remains optional/nightly by design.
  • --test-threads=2 avoids an intermittent brood-wasm facet_executor flake under high concurrency.

Test plan

  • Host cargo test matrix above: 675 tests passed (--lib --tests, --test-threads=2)
  • nix eval / dry-run for .#unitTestCheck and .#checks.*.lint
  • nix build .#lint and confirm expanded cargo test line in brood-lint
  • GitHub Actions green on this PR (nix run .#ci)

Run a practical lib+integration cargo test matrix through Nix localCi/lint
so unit regressions cannot merge on typecheck alone. Nested Wayland e2e
scripts stay outside the default PR gate.

@ElSargo ElSargo left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brood QA review

Checked: diff/view; CI 35148206350; audit H4.

Code: Sensible H4 gate. Adds unitTestCheck (craneLib.cargoTest) over a focused package matrix with --lib --tests and --test-threads=2, wired into lintCheck, interactive .#lint, and cache-ci. Nested Wayland e2e correctly kept out. Expansion gaps (brood-capsuled host_smoke, launch/dmabuf) documented in-PR.

CI: FAILURE — runner ENOSPC unpacking rustc/Nix deps. Cannot validate the new gate on GHA until disk pressure clears. Author claims 675 local cargo tests + nix dry-run.

Desktop verify: N/A (CI-only).

Residual / merge: Merge blocker is green CI for this PR and confirming unitTestCheck actually executes in Actions (not just eval). Prefer landing before/with product fix PRs so their new tests become gated. No code objection from review.

— Brood QA

@ElSargo ElSargo left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brood QA review — PR #24 (H4 focused cargo test gate)

Verdict

Approve (content). CI red is infra ENOSPC, not a regression in this diff.

What looks good

  • Closes audit H4: default PR lint no longer typecheck-only.
  • unitTestCheck via craneLib.cargoTest with --locked + focused -p set, --lib --tests, --test-threads=2 (documented brood-wasm flake mitigation).
  • Wired through lintCheck / checks.*.lint, interactive nix run .#lint, and cache-ci.
  • Matrix matches workspace packages that are meant to be gated; brood-capsuled / brood-launch / brood-dmabuf exclusions are intentional and documented.
  • Nested Wayland e2e correctly left out of the default gate.

CI

Failed run https://github.com/ElSargo/manifold/actions/runs/35148206350 — No space left on device while unpacking rustc. Treat as runner disk, not a test matrix bug. Re-run after cleanup.

Local checks (this review)

  • nix eval / nix derivation show .#lintCheck — unitTestCheck is a hard dep of lint.
  • nix build .#lint — embedded cargo test line matches the PR matrix.
  • Did not run full nix build .#unitTestCheck here (disk).

Notes for merge

  • Expect a nix/packages.nix conflict with PR #25 (same insert region). Rebase the second of the two.
  • Residual risk: gate increases CI store pressure (same ENOSPC class). Not a reason to block this PR.

Oliver

No code blockers. Infra: free CI disk / re-run before relying on a green check.

@ElSargo
ElSargo merged commit fd27506 into main Sep 16, 2026
1 check failed
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