agent-orchestrator icon indicating copy to clipboard operation
agent-orchestrator copied to clipboard

feat(review): add first-class worker review requests

Open AgentWrapper opened this issue 3 months ago • 1 comments

Problem

Workers can only reach the generic review trigger by naming a session explicitly. AO has no first-class worker request/status workflow, no per-request model override, and merge readiness does not require an AO review result for the immutable PR head.

Proposed contract

  • Add ao review request, defaulting the worker from AO_SESSION_ID, with optional reviewer and model overrides.
  • Keep the existing session review trigger route/service operation as the single implementation used by the worker CLI, desktop UI, and orchestrator automation.
  • Persist requester, reviewer/model selection, PR URL, and immutable target head SHA on each review run.
  • Reject stale-head result submission and retain per-worker serialization plus database uniqueness for duplicate/concurrent triggers.
  • Reject worker review requests from reviewer-runtime environments to avoid recursive reviewer spawning.
  • Expose status and findings to the originating worker through ao review status and JSON output.
  • Require a current-head AO approved result before AO reports or executes merge readiness.

Verification

Cover service/engine races and head fencing, HTTP DTOs, CLI default/override/recursion behavior, merge guards/status derivation, frontend presentation, generated OpenAPI/types, and CI-equivalent checks.

This work is independent of PR #4529.

AgentWrapper avatar Aug 27 '26 03:08 AgentWrapper

Done in #6262. Workers can ask for an AO review of their own PR with ao review trigger, choose the reviewer and model, and read results with ao review ls --json. Requiring an AO approval on the current head before merge-ready is a separate policy question, now tracked in #7491.

Rishet11 avatar Oct 30 '26 15:10 Rishet11