Skip to content

bug(review): AO-reviewer changes-requested verdict doesn't notifies the worker session #337

@neversettle17-101

Description

@neversettle17-101

Bug

Reviewer inline comments aren't injected into the agent's PTY session — no "address review feedback" nudge is sent.

Source: PR aoagents/ReverbCode#336, session agent-orchestrator-3
Confidence: High

Root Cause

review.Engine.Submit (backend/internal/review/review.go:278-317) only persists the AO reviewer's verdict/body (UpdateReviewRunResult) — it never notifies the worker. The comment on Submit says "AO does not post the review — the reviewer agent posts it to the PR itself," so on VerdictChangesRequested the worker only learns about it later via the generic SCM poll loop (backend/internal/observe/scm/observer.go's needsReviewRefresh), which is unreliable: it's gated on GitHub's reviewDecision field, which never becomes CHANGES_REQUESTED for self-reviews or COMMENT-state reviews.

Fix direction (not: poll GitHub harder)

Don't make the generic SCM-comment poller catch this — that would re-inject every PR comment from anyone into the worker session, which isn't what we want. Instead, fix it at the source: Submit already knows the verdict and body for the AO reviewer's own pass. When verdict == VerdictChangesRequested, have Submit (or its caller in backend/internal/httpd/controllers/reviews.go) directly message the worker session — same mechanism lifecycle.Manager uses (ports.AgentMessenger.Send, see backend/internal/lifecycle/reactions.go:441) — with the changes-requested body and an instruction to address it and reply on the GitHub thread. This is event-driven off the AO reviewer's own submit action, not a poll.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions