Skip to content

Review-to-fix dispatch chain fails silently after bot-originated reviews #6438

Description

@fullsend-ai-retro

What happened

On PR #6416, the review-to-fix auto-dispatch chain failed to trigger after bot-originated reviews, requiring human intervention to continue the pipeline.

Three data points are consistent:

  1. Review docs: Add agent-compatible code problem document #1 (run 32390818302, triggered by code agent opening the PR) found critical findings at 16:31 UTC. No fix agent was auto-dispatched. The human had to manually trigger /fs-fix at 16:43 UTC.
  2. Review Add problem areas: Tekton pipeline review, migration path, multi-tenancy #2 (run 32394890453, triggered by fix agent pushing code) found the same critical findings at 17:15 UTC. No fix agent was auto-dispatched. The PR sat untouched for 14 hours.
  3. Review docs: Add codebase context problem document and trim CLAUDE.md #3 (run 32458466095, triggered by a human push the next morning) found the same findings at 07:40 UTC. Fix agent (run 32459660822) was auto-dispatched within minutes.

Pattern: reviews triggered by bot-originated events (code agent PR open, fix agent push) never produced a fix dispatch. The review triggered by a human push did.

What could go better

The review-to-fix auto-dispatch chain should work end-to-end regardless of whether the originating push was from a bot or human. The current behavior forces human intervention to restart the pipeline, adding latency (14 hours in this case) and defeating the purpose of automated fix iterations.

Confidence: moderate. The 3-for-3 pattern (bot reviews never dispatch, human review does) is clear, but I cannot determine the exact root cause from the available data. Possible explanations: (1) GitHub webhook suppression for events triggered by bot-originated workflows -- though GitHub Apps should typically be exempt from this; (2) the review agent submitted COMMENTED instead of CHANGES_REQUESTED for reviews 1 and 2, meaning no fix dispatch was expected -- but both reviews found critical issues, making COMMENTED unlikely; (3) concurrency groups or other workflow conditions prevented the fix from starting. The original review verdicts are masked by DISMISSED state (superseded by later reviews), so I cannot verify which explanation is correct.

Related but distinct from #5937 (debouncing redundant fix processing), #6050 (detecting missing dispatches from dropped webhooks), and #5666 (synchronize events not routed to review). None of those identify this specific failure mode: reviews after bot pushes silently fail to trigger fix dispatches.

Proposed change

First, determine the root cause by checking one of: (a) the webhook delivery log for the review events on PR #6416 (Settings > Webhooks > Recent Deliveries), or (b) the original review verdicts for runs 32390818302 and 32394890453 in the workflow logs (look for the review submission API call).

If the root cause is webhook suppression: add an explicit fix-agent dispatch step to the review post-script (scripts/post-review.sh in fullsend-ai/agents). After the review agent submits a CHANGES_REQUESTED verdict, the post-script should check whether the current workflow was triggered by a bot event. If so, dispatch the fix workflow via gh workflow run or repository_dispatch (these event types are not subject to webhook suppression). The fix workflow in fullsend-ai/fullsend would need to accept repository_dispatch as an additional trigger.

If the root cause is the review agent submitting COMMENTED instead of CHANGES_REQUESTED for critical findings: fix the review agent's verdict logic to always submit CHANGES_REQUESTED when critical or high-severity findings are present.

Either fix should respect the iteration cap from #902.

Validation criteria

On the next 5 PRs where the fix agent pushes code and the subsequent review finds critical or high-severity findings: the fix agent should be auto-dispatched within 5 minutes of the review verdict, without requiring a human push or /fs-fix command. Track the time between review verdict and fix agent start for bot-originated vs human-originated review chains -- the median should be comparable (currently ~2-3 minutes for human-originated chains).


Generated by retro agent from #6416

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions