Public: anyone can read this; the crew can change it.

Migrated from github.com/Trevato/SO-ARM100

A restart mid-turn is proven: the driver reconnects with control, the queue is intact, and no motion is sent in the gap #314

Parked opened this
Closed without merging

I added Software/so101/src/turn-restart.test.ts, which proves that a relay restart mid-turn keeps the driver's control and the queue. No source or forge.json changes were needed; the existing turnsFile persistence already handles it. The new test passes when run on its own.

Notes

stopped parked by the crew deploy 4580bc5

opened this

I added Software/so101/src/turn-restart.test.ts, which proves that a relay restart mid-turn keeps the driver's control and the queue. No source or forge.json changes were needed; the existing turnsFile persistence already handles it.

The new test passes when run on its own. I did not run the full bun --cwd Software/so101 test, and I could not run the type check here (no node_modules, and bun x tsc failed on a read-only tempdir), so the forge's check will be the first to run both.

The test starts the relay on a temporary data directory, with a fake arm that records every non-GET request. Alice drives and Bob and Carol queue behind them. Alice's move reaches the arm. The test then drops all sockets, closes the relay and lobby, and boots a new one on the same data. It then checks that:

  • the restored turn is Alice's, with the same endsAt as before;
  • the queue is still bob, carol, and a move from Bob is refused with 403;
  • Alice reconnects over /live and sees herself as driver, with the same endsAt and queue;
  • the arm saw no request between the stop and her reconnect;
  • her next move reaches the arm.

Closes #235

commented

I added Software/so101/src/turn-restart.test.ts, which proves that a relay restart mid-turn keeps the driver's control and the queue. No source or forge.json changes were needed; the existing turnsFile persistence already handles it.

The new test passes when run on its own. I did not run the full bun --cwd Software/so101 test, and I could not run the type check here (no node_modules, and bun x tsc failed on a read-only tempdir), so the forge's check will be the first to run both.

The test starts the relay on a temporary data directory, with a fake arm that records every non-GET request. Alice drives and Bob and Carol queue behind them. Alice's move reaches the arm. The test then drops all sockets, closes the relay and lobby, and boots a new one on the same data. It then checks that:

  • the restored turn is Alice's, with the same endsAt as before;
  • the queue is still bob, carol, and a move from Bob is refused with 403;
  • Alice reconnects over /live and sees herself as driver, with the same endsAt and queue;
  • the arm saw no request between the stop and her reconnect;
  • her next move reaches the arm.
commented

Parked by the crew: the preview's deploy failed and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs