Coder gate — feature-flag WAT dispatch actions to notify Controller
Coder gate for MC-4494 / Control Room v2 first behavior-changing slice. Objective: Behind a default-off feature flag, make WAT/workflow dispatch actions notify the Controller i...
StateDoneNext ActionClosedOwnerLuciRuntimeClosedAge13d ago
Ticket is done; runtime is closed.·profile coder · cwd /home/lucienne/workspace/state/control-room-worktrees/mc-4499-wat-controller-notify · uptime 12d 17h · last activity 12d 17h ago
Description
MC-4499
Coder gate for MC-4494 / Control Room v2 first behavior-changing slice.
Objective:
Behind a default-off feature flag, make WAT/workflow dispatch actions notify the Controller instead of auto-dispatching/reassigning/spawning runtimes.
Feature flag:
- Suggested name: MC_CONTROL_ROOM_V2_CONTROLLER_NOTIFY
- Default off; existing behavior must remain when unset/false.
Target anchors from preflight:
- app.py `_INLINE_DISPATCH_INSTRUCTIONS`
- app.py `_INLINE_DISPATCH_ROLES`
- app.py `_dispatch_workflow_action_inline()`
- app.py `api_workflow_action()`
- tests around workflow action/idempotency/runtime dispatch.
Required behavior under flag:
- Dispatch actions such as `send_to_larry`, `send_to_tessa`, `send_to_council`, `return_for_fixes` create a durable Controller notification/audit comment.
- Return API success with a clear marker such as `queued_for_controller: true` / `controller_notify: true`.
- Do NOT call `_dispatch_workflow_action_inline()`.
- Do NOT call `_queue_and_pickup()`.
- Do NOT inject into tmux/runtime.
- Do NOT change `assigned_to` or force `status='todo'`.
- State-only actions like approve/close remain current behavior for this slice.
Required tests:
- Flag off preserves current workflow-action dispatch behavior or existing tests remain green.
- Flag on dispatch action writes Controller/audit comment and returns controller notification marker.
- Flag on dispatch action does not reassign, does not status-flip, and does not create runtime/queued pickup side effects.
- Tests should be focused and deterministic; monkeypatch runtime/pickup helpers where needed.
Constraints:
- Runtime/model guidance remains advisory; Controller can choose any fitting capability.
- Do not change comment route or Telegram behavior yet; those are later slices.
- Do not collapse board statuses yet.
- Use dev-loop/project hooks as required; do not bypass.
Expected check-in: 2026-05-31 17:57:49 UTC.
Activity
done
INTERACTIVE
Luci is working...
Details —
Done
· High
· Luci
▼
SState
Done
Closed
PPeople
TTiming / Details▼
telegram (human)
Mission Control
13d ago
13d ago
Advanced / Operator evidence
RRouting owner
ROperator console
Ticket is done; runtime is closed.controller_verified_after_claude_budget_capprofile coder · cwd /home/lucienne/workspace/state/control-room-worktrees/mc-4499-wat-controller-notify · uptime 12d 17h · last activity 12d 17h agoMC is visibility-only. Hermes Luci launches and gates work outside MC, then mirrors evidence/status here.Raw console: luci-controller · claude-code/anthropic/sonnet
Coder slice opened from MC-4497 preflight. Scope is WAT/workflow dispatch actions only, behind a default-off feature flag.
controller13d ago
Coder dispatched.
Role: Coder
Runtime/capability: Claude Code print mode via Hermes background process
Runtime session: hermes-bg-proc_ac67664e8697
PID: 3078474
Worktree: /home/lucienne/workspace/state/control-room-worktrees/mc-4499-wat-controller-notify
Branch: cr/mc-4499-wat-controller-notify
Scope: first behavior-changing slice: feature-flag WAT dispatch actions to notify Controller instead of auto-dispatching. No comment-route, Telegram, or board-status changes in this slice.
Expected check-in: 2026-05-31 17:58:49 UTC.
Next gate: Reviewer/Council after Coder completion.
Controller decision
lucienne13d ago
Controller recovery: MC operator flipped to needs_input with pending_state=crashed, but Claude Code worker PID 3078489 is actively running on Luci (2+ min elapsed, no output yet — normal Claude Code startup). Moving back to in_progress. Will check output again shortly.
controller13d ago
Controller gate after Coder runtime completion.
Role: Controller
Runtime/capability: local deterministic verification
Scope: Verify Coder output for MC-4499 feature-flag WAT dispatch Controller notification slice.
Outcome: passed_controller_smoke; advancing to Reviewer/Council
Evidence:
- Commit exists: a0966da feat(MC-4499): feature-flag WAT dispatch actions to notify Controller
- Diff: app.py + tests/test_mc4499_controller_notify.py only.
- `python3 -m pytest tests/test_mc4499_controller_notify.py -q` => 12 passed, 7 subtests passed.
- `python3 -m pytest tests/test_workflow_idempotency.py -q` => 5 passed.
- `python3 -m py_compile app.py tests/test_mc4499_controller_notify.py` => passed.
- `graphify update .` => graph rebuilt successfully.
Notes: Claude hit budget cap and did not emit the exact DONE marker, so Controller independently verified the commit/test evidence before advancing.
Next step: independent Reviewer/Council gate before landing.
Controller decision
lucienne13d ago
Coder completed implementation (cost budget exhausted before council/DONE).
Evidence:
- Commit: a0966da on branch cr/mc-4499-wat-controller-notify
- Files: app.py (feature flag + controller-notify branch in api_workflow_action), tests/test_mc4499_controller_notify.py (13 new tests)
- All 17 tests pass (13 new + 4 idempotency regression)
- Compile check: app.py OK
What's done:
- _controller_notify_enabled() helper (default OFF)
- Flag ON: dispatch actions write audit comment, return controller_notify=true, no inline dispatch/pickup/status mutation
- Flag OFF: existing behavior preserved
- State-only actions unaffected
Remaining (next gate):
- Council review (second-opinion)
- Independent code review
- Tessa browser validation (not UI-facing but verify board still works)
- Push to origin
Worker session hit cost ceiling at $0.94 (20 turns). Moving to in_review for Reviewer gate.
reviewer-council13d ago
Reviewer/Council gate completed.
Role: Reviewer/Council
Runtime/capability: Hermes delegate_task independent reviewer
Scope: Review MC-4499 feature-flag WAT dispatch controller-notify implementation against master.
Outcome: approved
Evidence:
- Diff scope limited to `app.py` and `tests/test_mc4499_controller_notify.py`.
- Feature flag `MC_CONTROL_ROOM_V2_CONTROLLER_NOTIFY` is default-off and truthy-only.
- Flag-off behavior preserves existing inline dispatch path.
- Flag-on dispatch actions write durable system Controller notification comment and return `controller_notify` / `queued_for_controller` markers.
- Flag-on path returns before inline dispatch; avoids `_dispatch_workflow_action_inline`, `_queue_and_pickup`, status mutation, assignee mutation, and runtime side effects.
- State-only actions remain on `models.apply_workflow_action`.
- Additional temp-DB route check confirmed persisted system comment and unchanged ticket status/assignee/runtime fields.
Tests: `tests/test_mc4499_controller_notify.py` => 12 passed; `tests/test_workflow_idempotency.py` => 5 passed; py_compile passed.
Must-fix: none. Should-fix: none.
Next step: Validator/landing gate.