Repository navigation
test(lsp): preserve changed test-file exclusion - #2137
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Summary by CodeRabbit
WalkthroughChangesThe LSP test suite adds a git-backed integration fixture that verifies changed test files are excluded from published diagnostics while changed production files still produce findings. Process allowlist entries permit the fixture’s git subprocess setup. LSP diagnostic scoping
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
The issue correction changes the interpretation of the original report: this is not evidence that the LSP should be made CLI-parity scoped per open file. I rechecked current main and the existing contract is explicit: Instant-mode changed Rust analysis excludes test paths before probe generation (crates/ripr/src/analysis/language/rust.rs:661-669), while the LSP workspace adapter publishes the resulting diagnostic batches (crates/ripr/src/lsp/diagnostics.rs:627-790). I am keeping this PR as a narrow regression guard for that current workspace-diagnostics contract, but I am removing the claim that it fixes the original volume comparison. The issue's remaining category/guidance concern stays with #2131. |
|
Rebased onto current main (d3b8f11 → 8b09017). The earlier required-lane failure ran before #2201 landed (the xtask cwd-guard flake that was failing unrelated PRs); this branch's test passes locally on current main ( |
d3b8f11 to
8b09017
Compare
|
Correction to my earlier hypothesis: the rebase did not fix CI because the failure was not the #2201 cwd flake. The real failure was |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3117fd0bc3
ℹ️ 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".
| &root.path, | ||
| &["add", "Cargo.toml", "src/lib.rs", "tests/end_to_end.rs"], | ||
| )?; | ||
| run_lsp_scope_git(&root.path, &["commit", "-m", "base"])?; |
There was a problem hiding this comment.
Disable inherited git signing in the fixture commits
This new temp-repo setup skips the local commit.gpgSign false that init_lsp_test_scope_repo uses for the neighboring LSP scope fixtures. On a developer/runner with global commit.gpgSign=true, the first fixture commit fails before the scoping assertions run; reproduced with GIT_CONFIG_GLOBAL=<file containing [commit] gpgSign=true> cargo test -p ripr workspace_diagnostics_exclude_changed_test_files_from_published_findings, while the existing helper-backed scope test passes under the same config. Reuse the existing helper or set the same local git config before committing, then rerun that targeted test.
Useful? React with 👍 / 👎.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
What this does
Pins the current LSP workspace-diagnostics scope contract: in Instant mode, a changed production Rust file can produce a diagnostic, while a changed
tests/file is indexed as part of the diff but must not produce a finding.This is a regression test for the existing Rust analysis guard and its LSP batch projection. It does not claim CLI/LSP output-count parity or resolve the original per-file volume comparison in #2130.
Verification
cargo clippy -p ripr --lib -- -D warningscargo fmt --check,git diff --checkcargo xtask precommitReview map
crates/ripr/src/analysis/language/rust.rs: changed test paths are excluded from probe generation.crates/ripr/src/lsp/diagnostics.rs: workspace findings are projected into URI batches.crates/ripr/src/lsp/tests.rs: end-to-end fixture covering production and test-file changes.Related: #2130
Follow-up guidance semantics: #2131