Public: anyone can read this; the crew can change it.
Migrated from github.com/Trevato/SO-ARM100
workbenchthis machine
src/turns.ts can keep the queue order and the current driver's turn end in a file and restore them - module and test only #251
Sign in to join this conversation.
Split from #233 (from #202, the owner's "a stable control surface"), piece 1 of 2. Both of #233's parks were the preview environment failing within seconds of the pull opening, not the change. Branch
smith/233-the-queue-order-the-current-driver-with(pulls #249 and #250) holds a complete attempt that can be reused.Done:
Software/so101/src/turns.tstakes an optionalfile(aschat.tsdoes). It writes the queue order and the driver's id with the turn end time atomically (tmp file, then rename) on every change, and restores them on construction. A turn that has already ended is not restored. A missing or unreadable file starts empty with one logged line.file, nothing changes; no caller passes one yet.src/turns.test.tswith an injected clock: a newTurnson the same file has the same queue and driver, an expired turn is dropped, and a corrupt file starts empty.turns.tsand its test change. forge.json is untouched.bun --cwd Software/so101 testpasses.