Skip to content

fix(init): render follow-up command roots without a trailing /. - #8650

Closed
EffortlessSteven wants to merge 3 commits into
mainfrom
claude/project-thread-9d5yro
Closed

EffortlessSteven wants to merge 3 commits into
mainfrom
claude/project-thread-9d5yro

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Requested by Steven Zimmerman · project thread

Governing issue or accepted claim: #2379 (0.11 release map; newcomer first-run polish, no dedicated issue)
Acceptance delta (one sentence): ripr init follow-up commands name the selected root without a trailing /..

Before: after ripr init, the "Next:" commands printed --root /abs/path/. for the default root.

After: they print --root /abs/path.

How: output/path.rs drops . components when joining a relative root onto the cwd; unit test, a cli_smoke assertion and a changelog fragment added. cargo xtask precommit and cli_smoke init tests pass locally.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XPNmeJoSKoX2dJijL5sy3F

@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 18, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 20 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 80 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: f01625ee-051d-41f6-8e26-cb7f301e5300
📥 Commits

Reviewing files that changed from the base of the PR and between 66b5514 and 1ceb964.

📒 Files selected for processing: 3
  • changelog.d/init-next-root-no-dot.md
  • crates/ripr/src/output/path.rs
  • crates/ripr/tests/cli_smoke/init_followups.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

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

Exact-Head Review (review-pr)

reviewed_head_sha: b4ba794ebf3d5ea7553ee28e6717a61d6da61df9
integration_basis: origin/main
claim_boundary: `ripr init` follow-up commands name the selected root without a trailing `/.` when the root is `.` (relative root).
changed_surfaces_and_semantic_owners_inspected: crates/ripr/src/output/path.rs; crates/ripr/tests/cli_smoke.rs; changelog.d/init-next-root-no-dot.md. Semantic owner: CLI output path formatting.
blocking_findings:
- CI Step 15 (Repository policy preflight / check-changelog-fragments) failed with exit 1: `changelog.d/init-next-root-no-dot.md: entry names no issue or PR; add '(#N)' or a link to it`. Append `(#8650)` to the changelog entry in `changelog.d/init-next-root-no-dot.md`.
non_blocking_suggestions: none. The normalization in `output/path.rs` cleanly filters out `.` components when joining paths.
refuted_or_stale_findings: none.
proof_and_ci_observed: Run 39086030931 failed at Step 15 (Repository policy preflight) due to `check-changelog-fragments`.
proof_or_review_missing: Green required checks after adding `(#8650)` to the changelog entry.
affected_currentness_dimensions: public claim (changelog fragment PR citation).
residual_assumptions_and_non_claims: Does not affect non-init command paths or absolute roots without trailing dot.
disposition: REPAIR_REQUIRED

Copy link
Copy Markdown
Member Author

The blocking finding (changelog entry without a PR reference) is already repaired in head 8f8a759: the fragment now ends with (#8650) and cargo xtask check-changelog-fragments passes locally. The review above cites b4ba794e, which is not the current PR head. Waiting on required checks for 8f8a759 before merging.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven marked this pull request as draft October 18, 2026 01:51
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 18, 2026 01:51
@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 assertion for Path::new("./sub") only checks format!("{expected}/sub"), which assumes the OS uses '/' separator; on Windows this can still pass because human_path normalizes to '/', but the test never exercises an absolute-root branch or a root that is itself "." after env::current_dir normalization.
  • Confirm test suite asserts a single relative case (.) and one sub-segment case (./sub). No coverage for deeper, parent, or trailing-separator inputs; created path uses env::current_dir() which could be non-deterministic in CI under cd.
  • Confirm single heading drop CurDir filter is locale- and OS-stable for Path joining, but the broader cli_smoke path test is the only end-to-end witness; reviewer should not overclaim multi-platform correctness without future Windows verification.

Refuted

  • The new test could be green under the old (un-stripped) behavior if human_path silently swallows trailing /.; refuted because: human_path is a textual renderer that does not synthesize CurDir; an explicit trailing "/." in the joined path renders verbatim, so the equality check fails before and passes after.
  • A new helper should be introduced to strip the trailing /. so the formatting logic stays reusable.; refuted because: The only public-facing render of the follow-up root already flows through absolute_command_root_display; introducing a new helper would widen the API surface without an existing second caller, violating smallest-complete-fix.
  • Normalization in absolute_command_root_display drops only CurDir via filter, leaving Prefix/RootDir/ParentDir/Normal untouched. Tested by require_lossless_command_path round-trip.
  • The .components().filter() re-collection could fail on Windows because of Component::Prefix (verbatim ?\C:) or backslash-separated prefix components being mishandled by PathBuf::collect.; refuted because: Filter only matches CurDir; Prefix/RootDir components pass through unchanged; human_path & require_lossless_command_path normalize separators.

Parked follow-ups

  • Changelog fragment claims the trailing /. problem applies specifically to the default-root-with-. case; the diff's filter actually strips CurDir universally on the cwd branch. Doc-vs-code mismatch is submaterial but worth noting in a follow-up.

Evidence gaps

  • No CLI smoke oracle was located in receipts; cli_smoke init test is mentioned in PR body but absence in available receipts leaves oracle coverage of the rendered --root ... strings unverified at system level.

…ng /.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XPNmeJoSKoX2dJijL5sy3F

@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

  • Test determinism depends on env::current_dir(); under CI cd/sandbox it can be non-deterministic and mask the comparison. The unit test does not pin cwd.
  • Windows/multi-platform parity for the new trailing-/. invariant relies on human_path's separator normalization; no Windows CI receipt in current evidence. Not a blocker; park as future matrix coverage.

Verification questions

  • Confirm no oracle coverage for absolute-root branch, parent-component inputs (..), trailing-separator inputs, or non-determinism of env::current_dir() under CI cd; unit test is the only end-to-end witness for the strip.
  • Confirm limited sibling scan: only checked callers of absolute_command_root_display inside the ripr crate; other crates or future helpers that join relative paths onto cwd were not enumerated, so a 'no other affected sites' claim would be overreach.

Refuted

  • The new unit test could be green under the old (un-stripped) behavior if human_path silently swallows trailing /..; refuted because: human_path is a textual renderer that does not synthesize or collapse CurDir components; cwd.join(".") rendered via human_path retains the trailing /. literal, so the equality check fails before the patch.
  • Multi-platform risk: Path::Component::CurDir filter may mis-handle Windows drive-relative paths like '.\foo'.; refuted because: Component::CurDir is the POSIX/Windows-agnostic 'current dir' segment produced by std::path::join on both platforms; filtering it after cwd.join(root) is OS-stable for the textual cases the unit test exercises.
  • The fix should be hoisted into human_path (shared renderer) so all display surfaces strip CurDir.; refuted because: human_path is a stable renderer used by many call sites; introducing CurDir normalization there broadens behavior beyond the documented acceptance delta and risks normalizing paths users deliberately constructed. Local filter in the one helper that materializes cwd+relative is smallest correct surface.

Parked follow-ups

  • Unit proof covers '.' and './sub' but no deeper case (parent dirs, multi-segment relative root with internal '.', or trailing separator). Existing cli_smoke guard catches trailing '/.' only; not multi-segment internal '.' regressions. Not blocking given narrow scope of init follow-up rendering.

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

Copy link
Copy Markdown
Member Author

Ripr Rust Small on 1ceb964 fails in lsp::tests::generic_client_analysis_failure_is_shown_once_and_only_to_generic_clients: the generic client receives the same analysis-failure window/showMessage twice instead of once. This is not from this PR (no lsp files touched). I reproduced it locally on origin/main (c97b9fc) merged with this branch. The test came from #8642 and the refresh path changed in #8656, so main's tip is likely red on it. I found no open fix PR for it yet (#8666 touches the transport only). Everything else in the run passed. I'll re-run once and port a fix here if one lands; otherwise this PR waits on main.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

Closing as superseded. On current main, ripr init follow-ups already omit --root when the root is the current directory and otherwise strip the trailing /. (cli/commands/init.rs, from #9034 and #9144), and init_followups.rs pins !ends_with("/.") for the printed commands. This PR's acceptance delta (follow-up commands name the selected root without a trailing /.) is therefore already delivered, and merging main conflicts with the newer test. If the same cwd.join(".") rendering still leaks into another command path (for example existing-file retry or doctor guidance), please file that as its own claim with a reproducing case.


Generated by Claude Code

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.

2 participants