Skip to content

fix(lsp): make the receipt fallback test host-true (#8499) - #8510

Merged
EffortlessSteven merged 3 commits into
mainfrom
fix/8499-lsp-receipt-binder
Oct 17, 2026
Merged

EffortlessSteven merged 3 commits into
mainfrom
fix/8499-lsp-receipt-binder

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

Fixes #8499. lsp::actions::tests::receipt_command_falls_back_past_a_route_it_cannot_bind asserted the POSIX outcome unconditionally: its first candidate carries a \ escape next to --root ., which the binder withholds only where the shell reads \ as an escape. Since #8153 the Windows console form treats a backslash as a literal separator, so on Windows the route binds instead of falling back, and the test failed on Windows only (hosted Linux CI cannot see it). The premise was reproduced on untouched main before this change.

The test now proves the fallback on every host and keeps the original scenario host-true:

Test-only change; no production behavior changes. Four sibling failures in lsp::gap_artifacts were found while reproducing and are filed separately as #8509, because each needs its own verdict on whether the test or the Windows production behavior is wrong.

Proof

  • Before: cargo test -p ripr --lib -- receipt_command_falls_back failed on Windows with the first candidate bound instead of withheld.
  • After: the test passes on Windows; cargo test -p ripr --lib -- lsp::actions passes 13/13.
  • The --root=. withhold and the Windows backslash binding are both production behavior that already existed; this change only makes the test assert what each host actually guarantees.

@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!

@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: a7f6593c-b217-4a41-a9c8-c1e249cdd99f
📥 Commits

Reviewing files that changed from the base of the PR and between 2f04b51 and dbab8d5.

📒 Files selected for processing: 2
  • changelog.d/8499-lsp-receipt-fallback-host.md
  • crates/ripr/src/lsp/actions.rs

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Summary by CodeRabbit

  • Tests
    • Updated cross-platform coverage for LSP receipt-command fallback. The tests now check that an unbindable --root=. candidate is skipped on all platforms, and account for the different handling of backslashes on Windows and POSIX systems.

Walkthrough

The receipt fallback test now checks the --root=. case on every host and the backslash-containing command on Windows and other platforms. A changelog entry records these test expectations. No production behavior changes are described.

Changes

Receipt fallback test

Layer / File(s) Summary
Host-specific fallback expectations
crates/ripr/src/lsp/actions.rs, changelog.d/8499-lsp-receipt-fallback-host.md
The test checks that --root=. falls through to a later bindable command on every host. It expects the backslash-containing --root . command to bind on Windows and fall back elsewhere. The changelog records these expectations.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to dbab8

The test-only change checks the receipt fallback behavior across hosts, and its expectations match the binder’s behavior. No material merge risk is established.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description explains the change, scope, host-specific behavior, test results, and known unrelated failures. However, it omits most required template sections, including source-boundary confirmatio… Complete the required template sections. Mark non-applicable sections as none or n/a, and provide the required scope, source-boundary, traceability, rollback, policy, engineering, and gate information.
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed Issue #8499 requires the receipt fallback test to pass on Windows and Linux while preserving the #4001 fallback behavior and avoiding a production change. The test now uses --root=. for the withheld…
Out of Scope Changes check Passed The changes stay within issue #8499. crates/ripr/src/lsp/actions.rs updates the affected test, and changelog.d/8499-lsp-receipt-fallback-host.md documents that test fix. No production implementati…
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 …
Title check Passed The title clearly and concisely describes the host-specific LSP receipt fallback test fix.
Full details: Linked Issues check

Explanation

Issue #8499 requires the receipt fallback test to pass on Windows and Linux while preserving the #4001 fallback behavior and avoiding a production change. The test now uses --root=. for the withheld first candidate on every host. It derives the expected bound root with bound_root and shell_arg, then checks the later candidate. It also retains the original backslash scenario with POSIX fallback and Windows binding expectations. The diff changes test code and a changelog fragment only.

Full details: Out of Scope Changes check

Explanation

The changes stay within issue #8499. crates/ripr/src/lsp/actions.rs updates the affected test, and changelog.d/8499-lsp-receipt-fallback-host.md documents that test fix. No production implementation changes or unrelated behavior changes appear in the reviewed diff.

Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)

Full details: Description check

Explanation

The description explains the change, scope, host-specific behavior, test results, and known unrelated failures. However, it omits most required template sections, including source-boundary confirmation, source-of-truth links, candidate relationships, scope classification, impact sections, claim boundary, rollback, traceability, static-language check, engineering check, and gates.

Resolution

Complete the required template sections. Mark non-applicable sections as none or n/a, and provide the required scope, source-boundary, traceability, rollback, policy, engineering, and gate information.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the routes in line,
“This root falls through; that one will bind.”
On Windows, backslashes stay,
Elsewhere, fallback leads the way.
The changelog marks the test’s design.

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.

Author self-review of the current head

Scope: one test in crates/ripr/src/lsp/actions.rs plus a changelog fragment. No production code changes.

What I checked:

  • Premise reproduced before the fix: on Windows the test failed with the first candidate bound (ripr receipt write --note it\s --root <bound> --json) where the test expected the fallback, because bind_portable_command_for withholds a backslash-carrying route only for the bash form (#8153 made that divergence deliberate).
  • The replacement first candidate (ripr receipt write --root=. --json) is payload-safe by source inspection of command_payload_is_safe_for (the exact --root token check does not match the --root=. token, and no metacharacter rule fires), and the binder withholds it on every host via the --root=. branch, so the test still proves route selection falls back past a route the binder cannot bind, now on every host.
  • The original #4001 backslash scenario is preserved verbatim for POSIX, and the Windows branch pins the rendered bound form so a future change cannot silently reverse the #8153 console semantics at the selection layer.
  • Sibling failures found during reproduction (four lsp::gap_artifacts tests) are not folded into this diff; they are filed as #8509 because at least one (substitution metacharacters) could be a production safety question rather than a test artifact.

Validation on this head (Windows): the named test passes; cargo test -p ripr --lib -- lsp::actions passes 13/13. The remaining lsp::gap_artifacts Windows failures are the pre-existing #8509 set, untouched by this diff.

Disposition: COMMENT as author self-review. Ready to mark Ready and request qualification once.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 17, 2026 16:53
@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!

@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 verification checks before upstream.

Verification questions

  • Confirm pR body reports 13/13 pass for lsp::actions after the change.
  • Confirm ripr sensor itself failed with exit code Some(2) before this lane ran; the very tool that exercises the changed crate produced no evidence, and cargo-test is only scheduled-late. The diff is small and the prior author reproduction is plausible, but no third-party host-true witness (Windows cargo-test green) is present in the packet.

Refuted

  • --root=. could be accepted by command_payload_is_safe_for on some platform (e.g. = not stripped) and bind, silently making the first arm a no-op fallback test.; refuted because: Author self-review and source structure: token-by-token check rejects --root=. as not matching the exact --root rule, and no metachar rule fires on =; binder withholds the route on both hosts via its own --root=. branch.
  • The Windows backslash case might still silently regress to fallback if cfg resolution diverges from bind_portable_command_for semantics; refuted because: cfg!(windows) is a compile-time gate on the same target as bind_portable_command_for; any divergence would manifest as compile error or test failure, not silent pass.
  • Splitting the function into two #[test]s (one host-true, one cfg-gated) would be a smaller/cleaner fix than host-branching inside one test.; refuted because: Two tests would duplicate the shared bound/fallback setup and weaken the narrative that a single test asserts fallback across all hosts; the chosen shape is the smallest complete expression of the requirement and reuses the existing setup exactly once.
  • Hypothesis A: this PR silently regresses production route selection by changing how --root=. payloads are classified.; refuted because: Diff is bounded to a #[test] body; changelog and PR body both attest no production change; --root=. withholding is asserted as pre-existing binder behavior.

Parked follow-ups

  • Author self-review notes four lsp::gap_artifacts sibling failures reproduced while diagnosing #8499 are tracked separately in #8509. Not in this PR; flagged only as parked follow-up so reviewers don't conflate scope.
  • Four sibling failures in lsp::gap_artifacts were observed during reproduction and filed separately as #8509; they are out of scope for #8510 but their existence is the strongest evidence that the Windows console branch in bind_portable_command_for needs broader test scrutiny, and #8510's cfg!(windows) pin does not address them.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.

@EffortlessSteven
EffortlessSteven marked this pull request as draft October 17, 2026 17:32
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 17, 2026 17:32
@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

Copy link
Copy Markdown
Member Author

Qualification attribution and repair

The first qualification (run 39051379319) failed in check-static-language, not in any test: my new test comment used the prohibited static-language term proven, which the gate correctly rejects in all tracked prose. The repair is the one-word synonym the gate itself suggests (demonstrated), applied to the comment and the changelog fragment. cargo xtask check-static-language now passes locally on this head. No behavior changed; requalifying once on the repaired head.

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

Verification questions

  • Confirm first arm now uses ripr receipt write --root=. --json; binder withholds this via its own --root=. branch on every host, so route selection is provably forced to the later bindable candidate everywhere.
  • Confirm no third-party Windows cargo-test green receipt is present in the packet; ripr sensor failed and cargo-test is scheduled-late. Diff is small and the author reproduction is plausible, but the host-true claim is not independently witnessed. Resolve when cargo-test lands late receipt or rerun ripr.
  • Confirm trust-affecting missing.

Refuted

  • The Windows pinned template ripr receipt write --note it\s --root {bound} --json is a copy-paste mismatch (should be the agent receipt fallback path).; refuted because: Refuted by source route: on Windows the binder returns the receipt-write route unchanged because the backslash is literal (no shell escape); the rendered form intentionally reflects the bound first-route selection, not the fallback. The POSIX arm uses fallback (agent receipt) precisely because the route is withheld and selection advances.
  • --root=. could be accepted by command_payload_is_safe_for and bind, silently making the first arm a no-op fallback test.; refuted because: Token-by-token exact --root rule rejects the --root=. token; no metachar rule fires on '='; binder withholds via its own --root=. branch on both hosts. PR body and author self-review corroborate via source structure.
  • Placing cfg!(windows) inside a unit test creates a hidden compile-time divergence risk with bind_portable_command_for, so the Windows-bound assertion could silently regress without the test catching it.; refuted because: cfg!(windows) is evaluated under the same target cfg as bind_portable_command_for's host branch; a divergence would flip exactly one side of the equality and fail the test, not silently bind. The bound form is also derived from the same shell_arg/bound_root helpers used elsewhere.

Evidence gaps

  • ripr sensor itself failed (exit Some(2)) and cargo-test is only scheduled-late; no third-party Windows green witness present in this packet for the modified test.
  • ripr sensor itself failed with exit code Some(2); the very crate under change produced no sensor evidence, and cargo-test is only scheduled-late. PR body claim '13/13 pass for lsp::actions' is not independently witnessed.
  • ripr sensor failed (exit 2) and cargo-test is only scheduled-late; the very crate under change produced no first-party host-true witness in the initial packet, only author self-review on the repaired head.
  • Model proof intent was rejected by deterministic validation.

Parked follow-ups

  • Sister #8509 fix scope is acknowledged but not in this diff; if any of those four lsp::gap_artifacts tests share the same POSIX-only-fallback premise as the test this PR fixes, they could be hiding the same Windows-only bug. Worth a follow-up sweep, not a blocker here.
  • Sibling lsp::gap_artifacts failures (4) are intentionally out of scope and tracked in #8509, so this PR's source-route claim is correctly bounded to the single test.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

CI Step 26 Golden Contract Diagnostic: Inherited Golden Drift on \main\

In run 39054188701, all code checks, strict Clippy, and 17,038 unit/integration tests passed. Step 26 \Golden output contracts\ failed on 3 fixtures:

\\ ext
drift: fixture match_arm_tuple_terminal_generated_constructor [human.txt]: formatting_only (1 line(s))
drift: fixture match_arm_tuple_terminal_imported_formatter [human.txt]: formatting_only (1 line(s))
drift: fixture match_arm_tuple_terminal_inherited_constructor [human.txt]: formatting_only (1 line(s))
\\

Root Cause:
Commit \�1669187c\ (#8493) updated \crates/ripr/src/output/human.rs\ to append \ ({base_side} base-side evidence, not candidate edit targets)\ to \Summary:\ line 5. When PR #7836 (\5fbd018b1) subsequently landed introducing these three new fixtures, their expected \human.txt\ and \human-full.txt\ goldens were not updated with that phrase.

This failure is pre-existing on \main\ and unrelated to the LSP receipt fallback test changes in this PR. A small golden re-bless PR on \main\ will clear this gate.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Qualification attribution: golden drift inherited from main

The second qualification (run 39054188701, step "Golden output contracts") fails on six match_arm_tuple_terminal_* human goldens. The drift is the (1 base-side evidence, not candidate edit targets) summary suffix appearing in the actual output: #8493 introduced that suffix, and a later main change made one finding in each of these fixtures base-side without re-blessing their goldens. I reproduced the identical drift on unmodified main locally, and it appears on Linux at this PR's merge ref, so it is not caused by this diff (this PR touches one LSP test and a changelog fragment).

The repair is already in flight as #8524, which is open and mergeable. When it lands I will merge main and requalify once. This matches the #8366 precedent of waiting for the upstream golden repair rather than blessing another claim's goldens inside an unrelated PR.

@EffortlessSteven
EffortlessSteven marked this pull request as draft October 17, 2026 19:21
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 17, 2026 19:21
@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!

@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

  • Golden output contract drift in 6 match_arm_tuple_terminal_* fixtures (inherited from #8493 / main) blocks CI step 26; author cites in-flight #8524. Not caused by this diff but currently blocks the gate.

Verification questions

  • Confirm first arm '--root=.' is safe and withheld by both safety checker and binder on every host, so fallback is forced on every host; test is not a no-op.
  • Confirm red/green proof is structurally sound on source inspection (first arm unconditionally withheld, backslash scenario split per-host), but the host-true title claim is not independently witnessed: ripr sensor itself failed and cargo-test is scheduled-late only. Resolve when cargo-test lands receipt or ripr is rerun on the current head.
  • Confirm host-true claim is not independently witnessed: ripr sensor (the tool that exercises the changed crate) failed with exit code 2 before this lane, and cargo-test is only scheduled-late. Diff is small, scope is one test, prior author Windows reproduction is plausible, but a third-party Windows cargo-test green is absent. Resolve at gate when cargo-test lands late receipt or ripr rerun produces a green record.

Refuted

  • --root=. could be accepted by command_payload_is_safe_for (e.g. = not stripped) and bind, silently making the first arm a no-op fallback test.; refuted because: Author source-route inspection: token-by-token --root exact-match rule rejects --root=.; = is not in any metacharacter list; binder withholds via its own --root=. branch on both hosts. cfg!(windows) gates the same target as bind_portable_command_for, so compile-time divergence is structurally implausible.
  • --root=. first arm could be accepted by command_payload_is_safe_for and bind, silently making the test a no-op fallback proof.; refuted because: Rejected: --root=. is tokenized as a single flag-with-equals which does not match the exact --root withhold rule and no metacharacter rule fires on =; bind_portable_command_for has a dedicated --root=. withhold branch active on both hosts. Selection is forced past the first candidate everywhere, so the fallback assertion holds on every host.
  • A shared helper should be extracted for the two-arm assertion pattern to avoid future drift between POSIX and Windows expected strings.; refuted because: Two arms have structurally different expected outputs (fallback vs bound render); extracting a helper would parameterize a difference the test intentionally pins (Windows bound render per #8153). Inline form keeps intent local and matches the prior single-test shape; smallest fix preferred.
  • Original assertion is host-portable on every host by the same logic, so no platform divergence exists and pinning Windows here over-claims divergence.; refuted because: Refuted by source: cfg!(windows) is a compile-time gate resolved on the same target as bind_portable_command_for; the diff explicitly pins the Windows template with the literal backslash to keep the #8153 console semantics (literal , binds instead of fallback) intentionally visible at the selection layer rather than silently reverting to fallback.

Evidence gaps

  • ripr sensor failed exit(2) and cargo-test is scheduled-late; host-true (Windows) witness is not independently reproduced in this packet, only by author's local reproduction in the PR body.
  • Model proof intent was rejected by deterministic validation.

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

Substantive Exact-Head Review (review-pr)

reviewed_head_sha: dbab8d5248d37341969bbcdea84e990e168ee0f8
integration_basis: origin/main (clean merge-tree with current origin/main a19724251)
claim_boundary: LSP receipt-command fallback test demonstrates fallback across all hosts (#8499, #8153).
changed_surfaces_and_semantic_owners_inspected:
- crates/ripr/src/lsp/actions.rs: test `receipt_command_falls_back_past_a_route_it_cannot_bind` updated to test `--root=.` as universally withheld route, and branch on `cfg!(windows)` for `\` console literal behavior.
- changelog.d/8499-lsp-receipt-fallback-host.md
blocking_findings: none
non_blocking_suggestions: none
refuted_or_stale_findings: prior step 26 golden drift on older head was inherited from unblessed match-arm fixtures on main, resolved cleanly after merging main (4229f8187).
proof_and_ci_observed:
- Local Windows test passes: `cargo test -p ripr --lib -- receipt_command_falls_back`
- Hosted CI: run 39062094078 completed successfully with Ripr Rust Small Result: pass (job 117491039124)
proof_or_review_missing: none
affected_currentness_dimensions: none
residual_assumptions_and_non_claims: test-only expectation alignment; no production code changes; does not change binder semantics.
disposition: REVIEW_READY

@EffortlessSteven
EffortlessSteven merged commit c414ec1 into main Oct 17, 2026
32 checks passed
@EffortlessSteven
EffortlessSteven deleted the fix/8499-lsp-receipt-binder branch October 17, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lsp: receipt fallback binder test fails on Windows (host quoting expectation)

1 participant