Public: anyone can read this; the crew can change it.
Migrated from github.com/Trevato/SO-ARM100
The workshop: one Pi, several stations (the arm and the grow box), each with cameras and controls; works with the arm unplugged #614
`serve` now starts without the arm. A missing or unopenable port means "arm: not connected", and the port is retried every 5 s, so a hot-plugged arm connects without a restart. The full suite passes (1297 pass, 0 fail, 3 skip) and `tsc` reports nothing for the files I changed. Under Node (as on the Pi) I could only check by reading the code. This sandbox's Node 20 can't load the `.ts` files, so th…
stopped closed without shipping deploy 49d9d46
so101 serve now starts with no arm, and a missing or unopenable port means "arm: not connected" instead of an exit. I have not tried it on the Pi, and nothing here proves the Pi's own steps (the service restart, then the app's sync deploying it). My new tests and the existing server, stations, fake-serve and pi-deploy tests pass. tsc reports no new errors; it still reports the existing erasableSyntaxOnly and src/ui/ ones.
- Serving with no arm:
/statusanswers 200 witharm: "not connected", and/versionand the camera routes still answer. Routes that need the arm return 503 "arm not connected". When the arm is present,/statusnow also carriesarm: "connected". - Hot-plug: the port is retried every 5 s, and the servo limits are read on the first
/statusafter the arm appears. The new code issrc/arm-port.ts, wired intoserveinsrc/cli.tsandsrc/server.ts. - Unplugging while running: the retry only covers an arm that was absent at start. If it is unplugged mid-run, calls fail with serial errors and the server does not reconnect.
- Camera routes: the arm server has no
/camerasroute, so the test checks/camera-profile/1instead. - Test runner: the test runs
mainunder Bun, not throughbin/so101under Node 24, because the Node here can't load.ts. The Pi's Node 24 path is untested here. - Merge: the earlier workshop work on this branch overlapped with what #592 already put on main (
stations.ts,workshop-page.tsand others). I merged main and took main's version as is, so the branch now differs from main only by this fix. - Dead code:
src/arm-wait.tsis no longer used byserve; it is still imported bystations.test.ts.
serve now starts without the arm. A missing or unopenable port means "arm: not connected", and the port is retried every 5 s, so a hot-plugged arm connects without a restart. The full suite passes (1297 pass, 0 fail, 3 skip) and tsc reports nothing for the files I changed. Under Node (as on the Pi) I could only check by reading the code. This sandbox's Node 20 can't load the .ts files, so the Bun test is the evidence. The branch is pushed.
- Merge: main already carries the workshop from #592, which overlaps this branch's older workshop work in eight files. I took main's tree whole and dropped this branch's own
d5e988fcommit (camera reason, button contrast, reconnect grace). Its cherry-pick conflicted inworkshop-page.tsand I didn't redo it. Say if you want those three tweaks back on top of main's version. - Arm-less serving:
arm-port.tsstands in for the bus while no arm is plugged in./statusanswers 200 witharm: "not connected", and a connected arm now reportsarm: "connected". The camera routes (/camera-profile,/camera-still),/version,/limitsand the grow routes keep answering. Bus routes that need the arm return 503 "arm not connected". cli.tsserve: it no longer blocks waiting for an adapter or exits whenSO101_PORTis missing. The torque release on stop only runs if the arm was connected.- Test:
serve-no-arm.test.tsstartsservewithSO101_PORTat a missing path. It checks/status(200,arm: "not connected"),/version,/limitsand/camera-profile/1. It also checks thatretryPlugplugs the bus in once the port opens. /camerasin the issue: the arm server has no/camerasroute. Its camera routes are/camera-profileand/camera-still, so the test uses/camera-profile/1. If the app builds its camera list from somewhere else, that part isn't covered by this change.- Unplug mid-run: if the arm is unplugged while the server runs, the existing serial error path applies. Only a missing port at start is retried.
- Not done: I didn't deploy to the Pi or confirm that
so101.servicestays up on real hardware. Your step 3 (the app's sync deploying it) is still to do after this lands.
Declined: already done on this branch, nothing new to add. The arm-less serve fix is pushed and up to date with main, in commits dac0b3a and 49d9d46. The issue has no new comments since my last run, so there is nothing further to change. Run log: https://forge.open-platform.sh/trevato/arm/runs/01m5xg8bw6avv3tp295vp53v5r
servenow starts without the arm. A missing or unopenable port means "arm: not connected", and the port is retried every 5 s, so a hot-plugged arm connects without a restart. The full suite passes (1297 pass, 0 fail, 3 skip) andtscreports nothing for the files I changed. Under Node (as on the Pi) I could only check by reading the code. This sandbox's Node 20 can't load the.tsfiles, so the Bun test is the evidence. The branch is pushed.d5e988fcommit (camera reason, button contrast, reconnect grace). Its cherry-pick conflicted inworkshop-page.tsand I didn't redo it. Say if you want those three tweaks back on top of main's version.arm-port.tsstands in for the bus while no arm is plugged in./statusanswers 200 witharm: "not connected", and a connected arm now reportsarm: "connected". The camera routes (/camera-profile,/camera-still),/version,/limitsand the grow routes keep answering. Bus routes that need the arm return 503 "arm not connected".cli.tsserve: it no longer blocks waiting for an adapter or exits whenSO101_PORTis missing. The torque release on stop only runs if the arm was connected.serve-no-arm.test.tsstartsservewithSO101_PORTat a missing path. It checks/status(200,arm: "not connected"),/version,/limitsand/camera-profile/1. It also checks thatretryPlugplugs the bus in once the port opens./camerasin the issue: the arm server has no/camerasroute. Its camera routes are/camera-profileand/camera-still, so the test uses/camera-profile/1. If the app builds its camera list from somewhere else, that part isn't covered by this change.so101.servicestays up on real hardware. Your step 3 (the app's sync deploying it) is still to do after this lands.Continues #614