Repository navigation
fix(lsp): make the receipt fallback test host-true (#8499) - #8510
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
EffortlessSteven
left a comment
There was a problem hiding this comment.
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, becausebind_portable_command_forwithholds 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 ofcommand_payload_is_safe_for(the exact--roottoken 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_artifactstests) 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.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
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 bycommand_payload_is_safe_foron 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--rootrule, 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/fallbacksetup 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_artifactssibling 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.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Qualification attribution and repairThe first qualification (run 39051379319) failed in |
There was a problem hiding this comment.
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} --jsonis a copy-paste mismatch (should be theagent receiptfallback 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 usesfallback(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_artifactstests 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_artifactsfailures (4) are intentionally out of scope and tracked in #8509, so this PR's source-route claim is correctly bounded to the single test.
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 Root Cause: 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. |
Qualification attribution: golden drift inherited from mainThe second qualification (run 39054188701, step "Golden output contracts") fails on six The repair is already in flight as #8524, which is open and mergeable. When it lands I will merge |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
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 bycommand_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--rootexact-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 asbind_portable_command_for, so compile-time divergence is structurally implausible.--root=.first arm could be accepted bycommand_payload_is_safe_forand 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--rootwithhold rule and no metacharacter rule fires on=;bind_portable_command_forhas 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
left a comment
There was a problem hiding this comment.
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
Summary
Fixes #8499.
lsp::actions::tests::receipt_command_falls_back_past_a_route_it_cannot_bindasserted 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 untouchedmainbefore this change.The test now proves the fallback on every host and keeps the original scenario host-true:
--root=.spelling, whichbind_portable_command_forwithholds on both hosts, so route selection provably falls back to the later bindable candidate everywhere.Test-only change; no production behavior changes. Four sibling failures in
lsp::gap_artifactswere 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
cargo test -p ripr --lib -- receipt_command_falls_backfailed on Windows with the first candidate bound instead of withheld.cargo test -p ripr --lib -- lsp::actionspasses 13/13.--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.