Skip to content

test(lsp): bind Windows command expectations to selected workspace root (#4001) - #4351

Merged
EffortlessSteven merged 2 commits into
mainfrom
codex/4001-windows-root-expectations
Sep 28, 2026
Merged

EffortlessSteven merged 2 commits into
mainfrom
codex/4001-windows-root-expectations

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Summary

Three LSP command tests added by #4287 expect a literal --root /workspace. On native Windows, that fixture resolves to the selected drive root (for example D:/workspace), so all three tests fail twice even though the generated command is correctly bound. This patch derives the expected display root from the same selected fixture root and keeps exact command and portable typed-root assertions.

Swarm / Source Boundary

  • ordinary editor/test development for ripr-swarm

Source-of-truth Links

Governing issue: #4001 (partially delivered by #4287). Native Windows observation: #4287 advisory run, repeated on #4263 advisory run.

Acceptance delta: the three existing LSP command oracles accept a platform-correct absolute selected root while still rejecting commands bound to another root.

Candidate Relationships

Candidate branch: codex/4001-windows-root-expectations.
Stack parent: none.
Related: #4263 adds separate native path journeys and is not changed here.

Scope

  • Docs/spec/test-only evidence package

Production delta: none.
Evidence delta: crates/ripr/src/lsp/tests.rs expected-root handling in three tests. Typed root: "." and exact command assertions remain.

Single acceptance criterion: the three tests pass on Windows while retaining their selected-root assertions.
Non-goals: changing command production, fixing #4263's long-root Git spawn (#4350), completing #4001's remaining editor controls, release publication.

Support-tier Impact

  • none

This removes a false negative in Windows evidence; it establishes no new installed-product support claim.

Policy Impact

  • none

Proof

Inherited baseline: #4287 Windows Advisory run 36363176944/job 108744279586 and #4263 run 36371134349/job 108767554694 each had the same three LSP tests fail in both repetitions: actual D:/workspace versus expected /workspace.

rustfmt --edition 2024 --check crates/ripr/src/lsp/tests.rs   PASS (local)
git diff --check origin/main...HEAD                        PASS (local)

Exact-head native Windows Advisory run 36373553237, job 108774730927, on da90c8491823c66b919737bc7a1e99d800607edc: execute_command_collect_evidence_context_returns_editor_packet_for_known_seam, repair_start_is_offered_only_for_a_seam_past_the_repair_packet_flip, and seam_code_actions_surface_packet_assertion_related_test_and_refresh each passed in the no-default-features run and both workspace-test repetitions. Both full repetitions completed with cargo exit 0: 8,692 passed, 0 failed, 29 targets each. No-default-features check/test and all-features check passed. The advisory workflow status alone is not the test verdict; these counts and named results come from its raw job log.

The exact-head ub-review artifact ub-review-4351 has gate pass, terminal needs-reviewer-attention, and limited analysis (5/6 usable model lanes, no blocking findings); it is not substantive final approval. Required Routed Rust Small run 36373553485, job 108778997447, completed successfully on the exact head: formatting, policy, workspace check, strict Clippy, required Rust tests (fresh nonempty JUnit), doctests, golden/fixture contracts, and PR evidence all passed. Droid Auto Review is pending.

Local Cargo check/test/precommit: not run to avoid recurrent local terminal-host spawning and a redundant build while hosted exact-head native Windows proof ran.

Claim Boundary

May claim only that these three LSP test expectations match the host's selected-root display after exact-head Windows tests pass. This does not prove the rest of #4001, long roots, or installed editor behavior.

Rollback

Revert the test-only commit. No production or policy state changes.

Spec-Test-Code Traceability

Spec/claim: #4001. Tests: 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. Code: existing agent::loop_commands::bound_root and shell_arg. Golden outputs and metrics: unchanged.

Static Language Check

  • Static output avoids unsupported runtime mutation claims.
  • Unknowns include exact-head hosted status.

CI Economics

n/a; no workflow or gate changed. Existing windows-ci label requests the Windows Advisory lane.

Engineering Check

  • No new panic-family call or macro in production or tests.
  • No new source, process, network, dependency, or public-schema surface.

Gates

  • Exact-head required Rust checks: Routed Rust Small run 36373553485 succeeded.
  • Exact-head native Windows tests: both repetitions passed in run 36373553237 (advisory).

@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 ChatGPT Codex Connector
@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 55 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: 53981d75-d7cc-43d9-b3fe-4fe2f231c1e2

📥 Commits

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

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

reviewed_head_sha: da90c84
integration_basis: PR target main; original base 26a9740, current main 1a46558 (an unrelated dependency-receipt docs merge). GitHub reports CLEAN/MERGEABLE and the changed file does not overlap that merge.
claim_boundary: repair three platform-specific LSP test expectations from #4287/#4001; no production command, long-root, installed-editor, or whole-#4001 support claim
changed_surfaces_and_semantic_owners_inspected: complete one-file tests.rs diff and all three test contexts; agent::loop_commands::bound_root/root_path_display/shell_arg and LSP actions/backend selected-root command creation; #4001 premise; exact-head Windows/Rust jobs; retained ub-review artifact; PR body and review threads
blocking_findings: none
non_blocking_suggestions: the repair-start test still names its existing literal /workspace fixture when deriving the expected bound root; deriving from a named fixture variable would reduce future drift but changes no current behavior
refuted_or_stale_findings: three prior Windows failures were literal /workspace expectations on #4287 and #4263 heads; this exact head has all three named tests passing. The ub-review summary's double-escaping objection is refuted by the shell_arg call count and exact command assertions.
proof_and_ci_observed: Windows Advisory run 36373553237/job 108774730927: all three named LSP tests pass in no-default-features and both workspace repetitions; each full repetition reports 8,692 passed/0 failed. Routed Rust Small run 36373553485/jobs 108778997447 and 108783327849 succeeded, including fmt, policy preflight, workspace check, strict Clippy, required tests/JUnit, doctests, goldens, fixtures and PR evidence. CI, Security and PR Plan succeeded. rustfmt and diff --check were run on the candidate.
proof_or_review_missing: no local Cargo build (avoids recurrent terminal-host spawning); no installed editor/package journey, owned by #3922/#2769. Gemini/CodeRabbit quota notices and pending Droid review provide no substantive review. ub-review artifact is pass but analysis limited/needs-reviewer-attention, with no blocking finding.
affected_currentness_dimensions: test oracle only; production bytes unchanged
residual_assumptions_and_non_claims: the expected root uses the same bound_root helper as production, so that helper's own contract remains a separate authority. A command incorrectly using --root . or the unbound literal would fail these exact command assertions. This patch does not cure the independent Windows >MAX_PATH Git-spawn failure (#4350).
disposition: REVIEW_READY for the three-test oracle repair on this exact head; ordinary merge convergence may proceed once the live protected gate accepts the same head.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review September 28, 2026 04:10
@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!

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-28T04:12:41.328869Z da90c84 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@EffortlessSteven
EffortlessSteven merged commit 75fef0a into main Sep 28, 2026
27 of 28 checks passed
@EffortlessSteven
EffortlessSteven deleted the codex/4001-windows-root-expectations branch September 28, 2026 04:11

@devin-ai-integration devin-ai-integration 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@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

  • repair_start_is_offered_only_for_a_seam_past_the_repair_packet_flip derives expected root from literal '/workspace' rather than a named snapshot.workspace_root variable — minor drift risk if fixture path changes, but no current behavioral impact and matches existing test convention.
  • Only the three test bodies in the diff are audited against the source-route claim. A no-match scan for unrelated '/workspace' literals elsewhere in crates/ripr/src/lsp/tests.rs was not performed; broad meta-class coverage across all LSP test entry points is not claimed.

Refuted

  • The repair_start expected command was previously asserted to be the exact literal 'ripr agent repair --root /workspace ...' on every platform, so making it platform-correct might let a command bound to a different root slip through if bound_root were ever non-deterministic.; refuted because: bound_root is a pure formatter over the input root string; with input "/workspace" it is deterministic across platforms (produces /workspace on POSIX and the Windows drive-root equivalent like D:/workspace on Windows, then shell_arg quotes). The new assertion still rejects any value other than the selected-root derivation of "/workspace", preserving the negative-oracle invariant. Routed Rust Small 36373553485 and Windows Advisory 36373553237 both green.
  • Tests would silently pass on Windows even if command production were no longer bound to the selected root (e.g. regression to '/workspace' literal or empty root); refuted because: Earlier commands[] assertions in execute_command_... test assert literal '/other-root' via bound_root('/other-root') pipeline, and seam_code_actions test asserts commands[1] bound to a different workspace literal. If production drifted away from selected-root binding, those earlier asserts would fail. The new assertions relax only the selected-root expectation, not the rejection oracle.

Parked follow-ups

  • Prior reviewers (EffortlessSteven) flagged a minor drift risk: repair_start still references the literal "/workspace" fixture when deriving expected bound root rather than a named fixture variable. Cosmetic only, no behavior change.
  • repair_start test still names the literal /workspace fixture when computing the expected bound root rather than threading a named fixture variable.
  • Confirm whether the literal '/workspace' fixture in the repair-start test derivation remains parked outside current PR scope.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.

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.

1 participant