Fix re-summarize running one voice behind: commit the job row before poking the inline queue.

The reprocess endpoint poked transport_enqueue while its request session
was still uncommitted; the inline worker woke instantly, read the job row
with its own session, and summarized with the PREVIOUS click's tone
(TRACE: click Funny -> worker read 'dry, witty'; click Neutral -> ran
'funny'). The UI disabled the voice chips for the whole wrong-voice run,
which read as 'spinner does nothing until I leave and come back'.

Rows are the real queue: commit before the poke. Regression test pins
worker tone to the requested tone and Neutral clearing a prior voice;
verified red without the fix, green with it.
This commit is contained in:
avi 2026-09-18 17:03:37 -05:00
commit 11bb13cb3d
3 changed files with 54 additions and 0 deletions

View file

@ -94,10 +94,12 @@ class FakeLlm:
def __init__(self, fail=None):
self.fail = fail
self.seen = []
self.seen_tones = []
async def summarize(self, transcript, *, title=None, tone=None,
on_progress=None):
self.seen.append(transcript)
self.seen_tones.append(tone)
if self.fail is not None:
raise self.fail
return SummaryResult(