Skip to content

[aw] Prevent duplicate AI reviewer comments on reruns#280885

Draft
Ikuni17 wants to merge 1 commit into
mainfrom
fix/claude-reviewer-repeated-comments
Draft

[aw] Prevent duplicate AI reviewer comments on reruns#280885
Ikuni17 wants to merge 1 commit into
mainfrom
fix/claude-reviewer-repeated-comments

Conversation

@Ikuni17

@Ikuni17 Ikuni17 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Require Claude and Codex review runs to inspect prior review comments and reviews before reading the diff.
  • Build a same-workflow prior-feedback index and suppress semantically equivalent findings on non-outdated, unchanged code, including resolved threads.
  • Enrich prefetched review comments with the originating gh-aw workflow id, run id, and run URL so reviewers do not need to reconstruct identity from separate artifacts.

This addresses the repeated Claude Reviewer comments observed across multiple runs on #277679. The prefetched context was present in those runs, but the agent transcripts showed that Claude never opened pr-review-comments.json or pr-reviews.json.

Validation

  • node --check .github/scripts/prefetch_pr_context.js
  • node scripts/eslint .github/scripts/prefetch_pr_context.js
  • Real PR payload smoke check for Claude workflow marker parsing
  • git diff --check
  • gh aw compile --purge --validate --no-check-update

The gh-aw compile completed successfully. No lock-file changes were produced because code-reviewer.md is imported at runtime.

Live validation

Dispatched Claude Reviewer twice from fix/claude-reviewer-repeated-comments against this unchanged draft PR:

In both runs:

  • prefetch_pr_context completed successfully.
  • The agent artifact contained both pr-review-comments.json and pr-reviews.json (both empty because this new PR had no reviews yet).
  • Claude failed before its first model response or tool call, so it could not exercise the mandatory history read.
  • The model gateway repeatedly returned HTTP 401 (invalid subscription key or wrong API endpoint) with intermittent HTTP 429 (No deployments available) for llm-gateway/claude-opus-4-8.
  • No review comments or other safe outputs were posted.

The local context enrichment and branch-ref prefetch path are validated. Live verification that Claude reads prior comments and suppresses a duplicate remains blocked by the external model-gateway authentication/deployment failure.

@infra-vault-gh-plugin-prod

Copy link
Copy Markdown
🤖 Jobs for this PR can be triggered through checkboxes. 🚧

ℹ️ To trigger the CI, please tick the checkbox below 👇

  • Click to trigger kibana-pull-request for this PR!
  • Click to trigger kibana-deploy-project-from-pr for this PR!
  • Click to trigger kibana-deploy-cloud-from-pr for this PR!
  • Click to trigger kibana-entity-store-performance-from-pr for this PR!
  • Click to trigger kibana-storybooks-from-pr for this PR!

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