Repository navigation
refactor(tests): share chaos harness result helpers - #1998
Conversation
Problem #1981 still had repeated VM chaos harness pass/fail patterns even after the source and trybuild cleanup slices. The repeated service-active and event-count polling result handling made the chaos categories more verbose while preserving no extra behavior. What changed Added shared chaos-support helpers for service-active assertions and event-count increase polling. Network-partition, process-restart, and clock-skew categories now reuse those helpers where the helper owns the whole named test outcome. Tests that continue with additional checks keep their explicit flow. Verification env SINEX_ROOT="/realm/tmp/worktrees/sinex-1981-fixtures" xtask check --allow-contended-host -p sinex-vm-test-suite --format human — cargo check passed. Ref #1981
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Free Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughTwo centralized reporting helpers, ChangesChaos Test Reporting Refactor
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 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 |
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 repeated VM chaos harness result handling without changing the named chaos checks. Network partition, process restart, and clock skew tests now share helper paths for service-active assertions and event-count increase polling. Problem #1981 asks to streamline duplicated test harness patterns while preserving useful per-case observability. The VM chaos categories repeated the same pass/fail wiring around `service_is_active` and `wait_for_event_count_increase`, which made the scenario tests noisier without creating distinct behavior. Solution Added `report_service_active` and `report_event_count_increase` to `chaos_support`. The helpers record the same `TestRunner` pass/fail outcomes and keep each existing named chaos check intact. I used the helper only where it owns the whole named outcome; checks that continue into further assertions keep their explicit control flow. This also confirms the source fixture-helper part of #1981 is already structurally satisfied on current master: append-only/static fixtures share `build_file_fixture` while retaining semantic wrapper modules, and production-path cases already flow through `ProductionPathCase`. Verification - `env SINEX_ROOT="$PWD" xtask check --allow-contended-host -p sinex-vm-test-suite --format human` — cargo check passed for the worktree. - Pre-push guard: `xtask check --changed-strict origin/master --allow-contended-host` with `SINEX_ROOT` set to the worktree — affected package `sinex-vm-test-suite`, passed. Ref #1981 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Refactored test infrastructure to use centralized reporting helpers for improved maintainability and consistency across chaos scenario tests. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
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 repeated VM chaos harness result handling without changing the named chaos checks. Network partition, process restart, and clock skew tests now share helper paths for service-active assertions and event-count increase polling. Problem #1981 asks to streamline duplicated test harness patterns while preserving useful per-case observability. The VM chaos categories repeated the same pass/fail wiring around `service_is_active` and `wait_for_event_count_increase`, which made the scenario tests noisier without creating distinct behavior. Solution Added `report_service_active` and `report_event_count_increase` to `chaos_support`. The helpers record the same `TestRunner` pass/fail outcomes and keep each existing named chaos check intact. I used the helper only where it owns the whole named outcome; checks that continue into further assertions keep their explicit control flow. This also confirms the source fixture-helper part of #1981 is already structurally satisfied on current master: append-only/static fixtures share `build_file_fixture` while retaining semantic wrapper modules, and production-path cases already flow through `ProductionPathCase`. Verification - `env SINEX_ROOT="$PWD" xtask check --allow-contended-host -p sinex-vm-test-suite --format human` — cargo check passed for the worktree. - Pre-push guard: `xtask check --changed-strict origin/master --allow-contended-host` with `SINEX_ROOT` set to the worktree — affected package `sinex-vm-test-suite`, passed. Ref #1981 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Refactored test infrastructure to use centralized reporting helpers for improved maintainability and consistency across chaos scenario tests. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
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 repeated VM chaos harness result handling without changing the named chaos checks. Network partition, process restart, and clock skew tests now share helper paths for service-active assertions and event-count increase polling.
Problem
#1981 asks to streamline duplicated test harness patterns while preserving useful per-case observability. The VM chaos categories repeated the same pass/fail wiring around
service_is_activeandwait_for_event_count_increase, which made the scenario tests noisier without creating distinct behavior.Solution
Added
report_service_activeandreport_event_count_increasetochaos_support. The helpers record the sameTestRunnerpass/fail outcomes and keep each existing named chaos check intact. I used the helper only where it owns the whole named outcome; checks that continue into further assertions keep their explicit control flow.This also confirms the source fixture-helper part of #1981 is already structurally satisfied on current master: append-only/static fixtures share
build_file_fixturewhile retaining semantic wrapper modules, and production-path cases already flow throughProductionPathCase.Verification
env SINEX_ROOT="$PWD" xtask check --allow-contended-host -p sinex-vm-test-suite --format human— cargo check passed for the worktree.xtask check --changed-strict origin/master --allow-contended-hostwithSINEX_ROOTset to the worktree — affected packagesinex-vm-test-suite, passed.Ref #1981
Summary by CodeRabbit