agora.observe.review
Human-in-the-loop review coordinator.
When the orchestrator enters the REVIEW phase, it calls
ReviewCoordinator.request_review(). The coordinator:
Posts a review summary to the project room.
Posts an MSC3381 poll with pre-labelled options.
Subscribes (one-shot) to poll responses targeting this poll and to
/agora review <answer_id>fallback commands.Waits up to
review_timeout_secondsfor a vote.Builds a
ReviewDecisionfrom the answer id + any free-text feedback from replies threaded under the poll message.On timeout, falls back to the headless auto-review.
The coordinator never blocks the event loop: all waiting happens on
asyncio.Event / asyncio.Future, and the timeout is bounded
by asyncio.wait_for().
Classes
Drives the REVIEW-phase poll/approval loop on the Matrix observer side. |
- class agora.observe.review.ReviewCoordinator[source]
Bases:
objectDrives the REVIEW-phase poll/approval loop on the Matrix observer side.
Composed by the orchestrator and called once per project entering REVIEW. The coordinator owns the lifecycle of a single MSC3381 poll event plus its associated
/agora reviewfallback command path, routes both into oneasyncio.Future, and resolves to aReviewDecision.Free-text feedback in threaded replies under the poll message is captured and surfaced on the decision so the next agent’s prompt can incorporate the human’s reasoning when looping back.
- __init__(matrix_client, dispatcher, project_room_id, timeout_seconds=300.0, project_work_dir=None, control=None)[source]
- attach()[source]
Register poll and command handlers on the event dispatcher.
Idempotent — calling twice on the same coordinator is a no-op. Normally invoked implicitly by
request_review(); expose it directly only if you need handlers wired before the first review poll is posted (e.g. integration tests that pre-feed events).