Skip to content

wheels-bot embeds a stale SHA in review idempotency markers, causing review re-fires #2848

Description

@bpamiri

Summary

Reviewer A/B comments carry an idempotency marker — <!-- wheels-bot:review-a:<pr>:<SHA> --> (and review-b). The embedded <SHA> can lag the commit the review actually ran against (commit_id). When that happens, the skip-check gate doesn't recognize the current head as already-reviewed, so Reviewer A re-fires on superseded commits and Reviewer B can emit contradictory verdicts.

Evidence (from #2847, merged 70291faff)

Across several rapid pushes, Reviewer B self-diagnosed this twice:

  • "review 4's idempotency marker contained the wrong SHA (2474385d3 instead of 315b3c0a)"

  • "the marker says 315b3c0a but the review was submitted against head e476c511f (confirmed via the GitHub commit_id field)."

The result was a 5-round review thrash, including one Reviewer B converged-approve and one Reviewer B "not aligned" pointing at different SHAs.

Impact

  • Redundant Reviewer A/B runs on a PR that's already been reviewed → wasted Anthropic API spend.
  • Confusing, self-contradictory review history; harder for a maintainer to know the real verdict.
  • The skip-check idempotency can fail to suppress duplicate runs.

Where to look

  • Marker emission: .claude/commands/review-pr.md and .claude/commands/review-the-review.md (where the <!-- wheels-bot:review-*:... --> marker string is written).
  • SHA source: how .github/workflows/bot-review-a.yml / bot-review-b.yml resolve and pass the head SHA into the prompt.

Acceptance criteria

  • The marker SHA always equals the commit the review ran against (checked-out head / review commit_id).
  • Capture the head SHA once (at checkout) and thread it consistently into the marker rather than re-deriving it later.
  • On a PR with several quick successive pushes, each review's marker SHA matches its commit_id, and the skip-check suppresses duplicate runs for an already-reviewed head.

Surfaced during the #2847 review cycle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions