Repository navigation
refactor(tests): collapse production-path case boilerplate - #2008
Conversation
Problem: #1981 tracks test-harness cleanup where production-path source tests repeated the same run_production_path_case wrapper for ordinary named cases. The repetition made fixture coverage harder to scan and encouraged copy/paste edits across source families.\n\nWhat changed: add a production_path_case_test! macro in the production-path harness and convert the straightforward case-wrapper tests for AI sessions, browser history, desktop ActivityWatch/clipboard, documents, export parsers, health exports, and social exports. Parser-specific and special harness tests stay explicit.\n\nVerification: env -u SINEX_ROOT nix develop /realm/tmp/worktrees/sinex-1981-verify --command xtask test --allow-contended-host -p sinexd -E '<19 production-path case tests>' --format human reused exact proof from invocation 2: passed=19, status=success.
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Free Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughA new ChangesTest macro introduction and adoption
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 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 Collapse repeated production-path source test wrappers into one shared harness macro while preserving the existing per-source fixture assertions. Problem #1981 tracks verifiability cleanup where tests should keep affected-source evidence but stop repeating identical harness ceremony. The production-path source tests had many copies of the same run_production_path_case wrapper body, making source-family coverage harder to scan and easier to drift. Solution Add production_path_case_test! in the production-path test harness and convert the straightforward named ProductionPathCase wrappers for AI sessions, browser history, desktop ActivityWatch/clipboard, documents, export parsers, health exports, and social exports. Special harness tests and parser-specific behavior tests stay explicit. Verification - env -u SINEX_ROOT nix develop /realm/tmp/worktrees/sinex-1981-verify --command xtask test --allow-contended-host -p sinexd -E '<19 production-path case tests>' --format human reused exact proof from invocation 2: passed=19, status=success. - env -u SINEX_ROOT nix develop /realm/tmp/worktrees/sinex-1981-verify --command xtask check --changed-strict origin/master --allow-contended-host --format human passed: 8 changed Rust files, 1 affected package, sinexd passed. Ref #1981.
Summary Collapse repeated production-path source test wrappers into one shared harness macro while preserving the existing per-source fixture assertions. Problem #1981 tracks verifiability cleanup where tests should keep affected-source evidence but stop repeating identical harness ceremony. The production-path source tests had many copies of the same run_production_path_case wrapper body, making source-family coverage harder to scan and easier to drift. Solution Add production_path_case_test! in the production-path test harness and convert the straightforward named ProductionPathCase wrappers for AI sessions, browser history, desktop ActivityWatch/clipboard, documents, export parsers, health exports, and social exports. Special harness tests and parser-specific behavior tests stay explicit. Verification - env -u SINEX_ROOT nix develop /realm/tmp/worktrees/sinex-1981-verify --command xtask test --allow-contended-host -p sinexd -E '<19 production-path case tests>' --format human reused exact proof from invocation 2: passed=19, status=success. - env -u SINEX_ROOT nix develop /realm/tmp/worktrees/sinex-1981-verify --command xtask check --changed-strict origin/master --allow-contended-host --format human passed: 8 changed Rust files, 1 affected package, sinexd passed. Ref #1981.
Summary
Collapse repeated production-path source test wrappers into one shared harness macro while preserving the existing per-source fixture assertions.
Problem
#1981 tracks verifiability cleanup where tests should keep affected-source evidence but stop repeating identical harness ceremony. The production-path source tests had many copies of the same
#[sinex_test] async fn ... { run_production_path_case(...).await ... }body, making source-family coverage harder to scan and easier to drift.Solution
Add
production_path_case_test!in the production-path test harness and convert the straightforward namedProductionPathCasewrappers for AI sessions, browser history, desktop ActivityWatch/clipboard, documents, export parsers, health exports, and social exports. Special harness tests and parser-specific behavior tests stay explicit.Verification
env -u SINEX_ROOT nix develop /realm/tmp/worktrees/sinex-1981-verify --command xtask test --allow-contended-host -p sinexd -E '<19 production-path case tests>' --format humanreused exact proof from invocation 2: passed=19, status=success.env -u SINEX_ROOT nix develop /realm/tmp/worktrees/sinex-1981-verify --command xtask check --changed-strict origin/master --allow-contended-host --format humanpassed: 8 changed Rust files, 1 affected package,sinexdpassed.Ref #1981.
Summary by CodeRabbit