syncTrackedProgressMessage() logged "no longer owns the active paired turn
attempt" and returned, but left the 5s progress ticker running. Losing the
attempt is permanent — ownership only flips back to 'active' when a new
attempt claims the turn under its own runId — so a superseded run kept waking
every 5s for the entire life of the following turn (165 wakeups observed in
one room) while editing nothing. The channel's progress message stayed frozen
for the whole next turn, so a room that was actively working looked hung.
Clear the ticker on ownership loss, matching the repeated edit-failure path.
The regression test asserts on the ownership probe rather than editMessage:
a leaked ticker and a stopped one both produce zero edits, so counting edits
cannot distinguish them.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
turnController.finish() is the only path that clears the 5s progress ticker,
but it lives inside the caller's try block in message-runtime-turns.ts. When
runAgent throws / is aborted / is killed (e.g. a user "중단"), control jumps to
finally and finish() is skipped, leaving the ticker editing the Discord message
forever — an orphaned "stuck at 0s" zombie progress message with no backing
task/attempt.
Add an idempotent MessageTurnController.dispose() that tears down the progress
ticker + idle timer, and always call it from the caller's finally so timers are
cleared on every exit path. Adds a regression test.