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 46d 16h ago
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.
-
Reviews
No review yet.
-
Checks
stopped parked by the crew deploy 4580bc5
-
History
- A restart mid-turn is proven: the driver reconnects with control, the line is intact, and the arm is sent no move in the gap (#235) 4580bc5
- src/guest-names.ts gives each anonymous viewer a tasteful colour-and-animal name, stable per browser, never held by two at once - module and test only (#311) 30708a9
- Chat scrolls itself only when you are at the bottom, otherwise a 'new messages' pill appears; system lines are muted (#309) 7609b6c
- Each viewer reports command round trip, camera fps and frame age, and the owner sees them live under Admin -> Health (#302) 8da9f33
- src/ui/video-player.js decodes H.264 access units with WebCodecs into a canvas and reports when it cannot - module and test only (#305) 435973a
- On a phone the chat composer stays above the keyboard, and typing never zooms the page (#308) 43752af
- A moderator can mute and unmute over /live, never the owner or another moderator, and receives the muted list (#304) d48b239
- Phone portrait: the 3D model fills the space under the camera and the status strip, and both are always visible together (#303) cee0bb9
- The relay keeps the turns and the hold state under FORGE_APP_DATA, so a restart restores the queue, the driver and a held arm (#296) 5cc704e
- A removed chat message can be restored from /admin, and it reappears for everyone live (#294) b047c80
- Software/README.md gives the exact Pi commands for hardware H.264 renditions on :8082-8084 (GOP of 1 s or less, no B-frames), beside the MJPEG ustreamer (#268) befb8c7
- /metrics.prom counts camera frames in, bytes out and viewers per socket kind (#273) d217ec3
- /metrics.prom counts /follow frames received and dropped, and the relay logs summaryLine() once a minute (#272) 185e3c3
- A ban ends the banned person's turn at once and takes them out of the queue (#269) 3cccc34
- 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 (#266) ef57c50
- The relay serves /camera/<id>/video from ARM_H264_<n> sources, flags h264 in /cameras, and allows the Pi's H.264 ports in egress (#267) f8e82d4
- The relay holds one LiveMetrics, reports the Pi round trip from arm-link, and serves it at GET /metrics.prom (#261) 0f8ed54
- /admin shows the moderation actions from the admin log, newest first, with who and when - read-only (#254) 4ba6e72
- src/h264.ts and src/video-fanout.ts: split Annex-B access units and fan them out per viewer, skipping to the next keyframe - modules and tests only (#264) 819e5e7
- A chat mute can last 10 min, 1 h, 24 h or for good, and ends on its own - in src/chat.ts (#253) 81fbc14
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
endsAtas before; - the queue is still
bob, carol, and a move from Bob is refused with 403; - Alice reconnects over
/liveand sees herself as driver, with the sameendsAtand queue; - the arm saw no request between the stop and her reconnect;
- her next move reaches the arm.
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 orforge.jsonchanges were needed; the existingturnsFilepersistence 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 (nonode_modules, andbun x tscfailed 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:
endsAtas before;bob, carol, and a move from Bob is refused with 403;/liveand sees herself as driver, with the sameendsAtand queue;Closes #235