Public: anyone can read this; the crew can change it.
Migrated from github.com/Trevato/SO-ARM100
The app counts its own numbers: Pi round trip, camera fps in, viewers, frames dropped and bytes out, at /metrics.prom and a one-line log each minute #105
Parked 44d 15h ago
The relay now counts its own numbers, serves them at GET /metrics.prom, and logs a one-line summary to stdout every 60 seconds. The code is unchanged since the first push. Pull #100 was closed without merging, and this push is a retry of the preview deploy.
-
Reviews
No review yet.
-
Checks
stopped parked by the crew deploy 468faf4
-
History
- Retry the preview: #100's deploy failed on /status 503 while the Pi link was reconnecting, which also failed #99; no code change 468faf4
- Relay counts its own numbers: /metrics.prom and a one-line summary each minute (#88) 45debd2
- forge.json: the app and its checks get 6 cores and 6 GiB - browser tests died at the 2-core step default (9 of 23 deploys) 8190a91
- TOP: the joint sliders follow your finger and stay where you put them - no snapping back (#79) c89e816
- /follow: size and rate checks (#78) ff3968f
- forge.json: the overhead camera on the Pi (100.89.95.68:8081) is a declared egress destination 3311805
- SAFETY P0: pressing STOP never makes the arm move - commands sent while held are dropped, never buffered and replayed (#72) 87dd4e8
- The machine, not a magic box: a Machine panel shows the raw arm state and every command in and out, live (#71) 21032a6
- Fast on a phone over 4G: first view under 2 s, the camera adapts to the connection, nothing loads until it is needed (#69) 56e9837
- Leader teleop: with the leader connected in Chrome, moving it moves the real arm - live, during your turn (#65) 896e52f
- Mobile driving: pick a joint and drag one big slider (portrait), two thumb sticks (landscape); zero motion the instant a finger lifts (#60) 058825d
- Mobile queue and turns: Join in one tap, "you're next" alert, a ring countdown on your turn, a Ready check so idle phones don't hold the arm (#57) 16caaba
- The live arm never flaps to the simulation on one slow answer: keep the connection, retry, and say "reconnecting" (#59) 5ae001d
- Terminal door: tty gating test for mute, end-turn and chat, and tty writes reaching web viewers live (#47) 3dd7ea9
- Admin: the owner is the app's admin, can name moderators, and every setting lives on one admin page (#45) 5d4fef3
- Safety first: the server enforces joint limits, speed limits, an emergency stop and a dead-man hold - no client can move the arm outside them (#31) f5d990e
- TOP: the hosted app connects to the real arm and camera - it still serves the simulation with ARM_SERVER set and both addresses granted (#43) caa4fc0
- Moderation: pause, ban and word filter (#42) 649a7c3
- Mobile first: the arm is fantastic on a phone - watch, queue, drive, chat and moderate with one thumb (#39) 9e5e048
- TOP: friends and family can join in seconds - pick a username in the app (no forge account), then queue and drive (#38) 89eb0ed
The relay now counts its own numbers, serves them at GET /metrics.prom, and logs a one-line summary to stdout every 60 seconds. The code is unchanged since the first push. Pull #100 was closed without merging, and this push is a retry of the preview deploy.
Why the earlier check failed: the preview deploy failed, not the tests. /status answered 503 for 30 seconds while the preview's link to the Pi at 100.89.95.68:8101 was reconnecting. Pull #99 failed the same way at the same time, so I read it as an environment problem rather than something this change caused. I didn't touch that readiness behaviour, since it is out of scope here. If the preview still can't reach the Pi, the deploy will fail again.
What changed:
- Counters:
src/live-metrics.tskeeps the Pi round-trip p50/p95, camera frames in (total and per second), viewers per kind (follow,live,machine,camera),/followcommands received and dropped, and bytes sent to viewers. Hot paths only add to a number. - Endpoint and log:
/metrics.promis Prometheus text and needs no login. The JSON/metricsis untouched. The summary interval is the relay optionsummaryEveryMs, default 60 s. - Hooks:
ArmLinkhas a newonRttoption, andFeedOptionsgainsonFrameandonBytes.relay.tscounts a drop at each early return in the/followhandler. - Bytes sent: this covers camera streams and the replies the arm sends back on
/follow. The/liveand/machinepushes aren't counted.
Tests:
live-metrics.test.tscovers injected delays showing up in p95, the fps window aging out, and every Prometheus line parsing as name, labels, value.relay.test.tschecks/metrics.promover the real relay.- Locally the type check is clean and the full suite passes (400 tests, 0 failures).
🤖 Generated with Claude Code
The relay now counts its own numbers, serves them at
GET /metrics.prom, and logs a one-line summary to stdout every 60 seconds. The code is unchanged since the first push. Pull #100 was closed without merging, and this push is a retry of the preview deploy.Why the earlier check failed: the preview deploy failed, not the tests.
/statusanswered 503 for 30 seconds while the preview's link to the Pi at 100.89.95.68:8101 was reconnecting. Pull #99 failed the same way at the same time, so I read it as an environment problem rather than something this change caused. I didn't touch that readiness behaviour, since it is out of scope here. If the preview still can't reach the Pi, the deploy will fail again.What changed:
src/live-metrics.tskeeps the Pi round-trip p50/p95, camera frames in (total and per second), viewers per kind (follow,live,machine,camera),/followcommands received and dropped, and bytes sent to viewers. Hot paths only add to a number./metrics.promis Prometheus text and needs no login. The JSON/metricsis untouched. The summary interval is the relay optionsummaryEveryMs, default 60 s.ArmLinkhas a newonRttoption, andFeedOptionsgainsonFrameandonBytes.relay.tscounts a drop at each early return in the/followhandler./follow. The/liveand/machinepushes aren't counted.Tests:
live-metrics.test.tscovers injected delays showing up in p95, the fps window aging out, and every Prometheus line parsing as name, labels, value.relay.test.tschecks/metrics.promover the real relay.🤖 Generated with Claude Code
Closes #88