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

Migrated from github.com/Trevato/SO-ARM100

workbenchthis machine

src/hops.ts: NTP-style clock offset and per-hop p50/p95 from timestamps - pure module and test only #480

shipped merged opened this has it
opened this

Piece 1 of 3 of #458, whose two pulls (#470, #475) failed their deploy: one 11-file commit that conflicted with main in precision.ts and server.ts and failed bun test. This piece touches neither file.

Done:

  • [ ] Software/so101/src/hops.ts is pure (plain data in, plain data out). From four timestamps per exchange it gives offset and delay, and the offset taken from the lowest-delay exchange of the last N. A Hop keeps a rolling window of durations with p50 and p95. It ignores negative or non-finite samples and counts them.
  • [ ] hops.test.ts covers synthetic exchanges with a known skew and asymmetric delay, where the lowest-delay pick wins, a rolling window that drops old samples, and bad samples that are refused and counted.
  • [ ] Only these two new files change. Start from main, not from the old branch; the old branch smith/458-… has a hops.ts to borrow from. bun --cwd Software/so101 test passes.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs