Skip to content

fix: dedupe GitHub PR review webhooks - #56183

Closed
RND-Agent wants to merge 1 commit into
NousResearch:mainfrom
RND-Agent:fix/pr-review-lifecycle-dedupe
Closed

fix: dedupe GitHub PR review webhooks#56183
RND-Agent wants to merge 1 commit into
NousResearch:mainfrom
RND-Agent:fix/pr-review-lifecycle-dedupe

Conversation

@RND-Agent

Copy link
Copy Markdown

Summary

  • Gate Codex/RND-Agent PR-review lifecycle suppression behind github_pr_review_dedupe: true so generic GitHub webhook routes are unaffected.
  • Add same-head review dedupe before launching an agent, using prior RND-Agent ## Code Review Summary reviews without requiring newer artifact markers.
  • Move delivery-id idempotency before review/head lookups so GitHub retries do not repeatedly run synchronous gh api checks.
  • Cover lifecycle no-op, same-head CHANGES_REQUESTED dedupe, generic route pass-through, deliver-only pass-through, and duplicate-delivery fast path.

Request Source / Audit

Change Source

  • Change type: agent-authored fix with Codex-assisted implementation and review.
  • Source branch: origin/main
  • Source commit: 8d3c45012
  • New commit: 94ea3a7fc66829ef51cd1a51c2f08f3a350469ce

Target

  • Repo: NousResearch/hermes-agent
  • Base branch: main
  • Head branch: RND-Agent:fix/pr-review-lifecycle-dedupe
  • Environment: Hermes webhook GitHub PR-review automation.

Changed Files

  • gateway/platforms/webhook.py: adds opt-in PR-review lifecycle suppression, same-head review dedupe, and earlier delivery-id idempotency.
  • tests/gateway/test_webhook_integration.py: adds regression coverage for PR-review dedupe and generic route non-regression cases.

Validation

  • python -m pytest tests/gateway/test_webhook_integration.py tests/gateway/test_webhook_adapter.py tests/gateway/test_webhook_signature_rate_limit.py tests/gateway/test_webhook_dynamic_routes.py tests/gateway/test_webhook_deliver_only.py -q -> 109 passed.
  • git diff --check -> passed.
  • Codex review of first pass found over-broad generic webhook impact and idempotency ordering; follow-up fix addressed those findings.

Risk / Rollback

  • Risk: medium-low; behavior is opt-in through github_pr_review_dedupe: true, but the opted-in GitHub PR-review route must have this flag set to activate dedupe.
  • Rollback: revert this PR to restore previous webhook dispatch behavior.

@RND-Agent RND-Agent closed this Jul 1, 2026
@alt-glitch alt-glitch added type/bug Something isn't working comp/gateway Gateway runner, session dispatch, delivery platform/webhook Webhook / API server P3 Low — cosmetic, nice to have sweeper:risk-automation Sweeper risk: may affect CI, automerge, label sync, or maintainer automation sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages labels Jul 1, 2026
@RND-Agent
RND-Agent deleted the fix/pr-review-lifecycle-dedupe branch July 1, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have platform/webhook Webhook / API server sweeper:risk-automation Sweeper risk: may affect CI, automerge, label sync, or maintainer automation sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants