carlos / platform Public

demo-serving-off-dispatch

Product fix (8a3d302 approved, #897): an operator turning demo serving off while the console's demo worker stream is dispatching a queued job used to close the box's stream (withDemoLocked returned demo.ErrTrafficUnavailable and the dispatch loop treated it as fatal). The box learned serving was off only after reconnecting. TestDemoServingStreamConsole saw that as EOF on CI.

Now the loop skips the job, as it skips a fenced one. "off" arrives on the same stream through setDemoServing's wake, and the job stays queued exactly as one queued with serving already off.

Witness: TestDemoServingOffDuringDispatchKeepsTheStream turns serving off inside the dispatch window through a test-only seam. It failed with EOF every time before the fix. It also checks that the skipped job ends identically to the serving-already-off control: queued with no outbox row, failed at its deadline, active slot released, and the same "failed" status for the requester. Astra approved in one round.

Commits 1
Discussions 1 0 open
Tasks 0/0 done

Discussions 0 open

  • No discussions on this branch yet.

Tasks

  • No tasks yet.

Activity