fix(paired): cap consecutive reviewer silent-failure retries
The reviewer (codex) sometimes emits a final result with no visible text. The runtime marks the run failed → handleFailedReviewerExecution preserves status as review_ready → the follow-up scheduler re-queues another reviewer-turn → loop. The existing round_trip / arbiter caps never fire because round_trip_count only advances on owner-side submissions; bot-side reviewer flakes never increment it. Mirror the owner_failure_count pattern: add reviewer_failure_count to paired_tasks, increment on each silent failure, and escalate via requestArbiterOrEscalate once it reaches 2. Reset to 0 on every successful reviewer completion path (PROCEED/REVISE/arbiter/wait-for-user) and when the owner re-submits a fresh review cycle. Repro chat: 1507762222724546560 (stock-adiviser). Task 33968d31-0da2-480c-85d3-7a3999822ab4 logged 11 consecutive reviewer-turn entries with no work_items and round_trip_count stuck at 1.
This commit is contained in:
@@ -121,6 +121,7 @@ export function applyBaseSchema(database: Database): void {
|
||||
review_requested_at TEXT,
|
||||
round_trip_count INTEGER NOT NULL DEFAULT 0,
|
||||
owner_failure_count INTEGER NOT NULL DEFAULT 0,
|
||||
reviewer_failure_count INTEGER NOT NULL DEFAULT 0,
|
||||
owner_step_done_streak INTEGER NOT NULL DEFAULT 0,
|
||||
finalize_step_done_count INTEGER NOT NULL DEFAULT 0,
|
||||
task_done_then_user_reopen_count INTEGER NOT NULL DEFAULT 0,
|
||||
|
||||
Reference in New Issue
Block a user