Repository navigation
refactor(tests): type production-path obligations - #2011
Conversation
Problem #1981 keeps the affected-test architecture but asks for repeated test harness patterns to be compressed without losing nextest-visible case names. The production-path harness still passed obligation identity through raw strings, which made the shared law dispatcher stringly typed and left cadence guidance scattered across verification prose. What changed - Replace raw production-path obligation names with a typed ProductionPathObligation enum. - Keep per-source test functions and case labels intact while the shared runner dispatches typed obligations. - Add an explicit verification cadence matrix to xtask/docs/verification.md for PR, policy, release, and scheduled broad-sweep gates. Verification - env -u SINEX_ROOT nix develop /realm/tmp/worktrees/sinex-1981-test-patterns --command xtask fix --fmt-only --format human - env -u SINEX_ROOT nix develop /realm/tmp/worktrees/sinex-1981-test-patterns --command xtask test --allow-contended-host -p sinexd --test production_path --format human — 54 passed, 0 failed Ref #1981
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Free Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe production-path test harness replaces all string-based obligation names with a typed ChangesTyped ProductionPathObligation enum refactor
Gate Cadence documentation
Timestamp utility helpers and test refactor
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 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 calls out replay, chaos, and summarizer harness repetition. The hourly and daily summarizer tests both normalized UTC bucket boundaries inline, duplicating the same setup/assertion law in each test file. What changed - Add shared `utc_hour_start` and `utc_day_start` helpers to summarizer_support. - Use those helpers in hourly and daily summarizer tests while preserving existing test names and behavior assertions. Verification - env -u SINEX_ROOT nix develop /realm/tmp/worktrees/sinex-1981-test-patterns --command xtask fix --fmt-only --format human - env -u SINEX_ROOT nix develop /realm/tmp/worktrees/sinex-1981-test-patterns --command xtask test --allow-contended-host -p sinexd --test automata -E 'test(daily_summarizer) or test(hourly_summarizer)' --format human — 7 passed, 0 failed Ref #1981
Summary Types the production-path obligation harness, shares summarizer UTC bucket helpers, and makes gate cadence explicit in the verification docs. The shared harness still expands into the existing per-source nextest names, but obligation identity is no longer passed through raw strings. Problem #1981 asks Sinex to compress repeated test patterns without weakening affected-test observability. The required-input-key slice already landed, but the production-path harness still used string obligation names internally, hourly/daily summarizer tests repeated UTC bucket-boundary setup, and gate cadence guidance was scattered across prose. Solution - Add `ProductionPathObligation` and use it in `ProductionPathCase`, `_run_case`, and record-fixture variants. - Keep the existing per-source production-path tests and case labels intact so nextest/impact history remains useful. - Preserve the existing initial-ingestion reuse behavior for privacy checks, now through typed obligation methods. - Add shared `utc_hour_start` and `utc_day_start` helpers for summarizer tests. - Add a `Gate Cadence` matrix to `xtask/docs/verification.md` covering focused PR loops, PR publish boundaries, verification-policy PRs, release boundaries, and scheduled broad sweeps. Verification - `env -u SINEX_ROOT nix develop /realm/tmp/worktrees/sinex-1981-test-patterns --command xtask fix --fmt-only --format human` - passed. - `env -u SINEX_ROOT nix develop /realm/tmp/worktrees/sinex-1981-test-patterns --command xtask test --allow-contended-host -p sinexd --test production_path --format human` - 54 passed, 0 failed. - `env -u SINEX_ROOT nix develop /realm/tmp/worktrees/sinex-1981-test-patterns --command xtask test --allow-contended-host -p sinexd --test automata -E 'test(daily_summarizer) or test(hourly_summarizer)' --format human` - 7 passed, 0 failed. - `env -u SINEX_ROOT nix develop /realm/tmp/worktrees/sinex-1981-test-patterns --command xtask check --changed-strict origin/master --allow-contended-host --format human` - 4 changed Rust files, affected package `sinexd`, passed. - Pre-push hook reran `xtask check --changed-strict origin/master --allow-contended-host` - 1 package checked, passed. Ref #1981
Summary Types the production-path obligation harness, shares summarizer UTC bucket helpers, and makes gate cadence explicit in the verification docs. The shared harness still expands into the existing per-source nextest names, but obligation identity is no longer passed through raw strings. Problem #1981 asks Sinex to compress repeated test patterns without weakening affected-test observability. The required-input-key slice already landed, but the production-path harness still used string obligation names internally, hourly/daily summarizer tests repeated UTC bucket-boundary setup, and gate cadence guidance was scattered across prose. Solution - Add `ProductionPathObligation` and use it in `ProductionPathCase`, `_run_case`, and record-fixture variants. - Keep the existing per-source production-path tests and case labels intact so nextest/impact history remains useful. - Preserve the existing initial-ingestion reuse behavior for privacy checks, now through typed obligation methods. - Add shared `utc_hour_start` and `utc_day_start` helpers for summarizer tests. - Add a `Gate Cadence` matrix to `xtask/docs/verification.md` covering focused PR loops, PR publish boundaries, verification-policy PRs, release boundaries, and scheduled broad sweeps. Verification - `env -u SINEX_ROOT nix develop /realm/tmp/worktrees/sinex-1981-test-patterns --command xtask fix --fmt-only --format human` - passed. - `env -u SINEX_ROOT nix develop /realm/tmp/worktrees/sinex-1981-test-patterns --command xtask test --allow-contended-host -p sinexd --test production_path --format human` - 54 passed, 0 failed. - `env -u SINEX_ROOT nix develop /realm/tmp/worktrees/sinex-1981-test-patterns --command xtask test --allow-contended-host -p sinexd --test automata -E 'test(daily_summarizer) or test(hourly_summarizer)' --format human` - 7 passed, 0 failed. - `env -u SINEX_ROOT nix develop /realm/tmp/worktrees/sinex-1981-test-patterns --command xtask check --changed-strict origin/master --allow-contended-host --format human` - 4 changed Rust files, affected package `sinexd`, passed. - Pre-push hook reran `xtask check --changed-strict origin/master --allow-contended-host` - 1 package checked, passed. Ref #1981
Summary
Types the production-path obligation harness, shares summarizer UTC bucket helpers, and makes gate cadence explicit in the verification docs. The shared harness still expands into the existing per-source nextest names, but obligation identity is no longer passed through raw strings.
Problem
#1981 asks Sinex to compress repeated test patterns without weakening affected-test observability. The required-input-key slice already landed, but the production-path harness still used string obligation names internally, hourly/daily summarizer tests repeated UTC bucket-boundary setup, and gate cadence guidance was scattered across prose.
Solution
ProductionPathObligationand use it inProductionPathCase,_run_case, and record-fixture variants.utc_hour_startandutc_day_starthelpers for summarizer tests.Gate Cadencematrix toxtask/docs/verification.mdcovering focused PR loops, PR publish boundaries, verification-policy PRs, release boundaries, and scheduled broad sweeps.Verification
env -u SINEX_ROOT nix develop /realm/tmp/worktrees/sinex-1981-test-patterns --command xtask fix --fmt-only --format human- passed.env -u SINEX_ROOT nix develop /realm/tmp/worktrees/sinex-1981-test-patterns --command xtask test --allow-contended-host -p sinexd --test production_path --format human- 54 passed, 0 failed.env -u SINEX_ROOT nix develop /realm/tmp/worktrees/sinex-1981-test-patterns --command xtask test --allow-contended-host -p sinexd --test automata -E 'test(daily_summarizer) or test(hourly_summarizer)' --format human- 7 passed, 0 failed.env -u SINEX_ROOT nix develop /realm/tmp/worktrees/sinex-1981-test-patterns --command xtask check --changed-strict origin/master --allow-contended-host --format human- 4 changed Rust files, affected packagesinexd, passed.xtask check --changed-strict origin/master --allow-contended-host- 1 package checked, passed.Ref #1981
Summary by CodeRabbit
Tests
Documentation