Repository navigation
refactor(tests): consolidate production-path harness (#1981) - #1988
Conversation
Problem: #1981 still had duplicated production-path source tests and file fixture setup after the required-input-key slice landed. The duplication made it easy to change one source-family obligation shape without updating the others, while the issue explicitly requires preserving nextest-visible case names. What changed: add a ProductionPathCase helper and migrate the regular production-path source obligations to named case constants, leaving parser-specific and path-sensitive tests explicit. Factor append-only/static file fixture setup through one helper while keeping semantic wrapper modules. Record reopened source-package blockers in the smoke matrix with issue-backed metadata, and add PR/docs guidance for impact evidence without introducing a new proof ledger. Verification: nix develop --command xtask test --allow-contended-host -p sinexd --test production_path --format human (exact reusable proof from invocation 8: 49 passed); git diff --check. Ref #1981 Co-Authored-By: Claude <[email protected]>
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Free Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughIntroduces a ChangesProductionPathCase harness, fixture consolidation, smoke matrix, and docs
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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: feebd4a11e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| &["browser.tab.active"], | ||
| ); | ||
|
|
||
| const CLIPBOARD_CASE: crate::ProductionPathCase = crate::ProductionPathCase::new( |
There was a problem hiding this comment.
Preserve the window-manager obligation case
This migrated ProductionPathCase block omits the existing desktop.window-manager case: the parent had desktop_window_manager_obligations calling _run_case("desktop.window-manager", AdapterKind::UnixSocket, ..., ALL_OBLIGATIONS), and repo-wide search now finds no run_production_path_case/_run_case coverage for that source. The remaining desktop_window_manager_unix_socket_adapter_parses_hyprland_frame only checks two parsed frames, so replay/isolation/privacy stop running even though the smoke matrix still cites an obligation harness for desktop.window-manager.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 066e5f0: restored desktop_window_manager_obligations over the real Hyprland Unix-socket fixture and covered replay, isolation, and metadata-only privacy for desktop.window-manager. Focused verification: xtask test --allow-contended-host -p sinexd --test production_path --format human passed 50/50; pre-push xtask check --changed-strict origin/master --allow-contended-host passed for sinexd.
Problem: the production-path harness consolidation dropped the desktop.window-manager obligation test while the smoke matrix still described it as covered. That left the Unix socket adapter/parser path tested but not the replay, isolation, and metadata-only privacy obligations for the source. What changed: shared the Hyprland socket fixture parsing helper between the parser assertion test and a restored desktop.window-manager obligation test. The obligation test now proves deterministic replay, fixture isolation, and metadata-only privacy handling for the UnixSocket path. Verification: xtask test --allow-contended-host -p sinexd --test production_path --format human (50 passed, 0 failed).
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 Consolidates the production-path source test harness without collapsing nextest-visible case names. The branch also factors duplicated append-only/static file fixture setup and records reopened source package gaps in the smoke matrix with issue-backed blocker metadata. Problem #1981 was reopened because #1983 only handled the required-input-key slice. Production-path source tests still repeated the same `_run_case` setup across source families, and append-only/static fixtures duplicated identical temp-file wiring. The issue explicitly asks to compress implementation while preserving per-case observability. Solution Added `ProductionPathCase` and `run_production_path_case` to keep the shared source-path law in one helper while leaving each test function named for nextest and impact evidence. Migrated the regular production-path obligation tests to named case constants, while leaving parser-specific, path-sensitive, and directory-entry cases explicit. Factored file fixture creation into `build_file_fixture` while preserving the append-only and static wrapper modules. Updated the smoke matrix to treat #847/#1033/#1043/#1469 package gaps as issue-backed blockers rather than pretending they are obsolete. Acceptance Matrix - Satisfied: production-path source tests now share the common case runner while preserving named tests. - Satisfied: append-only/static file fixtures share setup without erasing their semantic wrapper modules. - Satisfied: gate visibility/cadence now asks PRs to record `xtask impact explain --json` or broad full-test evidence when the affected/default-test choice matters. - Inspected/current: compile-fail runners already use wildcard runners while preserving individual diagnostic fixtures, so this PR does not churn them. - Still open in #1981: replay, chaos, and summarizer harness cleanup. This PR intentionally references #1981 rather than closing it. Verification - `nix develop --command xtask test --allow-contended-host -p sinexd --test production_path --format human` — 49 passed, 0 failed. - `nix develop --command xtask check --changed-strict origin/master --allow-contended-host --format human` — 1 affected package (`sinexd`) checked, all passed. - `git diff --check` — passed. Ref #1981 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **Documentation** * Updated the pull request verification checklist to clarify when and how to record impact evidence, including the appropriate command patterns for normal vs broad testing scopes. * **Tests** * Improved production-path obligation coverage by introducing reusable production-path test cases, simplifying how tests run the harness, and refining smoke-matrix validation to support explicitly blocked entries with documented blocker evidence. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude <[email protected]>
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 Consolidates the production-path source test harness without collapsing nextest-visible case names. The branch also factors duplicated append-only/static file fixture setup and records reopened source package gaps in the smoke matrix with issue-backed blocker metadata. Problem #1981 was reopened because #1983 only handled the required-input-key slice. Production-path source tests still repeated the same `_run_case` setup across source families, and append-only/static fixtures duplicated identical temp-file wiring. The issue explicitly asks to compress implementation while preserving per-case observability. Solution Added `ProductionPathCase` and `run_production_path_case` to keep the shared source-path law in one helper while leaving each test function named for nextest and impact evidence. Migrated the regular production-path obligation tests to named case constants, while leaving parser-specific, path-sensitive, and directory-entry cases explicit. Factored file fixture creation into `build_file_fixture` while preserving the append-only and static wrapper modules. Updated the smoke matrix to treat #847/#1033/#1043/#1469 package gaps as issue-backed blockers rather than pretending they are obsolete. Acceptance Matrix - Satisfied: production-path source tests now share the common case runner while preserving named tests. - Satisfied: append-only/static file fixtures share setup without erasing their semantic wrapper modules. - Satisfied: gate visibility/cadence now asks PRs to record `xtask impact explain --json` or broad full-test evidence when the affected/default-test choice matters. - Inspected/current: compile-fail runners already use wildcard runners while preserving individual diagnostic fixtures, so this PR does not churn them. - Still open in #1981: replay, chaos, and summarizer harness cleanup. This PR intentionally references #1981 rather than closing it. Verification - `nix develop --command xtask test --allow-contended-host -p sinexd --test production_path --format human` — 49 passed, 0 failed. - `nix develop --command xtask check --changed-strict origin/master --allow-contended-host --format human` — 1 affected package (`sinexd`) checked, all passed. - `git diff --check` — passed. Ref #1981 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **Documentation** * Updated the pull request verification checklist to clarify when and how to record impact evidence, including the appropriate command patterns for normal vs broad testing scopes. * **Tests** * Improved production-path obligation coverage by introducing reusable production-path test cases, simplifying how tests run the harness, and refining smoke-matrix validation to support explicitly blocked entries with documented blocker evidence. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude <[email protected]>
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
Consolidates the production-path source test harness without collapsing nextest-visible case names. The branch also factors duplicated append-only/static file fixture setup and records reopened source package gaps in the smoke matrix with issue-backed blocker metadata.
Problem
#1981 was reopened because #1983 only handled the required-input-key slice. Production-path source tests still repeated the same
_run_casesetup across source families, and append-only/static fixtures duplicated identical temp-file wiring. The issue explicitly asks to compress implementation while preserving per-case observability.Solution
Added
ProductionPathCaseandrun_production_path_caseto keep the shared source-path law in one helper while leaving each test function named for nextest and impact evidence. Migrated the regular production-path obligation tests to named case constants, while leaving parser-specific, path-sensitive, and directory-entry cases explicit. Factored file fixture creation intobuild_file_fixturewhile preserving the append-only and static wrapper modules. Updated the smoke matrix to treat #847/#1033/#1043/#1469 package gaps as issue-backed blockers rather than pretending they are obsolete.Acceptance Matrix
xtask impact explain --jsonor broad full-test evidence when the affected/default-test choice matters.Verification
nix develop --command xtask test --allow-contended-host -p sinexd --test production_path --format human— 49 passed, 0 failed.nix develop --command xtask check --changed-strict origin/master --allow-contended-host --format human— 1 affected package (sinexd) checked, all passed.git diff --check— passed.Ref #1981
Summary by CodeRabbit
Release Notes
Documentation
Tests