Files
Renn F b19856dcbd fix(dispatch): route a code task that would land on main-pm to a cell PM instead
The routing layer's never-strand fallbacks — and the strategic
classifier's own cross-cell/high-complexity/teamless branches — could
hand a code-typed pending task to main-pm, but the dispatcher's
pre-claim route refuses that by org invariant (MAIN_PM_NO_CODE:
main_pm+code must not coexist; intake coerces such roots to
planning), so the task looped claim-reject every ~30s tick forever
instead of failing loud. Zero live instances in three days of logs —
preventive, found adversarially while fixing the creator-skip hold.

_get_routing_target now wraps the pure resolution: a code task whose
resolved target is main-pm redirects via _cell_pm_for_stranded_code_task
— nearest ancestor cell team wins (parent-chain walk mirroring
_resolve_pm_for_review), parentless/unresolvable defaults to backend.
Non-code routing is byte-for-byte unchanged; board precedence
untouched; the claim-route guard and the lifecycle spec's broader
i_will_plan allowance (cell PMs planning code parents, needs_revision
recovery) are both left exactly as designed.

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