Skip to content

fix(repair): render human artifact paths without changing identity - #8231

Merged
EffortlessSteven merged 1 commit into
mainfrom
fix/7882-repair-human-paths
Oct 16, 2026
Merged

EffortlessSteven merged 1 commit into
mainfrom
fix/7882-repair-human-paths

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

Repair workflow artifact and attempt-manifest narration now uses the existing host-aware human_path renderer. 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.root is canonicalized by the reader and included in the before commitment; applying the stable display codec there can select a real sibling such as 100%25repo for 100%repo.

Swarm / Source Boundary

  • ordinary CLI/output development in EffortlessMetrics/ripr-swarm

Source-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-base d08c77d144c016078364fcc1fcf2fa593d21cefc. Main advanced separately to e660a99480dc13a4ed93b131042d11506fd484b6 with 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

  • One production behavior: repair-journey human artifact/manifest path spelling.

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 against changelog.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-fast and cargo check --locked -p ripr --lib --bin ripr --test task_first_facade passed. Merge-base independently matches the base; zero baseline changed paths was expected.

Clean candidate: d5d443c06dec2f6cdb4da3feb11732f2f12c7056, Rust 1.95.0, Linux x86_64/Bash.

cargo test --locked -p ripr --test task_first_facade -- --test-threads=1
cargo test --locked -p ripr --lib output::path::tests:: -- --test-threads=1
cargo xtask check-fast
cargo xtask precommit
  • Exact committed head: 19 façade tests and 17 path tests passed (11,042 unrelated library tests filtered out).
  • Two identity journeys also pass against unchanged baseline production. A temporary wrong producer using 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.
  • Independent exact-head source/runtime review found no actionable defect. It used its own fixtures and the clean candidate executable to consume authentic baseline-created attempts, preserving root, ID, exact next_command and commitment bytes. Authentic attempts copied into each sibling were refused with repair attempt manifest root does not match selected repository; original/copied manifests stayed unchanged during refusal. Both legitimate journeys then finished with receipts.
  • Clean executable SHA-256: 56b74511565bcf7564d8ee5e3e8a9ef20e7153946ea7eb80030f9f8810a87bf9; --version reports 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-fast passed 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.
  • precommit exited 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.
  • The policy log includes reference-panel departures from its historical captured expectations; its configured checks passed. No new analyzer-accuracy or qualification claim is made.

Independent review disposition: REVIEW_INCOMPLETE for 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_* and output::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.

@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 16, 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: Advanced
  • Run ID: d96a3268-69a3-4773-adfa-6d231b31128c
📥 Commits

Reviewing files that changed from the base of the PR and between e660a99 and d5d443c.

📒 Files selected for processing: 8
  • .ripr/traceability.toml
  • changelog.d/7882-repair-human-artifact-paths.md
  • crates/ripr/src/app/repair_attempt/mod.rs
  • crates/ripr/src/cli/commands/agent.rs
  • crates/ripr/src/cli/mod.rs
  • crates/ripr/src/output/path.rs
  • crates/ripr/tests/task_first_facade.rs
  • docs/specs/RIPR-SPEC-0195-repair-attempt-store-identity.md
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

Summary by CodeRabbit

  • Bug Fixes

    • Artifact and attempt-manifest paths in repair messages and unknown-attempt errors now use clearer, host-aware display formatting. Literal percent signs and backslashes are preserved, while certain Windows path prefixes and mixed separators are normalized.
    • Persisted repository roots, commands, and repair identities remain unchanged.
  • Tests

    • Added regression coverage for paths containing percent signs and literal backslashes, including checks that repair attempts remain associated with the intended repository.

Walkthrough

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

Changes

Repair path presentation

Layer / File(s) Summary
Human-readable repair paths
crates/ripr/src/app/repair_attempt/mod.rs, crates/ripr/src/cli/commands/agent.rs, crates/ripr/src/cli/mod.rs, docs/specs/RIPR-SPEC-0195-repair-attempt-store-identity.md, changelog.d/7882-repair-human-artifact-paths.md
Repair artifact and manifest messages and missing-manifest diagnostics now use human_path. The spec and changelog describe host-aware rendering and state that persisted roots, commands, and commitments remain unchanged.
Path identity regression coverage
crates/ripr/src/output/path.rs, crates/ripr/tests/task_first_facade.rs, .ripr/traceability.toml, docs/specs/RIPR-SPEC-0195-repair-attempt-store-identity.md
Tests cover percent and literal-backslash paths, repository identity across repair and continue operations, and percent preservation in path display. The traceability manifest maps the regression tests to the spec.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to d5d44

The change appears ready to merge after normal checks: repair messages gain clearer path spelling without an identified change to attempt identity or stored values.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: rendering human-readable repair artifact paths without changing persisted identity.
Description check Passed The description is detailed and covers the change scope, source links, candidate relationships, evidence, proof commands, claim boundary, rollback, traceability, policy impact, and known limitations. …
Docstring Coverage Passed Docstring coverage is 81.82% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 5 files. (3 skipped: 3 …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description is detailed and covers the change scope, source links, candidate relationships, evidence, proof commands, claim boundary, rollback, traceability, policy impact, and known limitations. Some template subsections are combined or summarized, but the required information is substantially present.

Full details: Docstring Coverage

Explanation

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

✨ 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 each path at night,
A percent stays just right.
Backslashes keep their proper place,
The roots retain their case.
The repair trail ends in green.

Comment @coderabbitai help to get the list of available commands.

EffortlessSteven commented Oct 16, 2026 •

Copy link
Copy Markdown
Member Author

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 human_path helper: Windows drive-verbatim/mixed-separator display normalization, with Unix literal characters preserved. No changed canonicalization, persistence, filesystem selection, command arguments or shell execution was identified that requires a new full native repair journey to assess. Source wiring inspection plus host-explicit helper controls address that scoped transformation; real Linux producer/consumer controls address preservation of identity and commitments. Native Windows repair execution remains useful integration evidence and an explicitly unverified platform boundary, not an additional scoped Ready prerequisite imposed by this review. docs/CI.md retains native verification as an author/audit responsibility; it does not prescribe this full repair journey as a gate for this display-only slice. This correction does not waive actual required checks or declare merge readiness. Overall merge-qualification review remains REVIEW_INCOMPLETE because current required-check/readiness evidence was not assessed to completion here.

Subject re-read before posting: head d5d443c06dec2f6cdb4da3feb11732f2f12c7056; API base e660a99480dc13a4ed93b131042d11506fd484b6; actual merge-base d08c77d144c016078364fcc1fcf2fa593d21cefc. PR remains Draft. Duplicate check found only the two review-quota notices.

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 → root_path_display manifest producer → validate_manifest_at canonical equality → before commitment/artifact binding; also traced command-root binding, attempt-ID generation, JSON continuation and receipt consumers. These authority/serialization paths are unchanged. The snapshot-loader missing-file branch was inspected in source, not separately forced by a filesystem race.

Observed local proof: Linux x86_64/Bash, Rust 1.95.0, separate clean review worktree; build serialized with CARGO_BUILD_JOBS=2 CARGO_INCREMENTAL=0, explicit target:

cargo test --locked -p ripr --test task_first_facade repair_human_paths_ -- --test-threads=1

Exit 0: 2 passed, 17 filtered. Candidate executable reports this exact head; SHA-256 fbc0c3af4a9425ae4519251cc4e7126dba228ab5a4e93d4abf973da2a5e5b02e.

Additional independent harness: two real agent repair --phase before --json → focused edit → exact persisted command-argv replays from a foreign cwd succeeded. Percent and literal Unix backslash roots had real encoded/slash siblings. Authentic attempts copied into those siblings were refused with repair attempt manifest root does not match selected repository (exit 2); unknown IDs also refused (2). Refusals left original/copied attempt trees unchanged. Legitimate after phases exited 0, produced receipts, and preserved root, ID, exact next-command, before-artifact bytes/metadata and commitment. JSON continuation retained its existing path spelling, including Unix backslash-to-slash presentation. An initial harness attempt at unsupported repair --json exited 2; the corrected advanced route above passed.

Seven controls compiled the unchanged human_path_text function with explicit host selection: drive-verbatim/mixed separators, percent, UNC/volume and Unix preservation passed. The unchanged stable codec separately selected real wrong siblings for percent/backslash roots. These are Linux helper/filesystem controls, not Windows execution; Linux façade passes alone cannot discriminate the old Windows display wiring.

Native boundary (observed at the execution snapshot above): Windows paste job actually ran merge object 10811da82a82400ab205e3594e63a3f397e03a02 (d5/e660): 7 tests passed; 116 distinct commands replayed in Bash, pwsh and Windows PowerShell. This is native shell evidence, not repair-specific canonical-prefix/filesystem journey proof or cmd.exe proof. Full Windows advisory was skipped; the subset and hosted CI were still in progress when inspected.

#8152 remains the quoting/check-header owner at e18d8bea00dfad977e2d7049258a41736a86ba42. This patch only adopts the existing human renderer; it neither changes quoting nor repairs/reclassifies that PR's existing findings. No combined-tree qualification is claimed. #7882's persisted-root request remains unresolved and must stay open.

Raw scripts/logs, fixtures, manifest snapshots and executable witnesses are retained under /workspace/review-8231-evidence in this review environment; no hosted custody is claimed. No source, PR-state, policy or CI changes/dispatch occurred. Continuation: the existing candidate owner completes the normal published-head readiness process and actual required hosted checks. Native Windows repair-filesystem/canonical-prefix behavior remains unverified by this review; obtaining that additional integration evidence is follow-up audit work, not a new blocking acceptance predicate for this six-site display slice. The broader persisted-root acceptance in #7882 remains open. No new native qualification or combined-tree pass is claimed.

@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

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

EffortlessSteven commented Oct 16, 2026 •

Copy link
Copy Markdown
Member Author

Ready-admission continuation, 2026-10-16 07:00 UTC. Owner: existing #7882 candidate; parent integration.

Candidate remains d5d443c06dec2f6cdb4da3feb11732f2f12c7056. Observed remote merge 10811da82a82400ab205e3594e63a3f397e03a02 has parents e660a99480dc13a4ed93b131042d11506fd484b6 and the candidate, tree f3a3abb1e8296f9aadb12753e545b9fcce9ed8cd. Current main 99b1ebec5787ce5f0a8eccd7a0d244912151fb4c adds only #8217's executable-index test-fixture batching. Inspected delta has no repair-rendering overlap or identified missing material prerequisite; no behind-only restack is warranted.

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 71391e1c01ca04eae44e31cb0793a410e8fb7e36d979cf89ed1aaef48ee87b56, 19 façade tests, 17 path tests and independent focused/real-journey controls are recorded above.

The later automated review's questions do not identify a new source defect: the added host-explicit test exercises human_path_text, not native Windows filesystem production; that limitation is retained. No active-view/JS-buffer surface is involved. Native Windows repair-filesystem proof remains unverified, not an added acceptance gate for this display-only slice. Existing native paste evidence is shell evidence only. This is no policy waiver or broader Windows qualification.

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 UTC

REVIEW_READY for the bounded human-path rendering slice at unchanged d5d443c06dec2f6cdb4da3feb11732f2f12c7056. This integrates the independent source/runtime review above with verified hosted evidence, not a new claim of native Windows repair-filesystem qualification.

Required result succeeded, attempt 1. Producer logs establish both workflow rust-gates.yml@refs/pull/8231/merge and executed checkout 10811da82a82400ab205e3594e63a3f397e03a02, with the parents/tree recorded above. 16,322 required tests passed across 107 binaries, 3 skipped; all 19 façade tests and the host-explicit percent-display test passed. Doctests: 2 passed, 1 ignored. Required policy, compile, Clippy, goldens, fixture contracts, corpora and PR-evidence steps succeeded. Nextest artifact 12032332530 is retained with digest sha256:800e1a94617e74e6e34ba1544a3dcdaa13efd3ce99f02519f501d8a79fa77beb; full RIPR-report upload was skipped and is not claimed.

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 fabf21c8f8e5a06e61cb3e7c77c96f713dec8a13 is ten commits beyond the executed basis. Inspected changed-file inventory and adjacent patches: none changes the six render sites, shared human renderer, canonical root persistence/validation, command binding or commitments. The shared façade test file only adds assertions to the separate ineligible-repair guidance test (#8171); adjacent card/stub changes preserve refusal exits, and partial-preview selection is a separate output route. Remaining changes concern Git batch cancellation, fixture preparation, test setup and documentation. No material composition blocker or requirement to repeat unaffected proof identified; no combined-tree execution on this later main is claimed.

Proceed only with normal expected-head protected squash merge. Full protection administration reads remain unavailable to this integration; branch metadata names required Ripr Rust Small Result, now green. No bypass or rule change. #7882 stays open for its broader persisted-root request; native repair-filesystem and broader platform limits remain explicit.

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.

1 participant