Skip to content

fix: give --fix an honest, categorized summary of unapplied fixes - #976

Merged
sonukapoor merged 2 commits into
mainfrom
bugfix/issue-974-fix-summary-messaging
Aug 13, 2026
Merged

fix: give --fix an honest, categorized summary of unapplied fixes#976
sonukapoor merged 2 commits into
mainfrom
bugfix/issue-974-fix-summary-messaging

Conversation

@sonukapoor

Copy link
Copy Markdown
Collaborator

Closes #974

The --fix summary lumped every not-auto-applied fix under a single "Skipped findings" line with a "v1 skip" jargon sub-bucket. On a project where nothing auto-applies (all findings transitive/breaking), a user stares at a report full of runnable fix commands, runs --fix, sees it apply zero, and gets an explanation that reads as broken.

Three real problems (verified against the code, credit to @Demiserular's analysis on the issue for surfacing them):

  1. It implied a safe within-range refresh (parent-update) needed manual review the same as a breaking major bump (parent-upgrade) - they were both swept into one bucket.
  2. The count was a misnomer: it counted deduplicated targets + skip records, not findings, so it contradicted the "Remaining findings after fix" line.
  3. "v1 skip" is internal jargon that means nothing to a user.

What changed

  • New categorizeUnappliedTargets splits not-applied fixes into within-range refreshes (safe to run), parent upgrades (need review, with a breaking major-bump sub-count via the existing isMajorVersionBump), and no fix available.
  • The summary renders these honestly and drops the "v1 skip" / "Skipped findings" wording. The note explains --fix only auto-applies safe in-range direct upgrades and points to the Suggested Fix Plan for the rest.
  • FixResultJson gains an additive notAutoApplied block so CI can read the structured breakdown without parsing stdout. Existing fields are unchanged.

Behavior is unchanged - this is a messaging-only change.

Before / After

Before:

No validated direct dependency fixes were eligible for auto-apply.
Fix summary
- Applied fixes: 0
- Skipped findings: 31
  - Transitive (v1 skip): 31
  - No validated direct target: 0

After:

No fixes were auto-applied. `--fix` only auto-applies safe, in-range direct-dependency upgrades. Review the Suggested Fix Plan above and run the remaining fixes manually.
Fix summary
- Applied fixes: 0
- Not auto-applied: 31
  - Parent upgrades (review + test): 27, 27 breaking
  - Within-range refreshes (safe to run): 3
  - No fix available: 1

Follow-up (not in this PR): within-range refreshes are marked "safe to run" but still not auto-applied - whether --fix should auto-apply them is a separate behavior change, tracked separately.

In-house fix (fix-runner / output internals).

The --fix summary lumped every not-auto-applied fix under a single
"Skipped findings" line with a "v1 skip" jargon sub-bucket, which
(1) implied a safe within-range refresh needed manual review the same
as a breaking major bump, (2) miscounted - the number counted
deduplicated targets and skip records, not findings, so it contradicted
the "Remaining findings after fix" line, and (3) meant nothing to a user
staring at a report full of runnable fix commands.

New categorizeUnappliedTargets splits the not-applied fixes into
within-range refreshes (safe to run), parent upgrades (need review, with
a breaking major-bump sub-count derived via the existing
isMajorVersionBump), and no fix available. The summary renders these
honestly, drops the "v1 skip"/"Skipped findings" wording, and the note
explains that --fix only auto-applies safe in-range direct upgrades and
points to the Suggested Fix Plan for the rest.

FixResultJson gains an additive notAutoApplied block so CI can read the
structured breakdown without parsing stdout; existing fields are
unchanged. Behavior is unchanged - this is messaging only.
Adds categorizeUnappliedTargets unit tests (within-range vs parent
upgrade vs breaking vs no-fix) and printFixModeSummary rendering tests
(honest breakdown, no v1-skip jargon, breaking note only when a major
bump is present). Updates the create-pr mocks to the new
FixExecutionResult shape.
@sonukapoor
sonukapoor merged commit edb8e2e into main Aug 13, 2026
6 checks passed
@sonukapoor
sonukapoor deleted the bugfix/issue-974-fix-summary-messaging branch August 13, 2026 12:41
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.

fix: confusing --fix summary when all findings are transitive/breaking parent upgrades (nothing auto-applied)

1 participant