Repository navigation
refactor(tests): share primitives trybuild runner setup - #1997
Conversation
Problem #1981 asks to compress compile-fail runner repetition while keeping each fixture file and nextest-visible test name intact. The primitives crate had three separate trybuild runner files repeating the setup directly. What changed Added a small shared trybuild helper for sinex-primitives integration-test runners and routed the source-contract, ID-type, and EventBuilder typestate runner tests through it. The fixture files remain individual. The existing public test names remain unchanged. The heavy verification also exposed stale Rust diagnostic baselines for the same trybuild suite, so the expected stderr fixtures were refreshed to the current compiler output without changing the underlying invariants. Verification xtask test --allow-contended-host --debug --heavy -p sinex-primitives -E 'test(source_contract_compile_failures) or test(id_type_mismatch_is_compile_error) or test(event_builder_requires_provenance_before_build)' --format human Ref #1981
|
Warning Review limit reached
More reviews will be available in 3 minutes and 26 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Free Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds a shared Test infrastructure and fixture updates
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~4 minutes Poem
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
Problem #1981 also asks for PR/scheduled gate cadence visibility. The existing CI policy still implied every PR should run full/docs/schema gates, while the active PR template and devshell pre-push path enforce changed-strict plus focused verification by default. What changed Updated the CI policy to make changed-strict the required Rust/API PR guard, focused xtask tests the behavior evidence, and docs/schema/full workspace gates conditional or phase-boundary checks. Added the trybuild-specific heavy-debug command to the verification map after the compile-fail runner work showed parallel heavy trybuild nodes can hit nextest's default timeout even when the same tests pass serially. Verification Documentation-only change; will be covered by changed-strict on this branch. Ref #1981
Summary Finishes the two #1981 closure gaps found after the replay-harness PR: the last direct trybuild runner setup now uses a shared support helper, and the verification policy now names when sampled impact audits are required instead of only mentioning impact explain output. Problem The #1981 false-close pass found that prior work had compressed the primitives compile-fail runner and documented selected-test evidence, but sinex-macros still owned a one-off trybuild setup and the policy did not tell future agents when to run `xtask impact audit --sample-skips N`. That left the verification cleanup issue almost closed but not exhausted. Solution - Add `crate/sinex-macros/tests/support/trybuild.rs` and route the macros compile-fail test through it while keeping the individual fixtures and stderr outputs explicit. - Extend `.github/ci-policy.md` with impact explain/audit cadence for disputed test-scope claims, impact-planner changes, verification-policy changes, and false-close audits. - Extend `xtask/docs/verification.md` with an impact-plan coverage audit row and concrete command pattern. Acceptance matrix - Required-input-key suite compression: satisfied by #1983. - Production-path source/common source-path laws: satisfied by #1988. - Replay/chaos/summarizer harness compression: satisfied by #1992, #1994, #1998, and #2000. - Compile-fail runner compression: satisfied by #1997 for `sinex-primitives` and by this PR for `sinex-macros`. - Gate visibility/cadence: satisfied by #1988 for changed-strict guidance and by this PR for impact explain/audit cadence. Verification - `env -u SINEX_ROOT nix develop /realm/tmp/worktrees/sinex-1981-final --command xtask test --debug --heavy --include-ignored -p sinex-macros -E 'test(compile_fail_tests)' --format human` Passed: 1, Ignored: 0. - `env -u SINEX_ROOT nix develop /realm/tmp/worktrees/sinex-1981-final --command xtask check --changed-strict origin/master --allow-contended-host --format human` Passed locally. - Pre-push `xtask check --changed-strict origin/master --allow-contended-host` Passed: changed-strict checked `sinex-macros`. Closes #1981
Summary Compresses the `sinex-primitives` trybuild runner setup without collapsing fixture files or nextest-visible test names, and clarifies the affected-gate cadence that this run exposed. The source-contract, ID-type, and EventBuilder typestate compile-fail runners now share one tiny trybuild helper, while their individual tests and diagnostic fixtures remain intact. Problem #1981 asks to reduce repeated test harness code while preserving affected-test and nextest observability. The primitives compile-fail suite repeated direct `trybuild::TestCases::new()` setup in multiple runner files. Running the heavy slice also showed stale compiler-output baselines and made the trybuild cadence rule concrete: edited compile-fail runners/stderr need a heavy/debug focused run, while ordinary PR evidence should stay on changed-strict plus focused behavior tests rather than the full gate every time. Solution Added `tests/support/trybuild.rs` with a shared `cases()` helper and routed the three primitives trybuild runners through it. The public test function names did not change. Each `.rs` and `.stderr` fixture remains individual. The trybuild stderr baselines were refreshed to current Rust output where the compiler now prints fully qualified `sinex_primitives::Event` and one-line method-found notes. The expected error kinds and typestate guarantees are unchanged. Updated `.github/ci-policy.md` and `xtask/docs/verification.md` to describe the current PR/default cadence: `xtask check --changed-strict origin/master --allow-contended-host` as the default affected Rust/API gate, focused `xtask test ...` for behavior evidence, docs/schema gates when those surfaces are touched, full/all tests at phase boundaries, and heavy/debug focused trybuild runs for edited compile-fail suites. Verification - `xtask test --allow-contended-host --debug --heavy -p sinex-primitives -E 'test(source_contract_compile_failures) or test(id_type_mismatch_is_compile_error) or test(event_builder_requires_provenance_before_build)' --format human` — 3 passed. - `xtask check --changed-strict origin/master --allow-contended-host --format human` — 4 changed Rust files, affected package `sinex-primitives`, passed before opening the PR. - `xtask check --changed-strict origin/master --allow-contended-host --format human` — rerun after the documentation commit, affected package `sinex-primitives`, passed. - Pre-push drift guard reran `xtask check --changed-strict origin/master --allow-contended-host` and passed. Note: the same heavy trybuild filter without `--debug` timed out under parallel nextest execution at 120s before the successful serial debug run. That is now recorded in the verification docs as cadence guidance, not treated as a product failure. Ref #1981
Summary Finishes the two #1981 closure gaps found after the replay-harness PR: the last direct trybuild runner setup now uses a shared support helper, and the verification policy now names when sampled impact audits are required instead of only mentioning impact explain output. Problem The #1981 false-close pass found that prior work had compressed the primitives compile-fail runner and documented selected-test evidence, but sinex-macros still owned a one-off trybuild setup and the policy did not tell future agents when to run `xtask impact audit --sample-skips N`. That left the verification cleanup issue almost closed but not exhausted. Solution - Add `crate/sinex-macros/tests/support/trybuild.rs` and route the macros compile-fail test through it while keeping the individual fixtures and stderr outputs explicit. - Extend `.github/ci-policy.md` with impact explain/audit cadence for disputed test-scope claims, impact-planner changes, verification-policy changes, and false-close audits. - Extend `xtask/docs/verification.md` with an impact-plan coverage audit row and concrete command pattern. Acceptance matrix - Required-input-key suite compression: satisfied by #1983. - Production-path source/common source-path laws: satisfied by #1988. - Replay/chaos/summarizer harness compression: satisfied by #1992, #1994, #1998, and #2000. - Compile-fail runner compression: satisfied by #1997 for `sinex-primitives` and by this PR for `sinex-macros`. - Gate visibility/cadence: satisfied by #1988 for changed-strict guidance and by this PR for impact explain/audit cadence. Verification - `env -u SINEX_ROOT nix develop /realm/tmp/worktrees/sinex-1981-final --command xtask test --debug --heavy --include-ignored -p sinex-macros -E 'test(compile_fail_tests)' --format human` Passed: 1, Ignored: 0. - `env -u SINEX_ROOT nix develop /realm/tmp/worktrees/sinex-1981-final --command xtask check --changed-strict origin/master --allow-contended-host --format human` Passed locally. - Pre-push `xtask check --changed-strict origin/master --allow-contended-host` Passed: changed-strict checked `sinex-macros`. Closes #1981
Summary Compresses the `sinex-primitives` trybuild runner setup without collapsing fixture files or nextest-visible test names, and clarifies the affected-gate cadence that this run exposed. The source-contract, ID-type, and EventBuilder typestate compile-fail runners now share one tiny trybuild helper, while their individual tests and diagnostic fixtures remain intact. Problem #1981 asks to reduce repeated test harness code while preserving affected-test and nextest observability. The primitives compile-fail suite repeated direct `trybuild::TestCases::new()` setup in multiple runner files. Running the heavy slice also showed stale compiler-output baselines and made the trybuild cadence rule concrete: edited compile-fail runners/stderr need a heavy/debug focused run, while ordinary PR evidence should stay on changed-strict plus focused behavior tests rather than the full gate every time. Solution Added `tests/support/trybuild.rs` with a shared `cases()` helper and routed the three primitives trybuild runners through it. The public test function names did not change. Each `.rs` and `.stderr` fixture remains individual. The trybuild stderr baselines were refreshed to current Rust output where the compiler now prints fully qualified `sinex_primitives::Event` and one-line method-found notes. The expected error kinds and typestate guarantees are unchanged. Updated `.github/ci-policy.md` and `xtask/docs/verification.md` to describe the current PR/default cadence: `xtask check --changed-strict origin/master --allow-contended-host` as the default affected Rust/API gate, focused `xtask test ...` for behavior evidence, docs/schema gates when those surfaces are touched, full/all tests at phase boundaries, and heavy/debug focused trybuild runs for edited compile-fail suites. Verification - `xtask test --allow-contended-host --debug --heavy -p sinex-primitives -E 'test(source_contract_compile_failures) or test(id_type_mismatch_is_compile_error) or test(event_builder_requires_provenance_before_build)' --format human` — 3 passed. - `xtask check --changed-strict origin/master --allow-contended-host --format human` — 4 changed Rust files, affected package `sinex-primitives`, passed before opening the PR. - `xtask check --changed-strict origin/master --allow-contended-host --format human` — rerun after the documentation commit, affected package `sinex-primitives`, passed. - Pre-push drift guard reran `xtask check --changed-strict origin/master --allow-contended-host` and passed. Note: the same heavy trybuild filter without `--debug` timed out under parallel nextest execution at 120s before the successful serial debug run. That is now recorded in the verification docs as cadence guidance, not treated as a product failure. Ref #1981
Summary Finishes the two #1981 closure gaps found after the replay-harness PR: the last direct trybuild runner setup now uses a shared support helper, and the verification policy now names when sampled impact audits are required instead of only mentioning impact explain output. Problem The #1981 false-close pass found that prior work had compressed the primitives compile-fail runner and documented selected-test evidence, but sinex-macros still owned a one-off trybuild setup and the policy did not tell future agents when to run `xtask impact audit --sample-skips N`. That left the verification cleanup issue almost closed but not exhausted. Solution - Add `crate/sinex-macros/tests/support/trybuild.rs` and route the macros compile-fail test through it while keeping the individual fixtures and stderr outputs explicit. - Extend `.github/ci-policy.md` with impact explain/audit cadence for disputed test-scope claims, impact-planner changes, verification-policy changes, and false-close audits. - Extend `xtask/docs/verification.md` with an impact-plan coverage audit row and concrete command pattern. Acceptance matrix - Required-input-key suite compression: satisfied by #1983. - Production-path source/common source-path laws: satisfied by #1988. - Replay/chaos/summarizer harness compression: satisfied by #1992, #1994, #1998, and #2000. - Compile-fail runner compression: satisfied by #1997 for `sinex-primitives` and by this PR for `sinex-macros`. - Gate visibility/cadence: satisfied by #1988 for changed-strict guidance and by this PR for impact explain/audit cadence. Verification - `env -u SINEX_ROOT nix develop /realm/tmp/worktrees/sinex-1981-final --command xtask test --debug --heavy --include-ignored -p sinex-macros -E 'test(compile_fail_tests)' --format human` Passed: 1, Ignored: 0. - `env -u SINEX_ROOT nix develop /realm/tmp/worktrees/sinex-1981-final --command xtask check --changed-strict origin/master --allow-contended-host --format human` Passed locally. - Pre-push `xtask check --changed-strict origin/master --allow-contended-host` Passed: changed-strict checked `sinex-macros`. Closes #1981
Summary
Compresses the
sinex-primitivestrybuild runner setup without collapsing fixture files or nextest-visible test names, and clarifies the affected-gate cadence that this run exposed. The source-contract, ID-type, and EventBuilder typestate compile-fail runners now share one tiny trybuild helper, while their individual tests and diagnostic fixtures remain intact.Problem
#1981 asks to reduce repeated test harness code while preserving affected-test and nextest observability. The primitives compile-fail suite repeated direct
trybuild::TestCases::new()setup in multiple runner files. Running the heavy slice also showed stale compiler-output baselines and made the trybuild cadence rule concrete: edited compile-fail runners/stderr need a heavy/debug focused run, while ordinary PR evidence should stay on changed-strict plus focused behavior tests rather than the full gate every time.Solution
Added
tests/support/trybuild.rswith a sharedcases()helper and routed the three primitives trybuild runners through it. The public test function names did not change. Each.rsand.stderrfixture remains individual.The trybuild stderr baselines were refreshed to current Rust output where the compiler now prints fully qualified
sinex_primitives::Eventand one-line method-found notes. The expected error kinds and typestate guarantees are unchanged.Updated
.github/ci-policy.mdandxtask/docs/verification.mdto describe the current PR/default cadence:xtask check --changed-strict origin/master --allow-contended-hostas the default affected Rust/API gate, focusedxtask test ...for behavior evidence, docs/schema gates when those surfaces are touched, full/all tests at phase boundaries, and heavy/debug focused trybuild runs for edited compile-fail suites.Verification
xtask test --allow-contended-host --debug --heavy -p sinex-primitives -E 'test(source_contract_compile_failures) or test(id_type_mismatch_is_compile_error) or test(event_builder_requires_provenance_before_build)' --format human— 3 passed.xtask check --changed-strict origin/master --allow-contended-host --format human— 4 changed Rust files, affected packagesinex-primitives, passed before opening the PR.xtask check --changed-strict origin/master --allow-contended-host --format human— rerun after the documentation commit, affected packagesinex-primitives, passed.xtask check --changed-strict origin/master --allow-contended-hostand passed.Note: the same heavy trybuild filter without
--debugtimed out under parallel nextest execution at 120s before the successful serial debug run. That is now recorded in the verification docs as cadence guidance, not treated as a product failure.Ref #1981