Skip to content

test(lsp): expect the bound --root in three editor command tests on Windows - #4354

Closed
EffortlessSteven wants to merge 1 commit into
mainfrom
claude/windows-lsp-tests-5w9jn0
Closed

EffortlessSteven wants to merge 1 commit into
mainfrom
claude/windows-lsp-tests-5w9jn0

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Requested by Steven · project thread

Summary

Before: three lsp::tests unit 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 /workspace has a root but no drive, so it is not absolute, and bound_root resolves it against the working directory's drive. The product output is correct. The tests kept the pre-#4287 literal, or passed /workspace unbound to the builders (root_display keeps a non-absolute root verbatim).

  • seam_code_actions_surface_packet_assertion_related_test_and_refresh (failed at tests.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 /workspace once with bound_root in 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

  • ordinary feature, analyzer, editor, docs, spec, fixture, badge, dependency, or repo-ops development for ripr-swarm

Source-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

  • Test expectations only, one file: crates/ripr/src/lsp/tests.rs.

Scope Classification

  • Docs/spec/test-only evidence package

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

  • none

Policy Impact

  • none

Proof

cargo test -p ripr --lib -- <the three tests>   # 3 passed (Linux)
cargo xtask precommit                            # exit 0

Windows proof is the windows-ci lane 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

  • Tests: crates/ripr/src/lsp/tests.rs
  • Code: crates/ripr/src/agent/loop_commands.rs (bound_root), unchanged

Static Language Check

  • Static output avoids killed, survived, untested, proven, and adequate.

CI Economics

n/a

🤖 Generated with Claude Code

https://claude.ai/code/session_01VPR24xcGRrB15yPfQfR1Nm


Generated by Claude Code

…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
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@EffortlessSteven EffortlessSteven added the windows-ci Run the advisory Windows lane on a pull request without opting into every full-ci lane. label Sep 28, 2026 — with Claude
@coderabbitai

coderabbitai Bot commented Sep 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 16 minutes.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 364edbc3-af9b-4dab-9d30-388a5f5dfaff

📥 Commits

Reviewing files that changed from the base of the PR and between 26a9740 and 70640e0.

📒 Files selected for processing (1)
  • crates/ripr/src/lsp/tests.rs

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@EffortlessSteven EffortlessSteven self-assigned this Sep 28, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Sibling scan on head 70640e0:

  • grep -rn --include='*.rs' -e '--root /workspace' crates xtask returns nothing. The two literal expectations were at tests.rs:4110 and :4245, and both are replaced here.
  • No loop_commands::*command*( builder call in crates/ripr/src still receives an unbound "/workspace" root. The two in the :12734 test now take &bound_workspace.
  • Windows Advisory run 36371134349 failed exactly these three lsp::tests in both runs, so no other test showed this failure. The windows-ci run on this head is the platform proof.

The test-local bind_workspace() helper stays out, as the review suggests, because it would widen the scope.


Generated by Claude Code

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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..." against right: "...--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

Copy link
Copy Markdown
Member Author

Closing this as superseded by #4351, which merged to main as 75fef0a while this PR was in CI.

#4351 makes the same change to the same three tests. It binds /workspace with loop_commands::bound_root and uses that value in every command expectation, including the packet, brief, after-snapshot and verify builders. Merging main into this branch conflicts on exactly those lines, and after #4351 nothing is left here to add.

The Windows evidence from this head still applies to that fix, because the expectations are semantically identical. Windows Advisory job 108775977916 on 70640e0 ran twice, with both runs completed_clean at 8692 pass and 0 fail. All three tests passed in both runs.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

windows-ci Run the advisory Windows lane on a pull request without opting into every full-ci lane.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants