Repository navigation
fix(cli): quote outcome/calibrate NotFound capture redirect paths - #7360
Conversation
) Reuse loop_commands::shell_arg on the already-displayed snapshot path so a space in the pasted `> path` redirect stays one token. The `read {path} failed: not found.` prefix stays unquoted; capture-command names and non-NotFound wording are unchanged. Closes #7349 Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
Summary by CodeRabbit
WalkthroughMissing-snapshot capture hints now shell-quote redirect paths when required. The displayed path in the NotFound error prefix remains unquoted. Tests cover calibration and outcome hints, including paths with and without spaces. ChangesSnapshot redirect quoting
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The change is limited to missing-snapshot redirect guidance. The supplied context indicates paths needing quotes are quoted, plain paths stay bare, and the error prefix remains unchanged; no actionable merge-blocking risk is established. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 2 systems. Changed systems: Architecture concerns Review details
Pre-merge checks |
|
There was a problem hiding this comment.
Code Review
This pull request ensures that the snapshot capture redirect path is properly quoted when it contains spaces, preventing issues when pasting the printed command. This is achieved by using shell_arg on the displayed path in snapshot_capture_hint. Additionally, comprehensive unit tests have been added to verify this behavior for both spaced and plain paths. There are no review comments, and I have no feedback to provide.
EffortlessSteven
left a comment
There was a problem hiding this comment.
Author self-review on exact published head 2f28d35ef9571bbf1743d5e4fc2ad4dcc69d5bb2 (GitHub cannot REQUEST_CHANGES from the author; COMMENT is not approval).
reviewed_head_sha: 2f28d35ef9571bbf1743d5e4fc2ad4dcc69d5bb2
integration_basis: origin/main 779b72ba178d22b94f7973255fe277e91a500c95 (#7345 landed)
claim_boundary: Quote the NotFound capture-command `> {path}` redirect in snapshot_capture_hint after display_path by reusing loop_commands::shell_arg. Keep the `read {path} failed: not found.` prefix unquoted. Do not change capture-command names, non-NotFound wording, PowerShell quoting, loop_commands.rs, or #7343.
changed_surfaces_and_semantic_owners_inspected:
- production: crates/ripr/src/cli/commands.rs snapshot_capture_hint; consumers outcome() and calibrate cargo-mutants via read_calibration_text / read_calibration_mutants_json
- quoter: crate::agent::loop_commands::shell_arg (existing POSIX owner; not a new quoter; loop_commands.rs untouched)
- tests in the same module: spaced path + unambiguous control + existing per-kind and non-NotFound controls
- changelog.d/7349-quote-snapshot-capture-redirect.md
blocking_findings: none on source/oracle for this claim
non_blocking_suggestions:
- Apostrophe/metacharacter redirect coverage is out of claim; file a follow-up rather than expanding this head.
- calibrate CLI space-path is the same helper as the unit RepoExposure case; not a second owner.
refuted_or_stale_findings:
- CodeRabbit comment is quota/rate-limit (missing provider review), not a finding.
proof_and_ci_observed:
- Discriminator red on unquoted `> missing snapshot.json` before the production change; green after.
- cargo xtask precommit pass on this SHA (clippy -p ripr --all-targets -D warnings; policy gates).
- cargo xtask check-fast pass: 2 files (commands.rs + changelog fragment), clippy included.
- Hosted: Draft→Ready fired; Route Ripr Rust Small succeeded; Ripr Rust Small Result / required aggregator not yet terminal on this head.
proof_or_review_missing:
- Hosted required exact-head jobs and artifacts (Ripr Rust Small Result).
- External CodeRabbit review (quota).
- External droid-review still queued/in progress.
ffected_currentness_dimensions: production implementation, test stimulus, test oracle, public claim (changelog). conflict/integration unchanged (behind-only not applicable; branch is current with origin/main at publication).
residual_assumptions_and_non_claims:
- POSIX shell_arg only; no PowerShell apostrophe quoting.
- Prefix path remains display_path (human), not shell-quoted.
- CargoMutants hint still has no redirect path.
- Does not claim runtime mutation results or that all CLI printed commands are paste-safe.
disposition: REVIEW_INCOMPLETE
Source/oracle on this head are acceptable for the claim. Merge convergence waits on terminal required hosted checks for 2f28d35ef, then a published-head REVIEW_READY pass. Do not treat this COMMENT as approval.
There was a problem hiding this comment.
Decision
- Needs one verification check before upstream.
Verification questions
- Confirm existing controls (capture-command name per kind, non-NotFound wording, I/O pass-through) remain guards because no hunk modifies their call paths.
Refuted
- Quoting only the redirect while leaving the
read {path}prefix raw creates a misleading hint when display_path contains shell metacharacters.; refuted because: Prefix is presented as human-readable error text (read ... failed: not found.), not as shell input; tests assert it stays unquoted by design. Redirect is the only paste-into-shell token and is now wrapped via shell_arg for both Outcome and RepoExposure. Limited blast radius keeps this minimal. - Snapshot path with spaces would still print unquoted because
display_pathnormalises the path andsnapshot_capture_hintwould be skipped on Windows.; refuted because: Both Outcome/RepoExposure branches in the production hunk now interpolateshell_arg(displayed_path)into the> {path}token; new tests assert spaced redirect is quoted while a plain path stays bare and assert theread {path} failed: not found.prefix stays unquoted. CargoMutants branch has no path and is intentionally unchanged.
Parked follow-ups
- No new test exercises
SnapshotCaptureKind::CargoMutantswith a spaced path even though the production change still routes CargoMutants throughsnapshot_capture_hint. CargoMutants text has no{path}so this is structurally inert, but it is an asymmetry worth noting for the proof ledger.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
|
ub-review on Verification: the existing controls remain guards. This head only interpolates Confirmed by the unchanged tests still in this tree:
The parked CargoMutants spaced-path note is structurally inert (that arm has no |
Summary
Quote the
ripr outcome/ripr calibrate cargo-mutantsNotFound capture-command redirect path with the existingloop_commands::shell_argquoter so a snapshot path that contains spaces pastes as one token.Swarm / Source Boundary
This PR targets
EffortlessMetrics/ripr-swarm, the normal development trunk fortrusted same-repo
riprwork. Confirm the change belongs here:dependency, or repo-ops development for
ripr-swarmsurface
If this PR moves crates.io publishing, VS Marketplace publishing, Open VSX
publishing, GitHub Release assets, signing, release environments, or release
secrets, close or retarget it. Those surfaces belong in
EffortlessMetrics/riprunless a dedicated release-boundary change has already been approved.
Source-of-truth Links
Proposal: n/a (paste-safety follow-up of #7327 / PR #7345)
Spec: n/a (CLI recovery-hint wording; RIPR-SPEC-0009 is the outcome command, unchanged)
ADR: n/a
Plan item: n/a
Governing issue or accepted claim: #7349
Acceptance delta (one sentence): a missing snapshot path that contains a space is quoted in the printed
> pathredirect, while theread {path} failed: not found.prefix stays unquoted and an unambiguous path stays a bare token.Candidate Relationships
Candidate branch (GitHub PR head is authoritative after publication):
cursor/quote-snapshot-capture-paths-843aStack parent or prerequisite PR (if any): none (lands on current
mainafter #7345)Proposed replacement of PR (if any; not yet accepted): none
Acceptance retained from a replaced candidate (if any): n/a
Accepted winner and losing candidate disposition (when decided): n/a
Name a stack or proposed replacement explicitly. A proposed replacement
does not make its predecessor superseded. Shared files or a shared parent issue
alone do not establish duplication. If the relationship is unknown, record it
as needing reconciliation before disposing of either PR.
Scope
Quote only the capture-command redirect path inside
snapshot_capture_hintafterdisplay_path, reusingcrate::agent::loop_commands::shell_arg. Do not invent a second quoter, editloop_commands.rs, change which capture command each caller names, or change non-NotFound wording.Scope Classification
This PR is scoped by:
Production delta:
crates/ripr/src/cli/commands.rssnapshot_capture_hintnow interpolatesshell_arg(displayed_path)into> {path}forOutcomeandRepoExposure.CargoMutantsstill namescargo mutantswith no path.Evidence/support delta:
read_calibration_textfor a space-containing path plus an unchanged unambiguous-path control.outcome()with a filename that contains a space.changelog.d/7349-quote-snapshot-capture-redirect.md.Single acceptance criterion:
> {shell_arg(displayed_path)}and still starts with unquotedread {displayed_path} failed: not found.Non-goals:
loop_commands.rsor writing a new quoter.Support-tier Impact
docs/status/SUPPORT_TIERS.mdClaim/proof notes:
Policy Impact
Ledger or exception notes:
changelog.d/**is already allowlisted.Proof
Result, failures, or skipped proof:
> missing snapshot.jsonbefore the production change, then passed.precommitare not claimed here.Claim Boundary
What may be claimed after this PR? What must not be claimed yet?
shell_argquoting of the NotFound capture redirect afterdisplay_path.Rollback
How can this PR be reverted safely?
Revert the squash commit. The previous unquoted redirect returns; NotFound prefix and capture-command names are otherwise unchanged.
Spec-Test-Code Traceability
read_calibration_text_quotes_spaced_not_found_redirect_and_keeps_plain_path_bare,outcome_not_found_quotes_spaced_capture_redirect, existingread_calibration_text_names_capture_command_per_kind/outcome_command_reports_read_failures/outcome_non_not_found_read_error_keeps_raw_io_and_omits_capture_hintcrates/ripr/src/cli/commands.rssnapshot_capture_hintStatic Language Check
killed,survived,untested,proven, andadequate.CI Economics
Complete this section when the PR changes workflows, policy gates, branch
protection expectations, CI artifacts, report uploads, release checks, or the
cost/posture of existing lanes. Use
n/afor ordinary PRs that do not affectCI behavior.
Engineering Check
panic,unwrap,expect,todo, orunimplementedin production code.panic,unwrap,expect,todo, orunimplementedin tests.Gates
Local focused proof as listed above. Hosted
Ripr Rust Small Resultis expected on Draft → Ready. Full workspacecargo test/ Clippy / package dry-run are hosted merge-gate work, not duplicated locally before publication.Extension changes:
cd editors/vscode && npm cicd editors/vscode && npm run compilecd editors/vscode && npm run packageCloses #7349
Exact candidate SHA:
2f28d35ef9571bbf1743d5e4fc2ad4dcc69d5bb2