Review tasks and review work items were prepended (appendleft) to the
role dispatch queue, so whenever a reviewer had more than one review
waiting, the newest submission was always claimed first. Under a
sustained flow of submissions the oldest review could be postponed
indefinitely because every new arrival jumped ahead of it. Observed on a
real run: with two reviews waiting on the same manager seat, the one
created 30 seconds later was reviewed first while the earlier one waited
another seven minutes.
The prepend was redundant for its stated purpose: review-before-regular-
work priority is already enforced at pop time, where
_pop_next_queue_entry pulls the first review entry found anywhere in the
queue. Its only net effect was inverting the order among reviews.
The role serial queue (FIFO, on by default) could not compensate:
its enqueue hook only fires on phase transitions, and review work items
are inserted directly in READY, so they never enter the serial queue.
Fix: append review entries like everything else. Reviews now drain in
arrival order among themselves while still preempting regular work,
including on the blocked-manager soft-wake path.
Tests: three regressions (pop drains a review backlog oldest-first;
enqueue_runnable_work_items preserves arrival order across batches —
the observed inversion scenario; same contract for the review-Task
path). The pre-existing queue-layout assertion that encoded the old
prepend behavior now asserts the pop-time preemption contract instead.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A member session parked as blocked with focus on a terminal (or runnable, or
vanished) review card kept the dispatcher skipping its runnable work items
forever — the preempt-restore race leaves focus on an already-approved card
and every existing self-heal only recognized the runnable/missing shapes.
claim_runnable_tasks now converges such sessions to idle before the
blocked-skip branch, and the skip log carries focused/focused_phase for
forensics. (OBS-8; production-verified self-heal in the t4 campaign run.)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Loguru has no exc_info kwarg: extra kwargs are str.format() arguments, so
logger.error(f"...{e}", exc_info=True) forces .format() on the rendered
message — any error text containing braces (e.g. a JSON error body) raises
KeyError FROM the log call itself, escaping the surrounding except block and
killing the caller (observed: whole agent turns dying in benchmark runs).
The intended traceback was also never logged, since exc_info is not a loguru
feature.
Batch fix of all 143 sites across 11 files:
logger.X(msg, exc_info=True) -> logger.opt(exception=True).X(msg)
(one exc_info=exc site -> opt(exception=exc))
Messages are byte-identical; with the kwarg gone loguru never calls
.format(), so brace-containing f-string messages are inert.
Verified: AST post-conditions per file, py_compile, import smoke of all
modules, behavioral equivalence of the 3 patterns, full unit suite (1549
passed) with a failure set identical to the pristine tree (22 pre-existing,
zero regressions).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Also add pixel-agents to the README acknowledgements.