Repository navigation
test(lsp): bind Windows command expectations to selected workspace root (#4001) - #4351
Conversation
|
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 55 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 |
EffortlessSteven
left a comment
There was a problem hiding this comment.
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.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
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_starttest still names the literal/workspacefixture 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.
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 exampleD:/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
ripr-swarmSource-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
Production delta: none.
Evidence delta:
crates/ripr/src/lsp/tests.rsexpected-root handling in three tests. Typedroot: "."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
This removes a false negative in Windows evidence; it establishes no new installed-product support claim.
Policy Impact
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:/workspaceversus expected/workspace.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, andseam_code_actions_surface_packet_assertion_related_test_and_refresheach 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-reviewartifactub-review-4351has gatepass, terminalneeds-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: existingagent::loop_commands::bound_rootandshell_arg. Golden outputs and metrics: unchanged.Static Language Check
CI Economics
n/a; no workflow or gate changed. Existing
windows-cilabel requests the Windows Advisory lane.Engineering Check
Gates