Files
roboco/tests/unit/runtime
Renn F be9034363e fix(dispatch): age-gate the creator-skip so an unassigned PM-routed task can't be skipped forever
_route_unassigned_pm_task's creator-skip guard (don't auto-claim a
task back to the PM that just created it — it is about to assign it
one tool-call later) had no aging: when the creator-PM's session
ended without assigning, the task was skipped every ~30s dispatch
tick forever. Live: a be-pm-created fix task sat pending-unassigned
for 21 hours with 'Skipping auto-claim: routing target is the
creator' firing every tick.

The skip now applies only while the task is younger than
_CREATOR_ROUTE_GRACE_SECONDS (600) — past grace (or on an
unparseable/missing created_at, via the existing fail-open
_get_task_age) routing proceeds: the creator-PM claims its own task
and triages/delegates on spawn, which is legal and unguarded for a
cell PM. Extracted _creator_route_should_skip to hold the xenon B
ceiling.

Known-separate class, deliberately untouched here: a code-typed task
with an unmapped team (None/fullstack/system) routes to main-pm as a
deliberate never-strand fallback, but main-pm's claim is refused by
MAIN_PM_NO_CODE — a pre-existing every-tick claim-reject loop for
that shape regardless of creator, with no live instances today.

Gate: full make quality green (suite passed through coverage; xenon/
bandit/pip-audit/deptry/alembic/import-linter/foundation-check all
exit 0).
2026-08-01 00:28:28 +02:00
..
2026-06-26 01:43:08 +02:00