fix(fix): commit every file a fix changes in PR mode - #1571
Merged
Jeppe Fredsgaard Blaabjerg (jfblaa) merged 2 commits intoSep 30, 2026
Conversation
PR mode kept only the git-changed paths that coana listed in modifiedFiles, so anything coana wrote without reporting (e.g. package.json override bumps) was left out of the PR. Now every tracked file the fix changes is committed; untracked files still need coana or a manifest name to vouch for them, and files already dirty before the fix are left out unless coana reports them. git diff printed paths relative to the repo root while git ls-files, git add and coana use cwd-relative paths, so below the repo root the fix was skipped as "no changes". Use --relative, and -z for both lists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Martin Torp (mtorp)
approved these changes
Sep 30, 2026
Jeppe Fredsgaard Blaabjerg (jfblaa)
deleted the
jfblaa/rea-848-socket-cli-socket-fix-pr-mode-drops-files-missing-from
branch
September 30, 2026 11:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LLM Description written by Claude Code:claude-opus-5-5
Fixes REA-848, the socket-cli side of REA-840.
Files coana doesn't report were dropped from fix PRs. PR mode only committed files listed in coana's
modifiedFiles, so changes coana wrote without reporting (e.g.package.jsonoverride bumps) were left out. Now:.gitignorestays out;This holds with a coana that under-reports, so it doesn't depend on coana-package-manager#2512.
Below the repo root, fixes were skipped as "no changes".
git diff --name-onlyprinted repo-root-relative paths whilegit ls-files,git addand coana use cwd-relative ones.git diffnow uses--relative, and both lists use-z.Tests: PR-mode selection (npm/pnpm transitive override, missing
modifiedFiles, pre-dirty files, untracked filtering) and real-git coverage for listing and committing from a subdirectory.🤖 Generated with Claude Code
Note
Medium Risk
Changes which files land in automated fix PRs and git path handling when
cwdis below the repo root; wrong selection could omit fixes or commit unrelated dirty files, though pre-dirty filtering and manifest checks mitigate the latter.Overview
socket fixPR mode no longer trusts Coana’smodifiedFilesalone. Before each GHSA fix it snapshots the working tree, thenselectFixedFilescommits every tracked path that changed unless it was already dirty (local edits and generated facts stay out unless Coana explicitly lists them). That closes gaps such aspackage.jsonoverride bumps Coana applies but omits frommodifiedFiles. New untracked files are included only when Coana reports them or the basename matches a scan manifest, so build artifacts in poorly ignored repos are not swept into PRs.Running fix from a repo subdirectory was broken: unstaged paths from
git diffwere repo-root-relative whilegit addand Coana use cwd-relative paths, so fixes looked like “no changes.”gitUnstagedModifiedFilesnow usesgit diff --relativeand both diff and untracked listing parse-zoutput.Coverage adds PR-mode commit selection tests and real-git tests for listing and committing from a subdirectory; the changelog records the unreleased fix.
Reviewed by Cursor Bugbot for commit 637869f. Configure here.