Skip to content

fix: include both committed rename paths in diff selection - #219

Merged
steipete merged 1 commit into
mainfrom
fix/committed-rename-selection
Sep 15, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/committed-rename-selection

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Committed renames could make clawpatch review --since <ref> report “no features touched by diff” even when the old path belongs to mapped features. Git's name-only rename output contains only the destination, so the shared diff filter silently skipped those features during review, CI, and revalidation.

Disable rename collapsing when collecting changed paths. Both endpoints are now included as deletion/addition paths, while NUL-delimited filenames and project-relative filtering remain intact. Updated the review guide and Unreleased changelog.

Validation:

  • Four new regression cases failed before the fix; all five cases pass afterward, covering rename settings, nested project boundaries, and workflow selection.
  • Built CLI against a synthetic Git repository: initialize/map, commit a source rename, then run review --since <base> --dry-run --json. Before: no features touched by diff. After: wouldReview: 3, including the original CLI feature.
  • Full local gate: typecheck, lint, format check, coverage suite, build, and installed-package smoke test.
  • Independent autoreview through P2.

@steipete
steipete requested a review from a team as a code owner September 15, 2026 06:55
@clawsweeper

clawsweeper Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete merged commit 4d3dad2 into main Sep 15, 2026
11 checks passed
@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 15, 2026
@clawsweeper

clawsweeper Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 15, 2026, 2:57 AM ET / 06:57 UTC.

ClawSweeper review

What this changes

Include both committed rename paths when selecting features for review, CI, and revalidation, with regression tests and documentation updates.

Merge readiness

Ready for maintainer review

This PR remains necessary: current main and v0.8.1 still omit rename source paths. The focused fix, regression coverage, and reported built-CLI verification support landing it; no blocking defect was found.

Priority: P2
Reviewed head: 220aa0479ab233afba06b365d746f213c07ab7bc

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A narrow shared-path fix with relevant regression coverage and concrete reported CLI output; no blocking correctness or security concern was found.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The captured body reports a built-CLI run through the real Git collector and feature selector in a synthetic repository, with selection changing from empty to three features after a committed rename; dry-run directly exercises the behavior being repaired.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The captured body reports a built-CLI run through the real Git collector and feature selector in a synthetic repository, with selection changing from empty to three features after a committed rename; dry-run directly exercises the behavior being repaired.
Evidence reviewed 7 items Applicable repository policy: Read the complete root AGENTS.md. No nested AGENTS.md or maintainer-notes directory was found. Applied the focused-helper, regression-test, and documentation guidance; repository writes and test execution were excluded by the read-only review contract.
Current main still needs the fix: The changed-path collector uses name-only output without disabling rename detection, then returns the resulting NUL-separated paths. Matching existing feature records therefore cannot recover an omitted source path.
Latest release also lacks the fix: The v0.8.1 source has the same rename-collapsing command. GitHub's latest-release endpoint confirmed v0.8.1, published September 14, 2026.
Findings None None.
Security None None.

How this fits together

Clawpatch matches Git changes against mapped feature files to choose what to review or revalidate. The shared changed-path collector feeds this selection for both direct commands and the CI workflow.

flowchart LR
  A[Git reference and project root] --> B[Collect committed changes]
  B --> C[Include both rename paths]
  C --> D[Match mapped feature files]
  E[Existing feature records] --> D
  D --> F[Review and CI selection]
  D --> G[Finding revalidation]
Loading

Before merge

None.

Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Regression coverage 5 added cases Coverage exercises rename configuration, project boundaries, and existing feature selection.

Technical review

Best possible solution:

Keep rename endpoint expansion in the shared Git collector so every diff-scoped command consistently selects affected features without changing stored mappings.

Do we have a high-confidence way to reproduce the issue?

Yes: map a feature, commit a rename of its owned file with rename detection enabled, then select using --since. Current-main source explains the omission, and the contributor reports before/after CLI output; this review did not execute a reproduction.

Is this the best way to solve the issue?

Yes: disabling rename collapsing in the existing collector restores both endpoints for all callers while preserving project scoping and filename safety.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against e2d57da24f3c.

Labels

Label changes:

  • add P2: Repairs silent omissions in diff-scoped review and revalidation with a narrow shared-helper change.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The captured body reports a built-CLI run through the real Git collector and feature selector in a synthetic repository, with selection changing from empty to three features after a committed rename; dry-run directly exercises the behavior being repaired.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The captured body reports a built-CLI run through the real Git collector and feature selector in a synthetic repository, with selection changing from empty to three features after a committed rename; dry-run directly exercises the behavior being repaired.

Label justifications:

  • P2: Repairs silent omissions in diff-scoped review and revalidation with a narrow shared-helper change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The captured body reports a built-CLI run through the real Git collector and feature selector in a synthetic repository, with selection changing from empty to three features after a committed rename; dry-run directly exercises the behavior being repaired.
  • proof: sufficient: Contributor real behavior proof is sufficient. The captured body reports a built-CLI run through the real Git collector and feature selector in a synthetic repository, with selection changing from empty to three features after a committed rename; dry-run directly exercises the behavior being repaired.

Evidence

What I checked:

  • Applicable repository policy: Read the complete root AGENTS.md. No nested AGENTS.md or maintainer-notes directory was found. Applied the focused-helper, regression-test, and documentation guidance; repository writes and test execution were excluded by the read-only review contract. (AGENTS.md:1, 220aa0479ab2)
  • Current main still needs the fix: The changed-path collector uses name-only output without disabling rename detection, then returns the resulting NUL-separated paths. Matching existing feature records therefore cannot recover an omitted source path. (src/git.ts:73, e2d57da24f3c)
  • Latest release also lacks the fix: The v0.8.1 source has the same rename-collapsing command. GitHub's latest-release endpoint confirmed v0.8.1, published September 14, 2026. (src/git.ts:73, aa0565d82caf)
  • Introduced change preserves existing boundaries: The verified base-to-head patch adds --no-renames while retaining reference validation, argument-based execution, project-relative output, and NUL delimiters. Review and revalidation consume this shared collector through command-selection.ts. (src/git.ts:74, 220aa0479ab2)
  • Focused regression coverage: Five added cases cover three diff.renames settings, incoming/outgoing/internal nested-project moves, and selection of existing features mapped to the old path. Existing unusual-filename and invalid-reference tests remain intact. Tests were inspected, not executed. (src/git.test.ts:14, 220aa0479ab2)
  • Production CLI behavior proof: The complete captured PR body reports running the built CLI against a real synthetic Git repository: initialize/map, commit a source rename, then review --since <base> --dry-run --json. Reported output changes from no selected features to wouldReview: 3, including the original CLI feature. Source inspection confirms dry-run executes the changed selection path before returning. The live body matched the captured body; this review did not execute the commands. (220aa0479ab2)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete deleted the fix/committed-rename-selection branch September 15, 2026 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant