Ticket is done; runtime is closed.·profile claude_opus_1m_medium · cwd /home/lucienne/workspace/mission-control · uptime 16d 4h · last activity 16d 2h ago
Description
MC-4350
**Severity:** high
**Location:** chat_runtime.py:183
**Flagged by:** codex
**Issue:**
send() overwrites harvest_offset, last_turn_marker, and last_input_preview without checking whether a previous turn is still unharvested, and harvest_once() does not use the same per-thread lock. A second send can advance harvest_offset past the first response before it is committed, dropping or misattributing assistant output.
**Suggested fix:**
Use the same per-thread lock around harvest and send state transitions, and reject or queue a new send while metadata indicates an unharvested in-flight turn; alternatively harvest and commit any pending response before accepting the next input.
---
Found by mc-auto-review on 2026-05-28 06:08 SAST.
Repos reviewed: mission-control.
auto-review-hash: 5bfc731e40c6
Activity
done
INTERACTIVE
Luci is working...
Details —
Done
· High
· Luci
▼
SState
Done
Closed
PPeople
TTiming / Details▼
mc-auto-review (scheduled)
Mission Control
16d ago
16d ago
Advanced / Operator evidence
RRouting owner
ROperator console
Ticket is done; runtime is closed.terminal_state_reapprofile claude_opus_1m_medium · cwd /home/lucienne/workspace/mission-control · uptime 16d 4h · last activity 16d 2h agoMC is visibility-only. Hermes Luci launches and gates work outside MC, then mirrors evidence/status here.Raw console: luci · claude/anthropic/opus[1m]
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.
Ticket picked up by Luci via MC dispatcher.
MC-4350: [auto-review] send() overwrites harvest_offset, last_turn_marker, and last_input_pre
Work this ticket in the live tmux runtime. Use DONE:, REVIEW:, or QUESTION: when you need MC to reflect the next state.
luci16d ago
[failed_to_inject] runtime_busy: Ticket runtime is not ready for input (status=running). Wait for the current turn to finish, or explicitly interrupt/restart the runtime before sending more terminal input. This message
Ticket picked up by Luci via MC dispatcher.
MC-4350: [auto-review] send() overwrites harvest_offset, last_turn_marker, and last_input_pre
Work this ticket in the live tmux runtime. Use DONE:, REVIEW:, or QUESTION: when you need MC to reflect the next state.
luci16d 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
system16d ago
RUNTIME TERMINAL STATE (MC-3482 contract)
status: warning
summary: Ticket runtime send failed; parked for automatic recovery.
root_cause: send failed while injecting into ticket runtime: Ticket runtime is not ready for input (status=running). Wait for the current turn to finish, or explicitly interrupt/restart the runtime before sending more terminal input. This message was not sent.
safe_retry: Queued message was returned to pending and the ticket was returned to todo for a fresh runtime 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 retry the pending message in a fresh runtime.
- Inspect runtime/send only if the retry fails again.
artifacts:
- ticket:MC-4350
Luci16d ago
QUESTION: whnneed MC to reflect the nextstate.
[MC_TICKET_TURN:35:179942108678:1af56202 interna routing marker;do
not mention this markerin your reply]
[Optional MC completion sentinel: as the verylas line of your reply,on
its own line, you MAY emit this exact JSON to auto-advance the ticket:
{"mc_signal":"DONE|REVIEW|QUESTION","ticket":"MC-4350","nonce":"MC_TICKET
_TURN:4350:1779942108678:1af56202","payload":"<one-line summary>"} . Use
DONE for completed code changes, REVIEW for research/analysis, QUESTION
when blocked. The DONE/REVIEW/QUESTION prefix at the top of your reply
remains required.]
❯ Pressuptoeditqueuedmessages
⏵⏵bypasspermissionson (shift+tabtocycle)
69512tokens
tmuxfocus-eventsoff·add'set-gfocus-eventson'to~/.tmux.confandre…
`todo` so pickup can run it.
Elmar says: Tickt picked up by Luci viaMC dipatcher.
MC-4350: [auto-review] send() overwrites harvest_offset,
last_urn_marr, and last_input_pe
Work this ticket in the live tmux runtime. Use DONE:, REVIEW:, or
QUESON: when you need MC to reflect the next state.
MC_TICKET_TURN:4350:1779942108678:1af56202 interna routing markr; do
no mention this marker in your rply]
[Optional MC completion sentinel: as he very last line of your reply, on
its own line, you MAY emit this exact JSON to auto-advance the ticket:
{"mc_signal":"DONE|REVIEW|QUESTION","ticket":"MC-4350","nonce":"MC_CKET
_TURN:4350:1779942108678:1af56202","payload":"<one-line summary>"} . Use
DONE for complted code changes, REVIEW for research/analysis, QUESTION
when blocked. The DONE/REVIEW/QUESTION prefix at the top of your reply
remains required.]
❯ Press up to edit queued messages
69512tokens
tmuxfocus-eventsoff·add'set-gfocus-eventson'to~/.tmux.confandre…
Luci16d ago
Fixed harvest/send race in chat_runtime.py: harvest_once commit now holds the per-thread send lock; send() flushes any unharvested in-flight turn before advancing harvest_offset. +3 tests, MC-4352 regressions green. Pushed to slot2/mc-MC-4327.
luci16d ago
Luci picking up this ticket (background worker).
luci16d ago
[system]: Ticket moved to Todo: [auto-review] send() overwrites harvest_offset, last_turn_marker, and last_input_pre
[system]: Ticket moved to Todo: [auto-review] send() overwrites harvest_offset, last_turn_marker, and last_input_pre
Luci16d ago
DONE: MC-4350 already complete — commit bd796c8 landed on slot2/mc-MC-4327,
tree clean, pushed. No rework needed; the Todo bounce was a re-dispatch, not a
failure. Fix stands: harvest commit now holds the per-thread lock, and send()
flushes any unharvested in-flight turn before advancing harvest_offset. Tests
green (3 new + MC-4352 + 23 runtime regressions).
{"mc_signal":"DONE","ticket":"MC-4350","nonce":"MC_TICKET_TURN:4350:1779942490
932:934cc059","payload":"Already committed bd796c8 + pushed; harvest lock +
pending-turn flush, tests green"}
luci16d ago
Workflow action `review_ready` applied. Work ready for review.
api16d ago
Gate (orchestrator): fix is real and committed — bd796c8 "lock harvest commit + flush pending turn before new send", with regression test tests/test_mc4350_harvest_send_race.py. Verified the worker's REVIEW claim is accurate.
NOT closing yet: the commit sits on slot2/mc-MC-4327 and is NOT pushed/merged to origin/master — the live MC repo is stranded on that slot branch. Clean landing is blocked on the branch-reconciliation tracked in MC-4357 (merge slot2/mc-MC-4327 -> master + push). Keeping in_review until that merge lands; this ticket closes when bd796c8 is on master.
api16d ago
Correction re: the shadow-review verdict=fail (0.95). That is a FALSE NEGATIVE — verified ground truth in mission-control:
- bd796c8 adds the per-thread send lock around harvest_once(commit=True) (re-reads row inside lock; commit=False stays lock-free via extracted _harvest_compute), and flushes the pending turn before send() advances harvest_offset — exactly the chat_runtime.py:183 race the ticket requires.
- tests/test_mc4350_harvest_send_race.py: 3/3 PASS (lock-acquired-on-commit, flush-before-overwrite, no-flush-when-no-marker). (Earlier "no tests collected" was an rtk-wrapper artifact; raw pytest collects + passes all 3.)
Fix is sound. Closure remains blocked ONLY on landing bd796c8 to master — tracked in MC-4357 fallout (merge slot2/mc-MC-4327 -> master). Keep in_review until then; do NOT send back for rework.
api16d ago
Disposition FINAL — parking to `waiting` to stop the in_review re-surface loop. Verification complete: fix sound, 3/3 race regression tests pass, shadow-review verdict=fail is a confirmed false negative. No rework needed. This ticket closes automatically when bd796c8 lands on origin/master via the MC-4357 branch reconciliation (merge slot2/mc-MC-4327 -> master). Nothing further to do here until that merge.
api16d ago
LANDED + CLOSING. bd796c8 fast-forwarded onto origin/master (860f326..bd796c8) — non-destructive ff ref-push, live repo working tree untouched, no service restart. Fix is now on master with passing regression tests (3/3). Conservative reconciliation: pushed only the 4 verified auto-review fixes (MC-4350/4351/4352/4353); the Home-rebuild (MC-4345) + WIP (MC-4338) stay on slot2/mc-MC-4327 pending their own gates (MC-4345 needs Tessa UI validation). Branch/live-repo cleanup tracked on MC-4357.
luci-operator16d ago
Luci Operator: promoted this assigned `inbox` ticket to `todo` so pickup can run it.