Repository navigation
test(lsp): bind /workspace expectations like the producer binds its root (#3922) - #4355
EffortlessSteven wants to merge 2 commits into
Conversation
…s its root #4287 binds every generated --root to the absolute selected root. The fixture root /workspace is drive-relative on Windows, so the producer renders D:/workspace while three code-action tests hard-coded /workspace and failed in both Windows advisory runs (#3922). Bind the expectations with the same bound_root, as the brief-command assertion in this file already does. Unchanged on Unix. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014vWbhn6X7qSCyTeo6L1aF8
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reachedNext included review available in 59 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- Pre-existing Windows clippy failure at output/markdown.rs:838 (map_err(|_| ...)) is explicitly out of scope per PR body and predates this change; not introduced here. Worth noting so a future lane does not re-raise it as a regression.
Verification questions
- Confirm bounded scan did not exhaustively grep for other literal "/workspace" expectations across lsp/tests.rs; broader sibling coverage not proven.
- Confirm native Windows correctness is claimed but not proven in this lane's evidence. Author defers to windows-ci label; cargo-check --target x86_64-pc-windows-gnu is clean but compile-clean is not assertion-clean.
Refuted
- Test could be made platform-conditional instead of binding to producer output, leaving the underlying host assumption undertested.; refuted because: Out of scope for this PR (tests-only fix). Binding to producer output is the right minimal change to keep the existing assertions meaningful without restructuring fixtures or introducing cfg windows gates.
- The producer itself is wrong on Windows and this PR papering over a product bug.; refuted because: PR body and #4287 history establish real LSP roots come from file:// URIs (drive-absolute on Windows); only fixture /workspace is drive-relative, so binding it in expectations is test-only and correct.
- The fixture-root-binding change leaks into production code or expands a public API surface.; refuted because: crates/ripr/src/lsp/tests.rs is a test file; the diff is confined to four assert_eq expectations. bound_root/shell_arg are already public test-accessible items used at lsp/tests.rs:12673, so no new surface is added.
- A more robust fix would refactor the producer to also drive-bind via file:// URI parsing rather than special-casing /workspace in tests; refuted because: Out of scope for a test-only portability fix; the producer already binds via bound_root per #4287. Changing the producer would be a separate concern and is explicitly not what this PR does. Test fix is the smallest-complete-fix for the stated failure.
Parked follow-ups
- Two of the four sites duplicate the bound_root+shell_arg+format! pattern inline; a thin
expected_repair_roottest helper would reduce repetition.
Evidence gaps
- Native Windows proof is remote via windows-ci label; no in-PR Linux/Unix run exercises the new drive-bound path.
- Model proof intent was rejected by deterministic validation.
|
This answers the ub-review verification questions. Other Native Windows. Agreed that a clean compile is not the same as clean assertions. The Parked helper. It stays as is. Two sites repeating one Generated by Claude Code |
… expectations The first Windows run on this PR fixed two of the three tests. The third still failed at lsp/tests.rs:4137. Its packet, brief, after-snapshot and verify expectations passed the unbound fixture root into the builders, but the producer passes bound_root(root). Bind the root once where the test defines it. Unchanged on Unix. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014vWbhn6X7qSCyTeo6L1aF8
|
Closing as superseded by #4351, which merged at 04:11Z with the same fix. It binds all three tests' expected roots through Generated by Claude Code |
🤖 Generated with Claude Code
https://claude.ai/code/session_014vWbhn6X7qSCyTeo6L1aF8
Before: on native Windows, three LSP code-action tests failed in both advisory runs (job 108767554694):
execute_command_collect_evidence_context_returns_editor_packet_for_known_seamrepair_start_is_offered_only_for_a_seam_past_the_repair_packet_flipseam_code_actions_surface_packet_assertion_related_test_and_refreshThey pass on Linux. Each was an
assert_eqon a generated--root.After: the expectations bind the fixture root the way the producer does, so the tests hold on both hosts.
This changes test expectations only. #4287 binds every generated
--rootto the absolute selected root throughagent::loop_commands::bound_root. The fixture root/workspaceis absolute on Unix but drive-relative on Windows, so the producer renders it joined to the current drive (D:/workspace), while these tests hard-coded/workspaceor passed it throughroot_display. The fix wraps the expected root inbound_root("/workspace"). The brief-command assertion in the same test already does this (workspace_rootatlsp/tests.rs:12673). On Unix the value is byte-identical, so nothing changes there. Real LSP roots come fromfile://URIs, which are drive-absolute on Windows, so this is not a product defect.How: four expectation sites in
crates/ripr/src/lsp/tests.rs.Checks:
cargo check --tests --target x86_64-pc-windows-gnuis clean.cargo xtask precommitexit 0.windows-cilabel.Not in this PR:
cargo clippy --target x86_64-pc-windows-gnu -D warningsalready fails on main atoutput/markdown.rs:838, where a Windows-only test usesmap_err(|_| ...). It predates this change, and no required lane runs Windows clippy.Review providers: CodeRabbit (rate-limited) and Devin (credits) are unavailable, so their review is missing, not clean.
Generated by Claude Code