Skip to content

fix(claude-review): don't let a partial post's landed findings rename the rest - #107

Closed
crowecawcaw wants to merge 1 commit into
aws-deadline:mainlinefrom
crowecawcaw:fix/claude-review-suffixed-suppress
Closed

crowecawcaw wants to merge 1 commit into
aws-deadline:mainlinefrom
crowecawcaw:fix/claude-review-suffixed-suppress

Conversation

@crowecawcaw

@crowecawcaw crowecawcaw commented Oct 7, 2026 •

Copy link
Copy Markdown

What was the problem/requirement? (What/Why)

Review feedback on #100 (comment).

When two findings in one run share a base fingerprint, they post as base and base-2. If base posted but base-2 failed, a re-run of the post job added the PR's live threads to the suppress list it names findings against. base was now suppressed, so select_findings dropped both. The re-run reported nothing unposted and advanced the baseline, and base-2 was lost for good.

What was the solution? (How)

Split the two roles the suppress list was playing:

  • Naming: suffixes skip only the suppress list captured when the review began (prior-review-state.json). A re-run reads that from the same artifact, so every attempt names each finding the same way.
  • Already landed: the threads live on the PR at post time are checked after naming, and drop only a finding whose final fp matches.

Outside the re-run case, behavior is unchanged.

What is the impact of this change?

A partial post followed by a re-run no longer loses a same-symbol finding.

How was this change tested?

Red-green with unit tests:

  • test_rerun_after_partial_post_keeps_a_suffixed_finding: post() against the fake GitHub. Two findings share a symbol, only the second fails to post, then the job is re-run. It failed on mainline (base-2 never posted) and passes now.
  • test_suffixed_finding_survives_when_only_the_first_already_landed: select_findings with base live on the PR still yields base-2.
  • test_suffix_never_collides_with_a_literal_symbol: a literal symbol foo-2 is not named the same as a suffixed foo. This held before too; the test pins it.
  • The existing tests, including test_same_fp_in_one_run_is_disambiguated, pass unchanged.

All 61 tests pass (python -m unittest discover -s test).

Was this change documented?

Yes, in the select_findings docstring.

Is this a breaking change?

No. Marker format is unchanged, so existing threads still match.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@crowecawcaw
crowecawcaw force-pushed the fix/claude-review-suffixed-suppress branch from c5f79f6 to 4590d3b Compare October 7, 2026 19:10
… the rest

Two findings that share a base fingerprint post as base and base-2. If base posted but base-2 failed, a re-run of the post job added the live threads to the suppress list it names findings against. base was now suppressed, so both findings were dropped; the re-run reported nothing unposted and advanced the baseline, losing base-2 for good.

Suffixes now skip only the suppress list captured when the review began, which a re-run reads from the same artifact, so each finding gets the same name in every attempt. Threads live on the PR at post time are checked after naming and drop only an exact match.

Signed-off-by: Stephen Crowe <6042774+crowecawcaw@users.noreply.github.com>
@crowecawcaw
crowecawcaw force-pushed the fix/claude-review-suffixed-suppress branch from 4590d3b to e83940f Compare October 7, 2026 19:33
@crowecawcaw crowecawcaw changed the title fix(claude-review): suffix same-symbol findings before suppression fix(claude-review): don't let a partial post's landed findings rename the rest Oct 7, 2026
@crowecawcaw

Copy link
Copy Markdown
Author

Folded into #112, which carries this commit unchanged as its first commit.

@crowecawcaw crowecawcaw closed this Oct 7, 2026
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