Repository navigation
fix(repair): render human artifact paths without changing identity - #8231
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
Summary by CodeRabbit
WalkthroughRepair-related artifact messages and manifest diagnostics now use human-readable path formatting. Regression tests check that percent and literal-backslash paths retain the intended repository identity. ChangesRepair path presentation
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to
|
|
Independent bounded review — scoped semantic review complete, non-blocking. Execution snapshot: 2026-10-16 06:45 UTC. No actionable source findings emitted. Readiness clarification, 2026-10-16 (same head): the earlier condition requiring a native Windows repair-filesystem journey before readiness overstated this slice's scope and is withdrawn. The changed behavior is the six call sites rendering human path text through the existing Subject re-read before posting: head Inspected: all eight changed files, repository review instructions/spec 0195, and all six changed human render sites: the artifact loop, packet write, published/consumed manifest narration, and both missing-manifest loaders. Traced canonical store resolution → Observed local proof: Linux x86_64/Bash, Rust 1.95.0, separate clean review worktree; build serialized with Exit 0: 2 passed, 17 filtered. Candidate executable reports this exact head; SHA-256 Additional independent harness: two real Seven controls compiled the unchanged Native boundary (observed at the execution snapshot above): Windows paste job actually ran merge object #8152 remains the quoting/check-header owner at Raw scripts/logs, fixtures, manifest snapshots and executable witnesses are retained under |
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- Non-narration Path strings (--json stdout, repair_journey JSON
root/next_command/attempt IDs, store locators, before-commitment bytes, receipt JSON) intentionally untouched per PR scope; flagged for human awareness, not a finding.
Verification questions
- Confirm unit test repair_path_display_preserves_literal_percent_on_both_hosts runs on every host but only exercises human_path_text, not human_path(&Path). The Path variant's percent/backslash space behavior on Windows is not exercised end-to-end; the façade journeys cover it indirectly via expected_display substitution but only via string contains.
- Confirm ub-active-view is not applicable to this diff: changes are confined to String-formatted stderr/stdout narration and a String-returning human_path_text helper. No resizable buffer, ArrayBuffer, TypedArray, Vec/Box<[T]> growth, detach, or transfer semantics touched. PR body, receipt sha256 71391e1c, and host-explicit path tests confirm presentation-only contract.
Refuted
- Switching path.display() to output::path::human_path(&path) could borrow the PathBuf past its drop in format!/terminal_safe and cause a use-after-free when the renderer reads the path; refuted because: All five sites pass &path of a PathBuf that lives to end of statement; human_path returns owned String and the borrow is consumed before the format! expression; no native or unsafe path involved, so this is a refuted false-premise rather than a finding.
- human_path / human_path_text could be backed by a resizable buffer whose active view (length snapshot) could desynchronize from the underlying allocation, leading to UB on later reads or aliasing after growth/detach.; refuted because: human_path_text in crates/ripr/src/output/path.rs takes (&str, bool) and returns a freshly owned String built by literal string concatenation; there is no buffer reuse, no Vec growth, no detach, and no slice -> Box::from(slice) construction in the diff or in the touched surface. The added test repair_path_display_preserves_literal_percent_on_both_hosts only compares resulting &str equality, which cannot observe active-view aliasing. Therefore the hypothesis does not hold for this patch.
- Display-rendering change risks JS worker handoff / postMessage / structuredClone / SharedArrayBuffer detach / ArrayBuffer transfer identity across worker boundaries.; refuted because: PR is pure Rust sync CLI code. No JS, no web worker, no Node worker_threads, no SharedArrayBuffer, no ArrayBuffer, no transferable, no structuredClone, no postMessage surface. The only boundary touched is std::path::PathBuf → String via an owned return; no borrow, no slice, no pinned buffer, no reference count crosses threads. Out-of-scope handoff class does not apply.
- A display codec leak could silently select the wrong sibling repository when root contains literal % or backslashes.; refuted because: All four touched sites route through output::path::human_path; the new renderer test asserts verbatim Windows-true and literal Unix on Windows-false; the two journey tests assert next_command selects the lexical root (expected_display) and refuse the sibling via 'manifest root does not match selected repository'.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
- Native Windows filesystem, canonical-prefix producer behavior (rust Path::canonicalize ?\ prefix on Win11/Server), and native shell execution of next_command remain unverified; the host-explicit controls prove Linux string behavior only. Author explicitly leaves PR Draft and issue open for native qualification.
|
Ready-admission continuation, 2026-10-16 07:00 UTC. Owner: existing #7882 candidate; parent integration. Candidate remains Independent executed review and corrected scope disposition are current: semantic review complete/non-blocking for the six human render sites; machine identity and persistence stay unchanged. Owner exact-head precommit digest The later automated review's questions do not identify a new source defect: the added host-explicit test exercises Readback found no inline threads or unresolved material findings. Existing ordinary CI, Windows advisory, paste, security, source-of-truth and wheel workflows completed successfully; no Routed Rust Small run exists for this head. Proceeding with the normal Ready transition to request that required qualification once. Overall merge review remains REVIEW_INCOMPLETE until actual required results and checkout identity are reconciled; no auto-merge or merge clearance. #7882 remains open for persisted-root acceptance. This continuation supersedes the body's earlier Draft-only endpoint for integration, while preserving its proof limitations. Final published-head review disposition — 2026-10-16 08:05 UTCREVIEW_READY for the bounded human-path rendering slice at unchanged Required result succeeded, attempt 1. Producer logs establish both workflow Fresh reviews: no inline threads, no requested changes or new actionable source findings. The automated verification questions were dispositioned above; subsequent CodeRabbit review at this head reports no actionable comments. Current main Proceed only with normal expected-head protected squash merge. Full protection administration reads remain unavailable to this integration; branch metadata names required |
Summary
Repair workflow artifact and attempt-manifest narration now uses the existing host-aware
human_pathrenderer. On Windows this removes drive-letter verbatim prefixes and unifies mixed separators at the named human display sites; Unix literal filename characters remain literal.Part of #7882. Persisted canonical roots, JSON path fields, attempt IDs, artifact/store locators, commands and commitments keep their existing spelling and authority. In particular,
manifest.rootis canonicalized by the reader and included in the before commitment; applying the stable display codec there can select a real sibling such as100%25repofor100%repo.Swarm / Source Boundary
EffortlessMetrics/ripr-swarmSource-of-truth Links
Governing issue: #7882. Spec: RIPR-SPEC-0195 (presentation versus canonical root identity). No new ADR or support tier.
Candidate Relationships
Branch:
fix/7882-repair-human-paths; tested merge-based08c77d144c016078364fcc1fcf2fa593d21cefc. Main advanced separately toe660a99480dc13a4ed93b131042d11506fd484b6with no changes to these eight files; no combined-tree execution is claimed. No stack parent or replacement. #8152 owns shell quoting and check-header display; this patch does not edit its quoting/parser/disclosure implementation. The ownership search found no equivalent #7882 implementation; #7907/#7984 explicitly exclude it and #8039 repairs a different config surface.Scope / Scope Classification
The named wrote lines, published/consumed manifest lines, and both unknown-attempt errors use
human_path. Machine persistence and validators are unchanged. Display behavior remains the existing shared contract: drive-letter verbatim normalization on Windows; UNC/volume preservation; literal Unix backslashes.Evidence: a percent root with a real encoded-spelling sibling and a Unix literal-backslash root with a real slash sibling each run before → focused edit → continue in fresh CLI processes. Assertions cover human path spelling, initial command-root identity, persisted canonical-root spelling, exact selected attempt, unknown/wrong-root refusals, successful reopening, unchanged command/root/commitment through completion, receipt creation and untouched sibling. Host-explicit helper controls cover drive-verbatim/mixed separators, literal percent and UNC/volume/Unix preservation.
Non-goals: cleaning persisted
attempt.json.root, JSON continuation paths or other unrelated display surfaces; #8152 quoting changes; validator policy; native Windows qualification; Ready/merge/release.Support-tier / Policy Impact
Human CLI output correction, no support-tier promotion. No dependencies, workflow, policy, process-spawn or network surfaces added.
Changelog:
changelog.d/7882-repair-human-artifact-paths.md, compared againstchangelog.d/README.md: Fixed marker, bullet and trailing issue reference. No exemption/deferred entry.Proof
Baseline on the exact base:
cargo xtask worktree doctor,cargo xtask check-fastandcargo check --locked -p ripr --lib --bin ripr --test task_first_facadepassed. Merge-base independently matches the base; zero baseline changed paths was expected.Clean candidate:
d5d443c06dec2f6cdb4da3feb11732f2f12c7056, Rust 1.95.0, Linux x86_64/Bash.output::display_path(canonical_root)fails both at the canonical-root assertion, selecting the real percent/slash sibling. The experiment was removed before this commit.repair attempt manifest root does not match selected repository; original/copied manifests stayed unchanged during refusal. Both legitimate journeys then finished with receipts.56b74511565bcf7564d8ee5e3e8a9ef20e7153946ea7eb80030f9f8810a87bf9;--versionreports this exact commit. The baseline production witness is source-bound at d08 plus test-only edits and reports dirty; it is not represented as a clean exact-base executable.check-fastpassed 14 gates, including workspace/all-target Clippy, with stable selector and independently matched 8 changed files; fixture-contract checks explicitly skipped there and passed in precommit.precommitexited 0. Its v2 receipt binds this head and d08 merge-base, all 8 committed changes, selected strict Clippy for ripr and xtask, no skipped commands and no limitations. Receipt digest:sha256:71391e1c01ca04eae44e31cb0793a410e8fb7e36d979cf89ed1aaef48ee87b56.Independent review disposition:
REVIEW_INCOMPLETEfor missing native Windows/hosted evidence, with no source or executed behavioral blocker to Draft publication. Review completed before push/publication. Raw commands, logs, binary witnesses, machine receipts and independent outputs are retained in the selected execution environment; no hosted artifact custody is claimed.Native Windows filesystem, canonical-prefix producer behavior and native shell execution remain unverified. Linux host-explicit string controls do not establish those claims. Hosted merge qualification remains pending; this PR stays Draft.
Claim Boundary / Rollback
Only the named human presentation sites are corrected. Persisted-root cleanup requested in the broader issue remains outstanding and #7882 must stay open. Revert this commit to restore the old display; machine identity is unchanged.
Spec-Test-Code Traceability
RIPR-SPEC-0195 →
task_first_facade::repair_human_paths_*andoutput::path::tests::repair_path_display_preserves_literal_percent_on_both_hosts→ the three repair narration/error owner files and existing path renderer. No analysis goldens or metric changes.CI Economics / Engineering Check
Explicit Cargo targets and serialized builds with the pinned Rust 1.95.0 toolchain; no workspace test build or hosted dispatch. No panic shortcuts, unsafe code, public schema, permissions or validator changes. Independent review precedes push/Draft publication. No Ready transition.
Continuation
Owner: #7882 / this candidate. Draft publication is the requested endpoint. Parent owns integration, native Windows proof, broader persisted-root disposition and any later Ready/merge decision.