Repository navigation
test(lsp): expect the bound --root in three editor command tests on Windows - #4354
EffortlessSteven wants to merge 1 commit into
Conversation
…indows #4287 made generated commands carry the absolute selected root. On Windows `/workspace` has a root but no drive, so `bound_root` resolves it against the working directory and renders `D:/workspace`. Three LSP tests still expected the literal `/workspace` (or fed it unbound to the loop-command builders), so they failed twice on native Windows (Windows Advisory run 36371134349): - seam_code_actions_surface_packet_assertion_related_test_and_refresh - repair_start_is_offered_only_for_a_seam_past_the_repair_packet_flip - execute_command_collect_evidence_context_returns_editor_packet_for_known_seam The product output is correct; the expectations now bind the root the way production does. On Unix `bound_root("/workspace")` is `/workspace`, so the Linux assertions are byte-for-byte unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VPR24xcGRrB15yPfQfR1Nm
|
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 16 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
- Scope-limited fix: only three named tests adjusted. If other generated-command tests exist elsewhere that compare literal '/workspace' strings under #4287 binding, they were not in this diff and may still Windows-flake.
- No code-arch duplication remains after consolidation of bound_root calls; if a fourth test appears later, extracting a tiny test-local
bind_workspace()would keep the call sites uniform, but doing it now would expand scope beyond the three failing tests.
Verification questions
- Confirm sibling-path scan: no other '/workspace' literal assertions for bound-root command strings remain in tests.rs or other ripr sources that would still fail on Windows.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
|
Sibling scan on head
The test-local Generated by Claude Code |
EffortlessSteven
left a comment
There was a problem hiding this comment.
Exact-head review: 70640e017871921deda032931dc46ca7cd9f2a61
Disposition: REVIEW_READY. No blocking findings.
Diff. One file, crates/ripr/src/lsp/tests.rs, +14/-7. The change is test expectations only; no production code moves.
Semantic owner. agent::loop_commands::bound_root (#4287) owns how a generated --root is rendered. The production output on Windows (D:/workspace) is correct, because /workspace has a root but no drive, so Path::is_absolute is false and bound_root_path joins it to the working directory. The tests now route through the same owner, the pattern the neighbouring receipt, brief and repair assertions already used (tests.rs:1333, :12673, the old :4181).
Oracle.
- Linux:
bound_root("/workspace") == "/workspace", so every Linux assertion is byte-for-byte unchanged. - Windows: the expectations now pin the drive-bound form, so a regression that stopped binding the LSP root would fail these tests there.
- Before the change, Windows Advisory run 36371134349 failed all three tests in both runs, each with
left: "...--root D:/workspace..."againstright: "...--root /workspace...".
Platform proof on this head. Windows Advisory job 108775977916: Run 1 and Run 2 both completed_clean, 8692 pass and 0 fail each. All three tests read ... ok in the readable window, and all nine release-seam controls pass twice.
Sibling scan. Nothing else in crates or xtask asserts a literal --root /workspace or hands an unbound "/workspace" to a loop-command builder (details in the comment above).
CI on this head. Rust gates (GitHub-hosted), Rust-only feature lane, cargo-deny, dependency-review, GitGuardian, pr-plan and ub-review are green. droid-review is still queued.
Review coverage. ub-review's one question (the sibling scan) is answered. CodeRabbit was rate-limited and Gemini is out of quota, so both reviews are missing, not clean.
Generated by Claude Code
|
Closing this as superseded by #4351, which merged to main as #4351 makes the same change to the same three tests. It binds The Windows evidence from this head still applies to that fix, because the expectations are semantically identical. Windows Advisory job 108775977916 on Generated by Claude Code |
Requested by Steven · project thread
Summary
Before: three
lsp::testsunit tests failed twice on native Windows (Windows Advisory run 36371134349, job 108767554694, on #4263's merge ref). Each expected--root /workspace; the product rendered--root D:/workspace.After: the tests expect the root bound the way production binds it, so they pass on Windows. On Linux and macOS the assertions are byte-for-byte unchanged.
#4287 made generated commands carry the absolute selected root through
loop_commands::bound_root. On Windows/workspacehas a root but no drive, so it is not absolute, andbound_rootresolves it against the working directory's drive. The product output is correct. The tests kept the pre-#4287 literal, or passed/workspaceunbound to the builders (root_displaykeeps a non-absolute root verbatim).seam_code_actions_surface_packet_assertion_related_test_and_refresh(failed attests.rs:4107)repair_start_is_offered_only_for_a_seam_past_the_repair_packet_flip(:4257)execute_command_collect_evidence_context_returns_editor_packet_for_known_seam(:12734)How: bind
/workspaceonce withbound_rootin each test and use it in every command expectation. The first and third tests already did this for some commands (receipt, brief, repair); the rest now match.Swarm / Source Boundary
ripr-swarmSource-of-truth Links
Governing issue or accepted claim: Windows release-seam row on #3922; regression from #4287.
Acceptance delta (one sentence): the three LSP unit tests pass on native Windows.
Candidate Relationships
Candidate branch:
claude/windows-lsp-tests-5w9jn0. No stack parent or replacement. No open PR or issue owned these tests.Scope
crates/ripr/src/lsp/tests.rs.Scope Classification
Production delta: none.
Single acceptance criterion: the three tests pass twice in the Windows Advisory lane on this head.
Non-goals: #4350 (ripr cannot spawn git under a root past MAX_PATH).
Support-tier Impact
Policy Impact
Proof
Windows proof is the
windows-cilane on this head: before, all three FAILED in both runs of 36371134349.Claim Boundary
May claim: these three tests no longer fail on Windows because of the drive-less root. Must not claim: Windows LSP behavior beyond these tests.
Rollback
Revert the commit; no production code changes.
Spec-Test-Code Traceability
crates/ripr/src/lsp/tests.rscrates/ripr/src/agent/loop_commands.rs(bound_root), unchangedStatic Language Check
killed,survived,untested,proven, andadequate.CI Economics
n/a
🤖 Generated with Claude Code
https://claude.ai/code/session_01VPR24xcGRrB15yPfQfR1Nm
Generated by Claude Code