Bug: deferred waiting tickets can still be auto-picked/executed
Context / repro from MC-4159 on 2026-05-25: - Ticket was intended to stay deferred/waiting: "Do not start until Luci is idle enough..." - Routing log shows it was briefly expose...
StateDoneNext ActionClosedOwnerLuciRuntimeClosedAge19d ago
Ticket is done; runtime is closed.·profile codex · cwd /home/lucienne/workspace/mission-control · uptime 17d 21h · last activity 17d 18h ago
Description
MC-4162
Context / repro from MC-4159 on 2026-05-25:
- Ticket was intended to stay deferred/waiting: "Do not start until Luci is idle enough..."
- Routing log shows it was briefly exposed as todo, then mc_pickup claimed it: inbox -> todo -> in_progress.
- It was then moved in_progress -> waiting, but the runtime session mc-MC-4159 kept executing.
- Worker later emitted review_ready from a waiting ticket and completed the Hermes update.
Expected behaviour:
1. Creating/updating a deferred ticket for luci/lucienne should be atomic: it must never transiently expose assigned todo if the desired final state is waiting.
2. A ticket moved from in_progress to waiting/parked must stop, pause, or explicitly reconcile any active runtime/session/lock.
3. Runtime workflow actions such as DONE/review_ready must be rejected or quarantined unless the ticket is still in a valid executing state.
4. Add regression tests covering: create-with-waiting, todo auto-pickup race, in_progress->waiting runtime stop/reconcile, and workflow action from waiting.
Acceptance evidence required:
- Focused tests pass for the dispatcher/runtime lifecycle edge cases.
- MC-4159-style scenario cannot start execution when final desired state is waiting.
- If a runtime already exists, parking the ticket leaves a clear evidence comment and no live worker continues silently.
- Independent review before landing.
Activity
done
INTERACTIVE
Luci is working...
Details —
Done
· High
· Luci
▼
SState
Done
Closed
PPeople
TTiming / Details▼
lucienne (human)
mission-control
19d ago
16d ago
Advanced / Operator evidence
RRouting owner
ROperator console
Ticket is done; runtime is closed.ticket_marked_doneprofile codex · cwd /home/lucienne/workspace/mission-control · uptime 17d 21h · last activity 17d 18h agoMC is visibility-only. Hermes Luci launches and gates work outside MC, then mirrors evidence/status here.Raw console: luci · codex/openai/gpt-5.5
WWorkflow
Start Dev Review + QA ▾
Select phases to include:
Agents
Review Gates
Decision
WAT routing: choose an agent, review gate, or decision. Buttons use the live runtime when one is attached.
Created as a parked bug ticket from Elmar report. Deliberately status=waiting on create to avoid the MC-4159 auto-pickup race; do not release to todo until ready to run the gated fix loop.
luci18d ago
Luci picking up this ticket (background worker).
luci18d ago
[failed_to_inject] runtime_busy: Ticket runtime is not ready for input (status=running). Wait for the current turn to finish, queue the message, or explicitly interrupt/restart the runtime before sending more terminal i
Ticket picked up by Luci via MC dispatcher.
MC-4162: Bug: deferred waiting tickets can still be auto-picked/executed
Work this ticket in the live tmux runtime. Use DONE:, REVIEW:, or QUESTION: when you need MC to reflect the next state.
luci18d ago
Ticket runtime send failed while dispatching.
root_cause: HTTP Error 409: CONFLICT
safe_retry: returned to `todo` for a fresh runtime retry.
human_input_required: no
luci-followup-sweep18d ago
[follow-up] 15 min past expected check-in (2026-05-26T13:52+02:00 UTC).
Luci18d ago
Runtime transcript sweep (MC-3482 write-back) — the runtime was reaped before emitting a DONE/REVIEW/QUESTION verdict. The last substantive unharvested transcript tail is preserved below so the work is not lost. Terminal chrome was filtered:
efore searching raw files.
• PreToolUse hook (completed)
• PreToolUse hook (completed)
• Ran git log -1 --oneline
└ 8863a3f3 Quarantine stale worker completion signals
• PreToolUse hook (completed)
• Ran git status --short
└ (no output)
• Ran git status --short
└ (no output)◦
• Ran git log -1 --oneline
└ bcc98be Fix parked ticket runtime lifecyclerkkiinWngWogorrkki•in4ngg◦5•WWoorrkkiinWngWog◦orrkkiin6ngg•◦7WWoorrkkiin•WngWogorrkki8inngg◦•9WWoor◦rkkiinWngWogorrkki•30inngg◦1
• PreToolUse hook (completed)
• Ran sqlite3 /home/lucienne/workspace/Vault/vault.db ".schema activity_log"
└ CREATE TABLE activity_log (
id INTEGER PRIMARY KEY AUTOINCREMENT,
… +14 lines (ctrl + t to view transcript)
CREATE INDEX idx_activity_date ON activity_log(date);
CREATE INDEX idx_activity_category ON activity_log(category);•WWoorrkkiinWngWogor◦rkkiin2ngg•◦3WWoorrkkiin•WngWogorrkki4inngg◦•5WWoor◦rkkiinWngWogorrkki•6inngg◦7•WWoorrkkiinWngWog◦orrkki8inngg•◦9WWoorrkkiin•WngWogorrkkiin40ngg◦•1WWoor◦rk
• PreToolUse hook (completed)
• Ran sqlite3 /home/lucienne/workspace/Vault/vault.db "INSERT INTO activity_log(date, actor, category, summary, details) VALUES (date('now'), 'Luci', 'milestone', 'Closed MC-4162 waiting-ticket runtime race', 'Patched Mission
│ Control runtime lifecycle and mc_pickup so waiting/blocked tickets reconcile active runtimes and stale worker completion signals are quarantined. Commits: mission-control bcc98be; luci-workspace 8863a3f3. Tests: MC waiting/
│ runtime 79 passed; dispatcher waiting/reliability 22 passed.');"
└ (no output)inWngWogorrkki•2inngg◦3•WWoorrkkiinWngWog◦orrkki4inngg•◦5WWoorrkkiin•WngWogorrkki6inngg◦•7WWoor◦rkkiinWngWogorrkki•8inngg◦9•WWoorrkkiinWngWog◦orrkkiin50ngg•◦1WWoorrkkiin•WngWogorrkkiin2ngg◦•3WWoor◦rkkiin
• PreToolUse hook (completed)
• PreToolUse hook (completed)
• PreToolUse hook (completed)
• PreToolUse hook (completed)
• Explored
└ List rg --files
Search mc.*coord|coordination|mc_coord
Read mc_coordination_mcp.py
• Ran printf '%s
│ ' '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"mc_report_done","arguments":{"summary":"Fixed MC-4162: waiting/blocked tickets now reconcile
│ active runtimes and stale worker completion signals are quarantined. Commits pushed: mission-control bcc98be, luci-workspace 8863a3f3."}}}' | MC_TICKET_ID=4162 MC_TICKET_NONCE=manual-mc-4162-done python3 mc_coordination_mcp.py
└ {"jsonrpc": "2.0", "id": 1, "result": {"protocolVersion": "2024-11-05", "capabilities": {"tools": {}}, "serverInfo": {"name": "mc-coord", "version": "1.2.0"}}}
{"jsonrpc": "2.0", "id": 2, "result": {"content": [{"type": "text", "text": "DONE recorded for MC-4162.\nDurable signal written: /home/lucienne/workspace/state/mc-signals/MC-4162.json\nThe orchestrator harvests this even if
… +2 lines (ctrl + t to view transcript)
[mc-coord-mcp] signal written: DONE -> /home/lucienne/workspace/state/mc-signals/MC-4162.json
[mc-coord-mcp] stdin closed — exiting•Working(52m 18s • esc to interrupt)›Summarize recent commitsgpt-5.5 xhigh · ~/workspace/.claude/worktrees/pool-2◦9•WWoorrkkiinWngWog◦orrkkiin20ngg•◦1WWoorrkkiin•WngWogorrkkiin2ngg◦•3WWoor◦rkkiinWngWogorrkki•in4ngg◦5•WWoorrk
• PreToolUse hook (completed)
• PreToolUse hook (completed)
• PreToolUse hook (completed)
• Ran git status --short
└ (no output)in
• Ran git status --short
└ (no output)
• Ran git status --short
└ M reports/fuel-impact-2026-05-07.html
?? reports/mc-4223-screenshots/
… +3 lines (ctrl + t to view transcript)
?? tasks/sa-airline-cpa-watch.md
?? ticket-attachments/MC-4223/WngWogor◦rkkiin6ngg•◦7WWoorrkkiin•WngWogorrkkiin8ngg◦•9WWoor◦rkkiinWngWogorrkki•30inngg◦1•WWoorrkkiinWngWogor◦rkki2inngg•◦3WWoorrkki•inWngWogorrkki4inngg◦•5WWoor◦rkkiinWngWogorrkki•6inngg◦7•WWoorrkkiinWngWog◦orrkki8inngg•
• DONE: MC-4162 is complete.›Summarize recent commitsgpt-5.5 xhigh · ~/workspace/.claude/worktrees/pool-2
Implemented and pushed:
- mission-control bcc98be: parked waiting/blocked tickets now close active runtimes, stop the ticket tmux target, clear worker metadata, and reject/quarantine stale runtime workflow actions with a 409.
- luci-workspace 8863a3f3: live mc_pickup.py now rechecks ticket state before worker completion, routes completion through workflow actions, fails closed on 409/5xx, and does not raw-PATCH stale signals.
Verification:
- tests/test_mc4162_waiting_lifecycle.py tests/test_ticket_runtime.py: 79 passed.
- WaitingCompletionQuarantineTests + test_mc_pickup_reliability.py: 22 passed.
- py_compile and git diff --check passed.
- Second-opinion review found a TOCTOU gap; fixed with conditional workflow updates before commit.
Known unrelated: tests/test_workflow_idempotency.py still has 2 existing failures on current master.
system18d ago
RUNTIME TERMINAL STATE (MC-3482 contract)
status: warning
summary: Live ticket runtime timed out without a harvestable verdict; parked for automatic runtime recovery.
root_cause: harvest timeout — no DONE/REVIEW/QUESTION verdict; write-back preserved substantive transcript tail
safe_retry: Runtime was killed and the ticket was returned to todo for a fresh Luci-owned retry; no human input is needed.
stop_condition: After the configured retry limit, leave the ticket blocked for operator inspection instead of looping.
human_input_required: no
next_actions:
- Pickup will start a fresh runtime from MC history.
- Inspect the pane log artifact only if the retry fails again.
artifacts:
- ticket:MC-4162
- pane_log:/home/lucienne/workspace/logs/mc-MC-4162.tmux.log
luci18d ago
Luci picking up this ticket (background worker).
luci18d ago
Ticket picked up by Luci via MC dispatcher.
MC-4162: Bug: deferred waiting tickets can still be auto-picked/executed
Work this ticket in the live tmux runtime. Use DONE:, REVIEW:, or QUESTION: when you need MC to reflect the next state.
Luci18d ago
Fixed MC-4162: waiting/blocked tickets now reconcile active runtimes and stale worker completion signals are quarantined. Commits pushed: mission-control bcc98be, luci-workspace 8863a3f3.
api18d ago
Closed (orchestrator). Both commits on master + new tests green:
- mission-control bcc98be (+580/-6): models.py +160 (waiting/blocked lifecycle reconcile), ticket_runtime.py +19, app.py +17, runtime-architecture-refresh.md +12, NEW test_mc4162_waiting_lifecycle.py +378. 8/8 tests pass.
- workspace 8863a3f3 (+320/-11): mc_pickup.py +185 (stale worker completion signal quarantine), test_mc_pickup_regressions.py +135 (4 new passing tests verified by A/B diff).
8 pre-existing failures in test_mc_pickup_regressions.py are unrelated regression debt (confirmed pre-MC-4162 commit had identical 8 failures). Worker correctly flagged 'known unrelated' for test_workflow_idempotency.py too.
ACs covered: deferred waiting/blocked tickets now reconcile active runtimes; stale REVIEW/DONE/QUESTION signals from prior episodes are quarantined; lifecycle docs updated.
UA sign-off (runbooks/ua-signoff-gate.md): n/a — backend lifecycle hardening, no user surface. Verdict: PASS
luci-controller18d ago
[controller release · 2026-05-26T13:05:32+02:00] This is Luci-owned technical hardening, not a human blocker. Releasing to todo for Codex pickup when capacity is available.
luci-controller18d ago
[controller repair · 2026-05-26T13:07:21+02:00] Dispatcher reported HTTP 409 after starting the tmux runtime, leaving the ticket row in todo with failure_reason. Runtime ledger shows the prompt was injected and session is running; normalized ticket to in_progress. Expected check-in: 2026-05-26T13:52+02:00.