Repository navigation
refactor(tests): share summarizer harness helpers - #1994
Conversation
Problem: #1981 keeps the affected-test architecture but calls out repeated summarizer harness setup as cleanup debt. The hourly and daily summarizer tests duplicated AutomatonContext construction and the same accumulate-then-emit flow. What changed: add a small automata test support module for summary contexts and generic Windowed processing, then route the daily and hourly summarizer behavior tests through it while keeping their payload builders and named tests local. Verification: xtask test --allow-contended-host -p sinexd -E 'test(hour_boundary_closes_summary_and_seeds_next_hour) or test(hourly_summary_aggregates_focus_time_and_top_sources) or test(timer_flush_emits_trailing_bucket_without_next_bucket_event) or test(flush_due_false_on_empty_state) or test(flush_due_false_when_pending_window_exists) or test(day_boundary_closes_summary_and_seeds_next_day) or test(daily_summary_aggregates_hourly_rollups)' --format human Ref #1981
|
Warning Review limit reached
More reviews will be available in 4 minutes and 14 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 (4)
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 Extracts the repeated daily/hourly summarizer test context and windowed processing flow into a small shared automata test helper while preserving every nextest-visible summarizer behavior test name. Problem #1981 asks to compress duplicated test harness code without weakening affected-test observability. The hourly and daily summarizer suites each carried their own `AutomatonContext` construction and identical accumulate-then-emit helper even though the behavior under test is the same Windowed contract shape. Solution - Added `tests/automata/summarizer_support.rs` with `summary_context::<Payload>()` and generic `process_windowed_input<W: Windowed>()`. - Routed `daily_summarizer_test.rs` and `hourly_summarizer_test.rs` through the helper. - Kept payload builders local to each suite because hourly and daily payload shapes are materially different. - Kept all existing named behavior tests intact for nextest and impact visibility. #1981 acceptance matrix - Summarizer harness cleanup: satisfied for the daily/hourly duplicated context/process flow. - Named-case observability: satisfied; no behavior tests were collapsed. - Required-input-key, production-path, fixture, chaos, compile-fail runner, and gate-cadence slices: not claimed by this PR; existing prior PRs cover some of these, and #1981 remains open until the remaining slices are handled or explicitly moved. Verification - `/var/cache/sinex/sinity/00dbba240e89/target/debug/xtask test --allow-contended-host -p sinexd -E 'test(hour_boundary_closes_summary_and_seeds_next_hour) or test(hourly_summary_aggregates_focus_time_and_top_sources) or test(timer_flush_emits_trailing_bucket_without_next_bucket_event) or test(flush_due_false_on_empty_state) or test(flush_due_false_when_pending_window_exists) or test(day_boundary_closes_summary_and_seeds_next_day) or test(daily_summary_aggregates_hourly_rollups)' --format human` -> 7 passed, 0 failed, 0 ignored. - `/var/cache/sinex/sinity/00dbba240e89/target/debug/xtask check --changed-strict origin/master --allow-contended-host --format human` -> 4 changed Rust files, affected package `sinexd`, passed. 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 Extracts the repeated daily/hourly summarizer test context and windowed processing flow into a small shared automata test helper while preserving every nextest-visible summarizer behavior test name. Problem #1981 asks to compress duplicated test harness code without weakening affected-test observability. The hourly and daily summarizer suites each carried their own `AutomatonContext` construction and identical accumulate-then-emit helper even though the behavior under test is the same Windowed contract shape. Solution - Added `tests/automata/summarizer_support.rs` with `summary_context::<Payload>()` and generic `process_windowed_input<W: Windowed>()`. - Routed `daily_summarizer_test.rs` and `hourly_summarizer_test.rs` through the helper. - Kept payload builders local to each suite because hourly and daily payload shapes are materially different. - Kept all existing named behavior tests intact for nextest and impact visibility. #1981 acceptance matrix - Summarizer harness cleanup: satisfied for the daily/hourly duplicated context/process flow. - Named-case observability: satisfied; no behavior tests were collapsed. - Required-input-key, production-path, fixture, chaos, compile-fail runner, and gate-cadence slices: not claimed by this PR; existing prior PRs cover some of these, and #1981 remains open until the remaining slices are handled or explicitly moved. Verification - `/var/cache/sinex/sinity/00dbba240e89/target/debug/xtask test --allow-contended-host -p sinexd -E 'test(hour_boundary_closes_summary_and_seeds_next_hour) or test(hourly_summary_aggregates_focus_time_and_top_sources) or test(timer_flush_emits_trailing_bucket_without_next_bucket_event) or test(flush_due_false_on_empty_state) or test(flush_due_false_when_pending_window_exists) or test(day_boundary_closes_summary_and_seeds_next_day) or test(daily_summary_aggregates_hourly_rollups)' --format human` -> 7 passed, 0 failed, 0 ignored. - `/var/cache/sinex/sinity/00dbba240e89/target/debug/xtask check --changed-strict origin/master --allow-contended-host --format human` -> 4 changed Rust files, affected package `sinexd`, passed. 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
Extracts the repeated daily/hourly summarizer test context and windowed processing flow into a small shared automata test helper while preserving every nextest-visible summarizer behavior test name.
Problem
#1981 asks to compress duplicated test harness code without weakening affected-test observability. The hourly and daily summarizer suites each carried their own
AutomatonContextconstruction and identical accumulate-then-emit helper even though the behavior under test is the same Windowed contract shape.Solution
tests/automata/summarizer_support.rswithsummary_context::<Payload>()and genericprocess_windowed_input<W: Windowed>().daily_summarizer_test.rsandhourly_summarizer_test.rsthrough the helper.#1981 acceptance matrix
Verification
/var/cache/sinex/sinity/00dbba240e89/target/debug/xtask test --allow-contended-host -p sinexd -E 'test(hour_boundary_closes_summary_and_seeds_next_hour) or test(hourly_summary_aggregates_focus_time_and_top_sources) or test(timer_flush_emits_trailing_bucket_without_next_bucket_event) or test(flush_due_false_on_empty_state) or test(flush_due_false_when_pending_window_exists) or test(day_boundary_closes_summary_and_seeds_next_day) or test(daily_summary_aggregates_hourly_rollups)' --format human-> 7 passed, 0 failed, 0 ignored./var/cache/sinex/sinity/00dbba240e89/target/debug/xtask check --changed-strict origin/master --allow-contended-host --format human-> 4 changed Rust files, affected packagesinexd, passed.Ref #1981