Four bugs surfaced by the 2026-05-11 smoke run, all on the path from
Main PM's first delegate to the cell PM accepting a subtask:
- gateway: TaskCompletenessError from _create_subtask_from_inputs leaked
through Starlette as a 500; agents retried in a tight loop because
they never saw field_hints. Wrap the call in _create_subtask_and_envelope,
catch the error, return Envelope.incomplete_input with the
interrogation-pattern reply the upfront completeness check produces.
- alembic: migration 012 used a 40-char revision id which exceeds
alembic_version.version_num varchar(32). Upgrade fell back to create_all
on every boot, silently skipping the migration. Rename to
012_align_agentrole_foundation (30 chars). File rename + revision string.
- events/stream_bus: external Redis FLUSHALL while orchestrator is running
(e.g. reset_runtime_state.sh) drops the consumer group; the listen loop
then spams NOGROUP every block-cycle forever. Catch ResponseError with
NOGROUP in the message and rebootstrap the group via
_ensure_consumer_group, then continue. Self-heals without restart.
- mcp/flow_server: delegate took body: dict with no schema, so the LLM
invented values like nature='standard' and the SDK threw 'unhashable
type: dict' on nested args. Flatten to typed top-level parameters with
docstring listing valid enum values for team / task_type / nature /
estimated_complexity. PLR0913 per-file ignore added for roboco/mcp/**
because MCP tool signatures ARE the LLM contract — bundling into a
dataclass would hide the enum hints that prevent the invention bug.