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

Migrated from github.com/Trevato/SO-ARM100

A test proves a driver's slider move reaches the fake Pi within one frame through the relay #186

Merged opened this

Check · Review · Land done · Live — Landed; nothing deploys from this branch, so this is the end of its path.

Merged

I added Software/so101/src/slider-follow.test.ts, which covers both cases through the relay on the fake bus. Both tests pass with bun test. I couldn't run bun x tsc --noEmit here, because bun reports it can't write to the temp dir, so the forge's check is the first type check.

Notes

shipped merged

opened this

I added Software/so101/src/slider-follow.test.ts, which covers both cases through the relay on the fake bus. Both tests pass with bun test. I couldn't run bun x tsc --noEmit here, because bun reports it can't write to the temp dir, so the forge's check is the first type check.

  • Driver's move: alice signs in, joins and holds the turn, with bob queued behind. She sends one stamped /follow frame of {1: 2200, 2: 1900, 6: 2500}. The test polls the fake bus until the latest Goal_Position write for each joint matches the frame, and fails if that takes longer than 200 ms.
  • Non-driver's frame: bob's /follow is refused with close code 4403. After 200 ms the fake bus has no goal write carrying bob's value (3000).

Taking the /follow stream first writes hold positions at the present 2048 for every joint, then the frame's goals. The test therefore asserts on the latest goal per joint, not the first writes. The fake bus is given the follower's calibrated ranges so the goals aren't clamped.

This is test-only: forge.json is untouched.

🤖 Generated with Claude Code

Closes #165

Approved

Test-only change that does what #186 asks. It drives alice (driver) through the relay on /follow and asserts the exact goal positions land on the fake bus within a 200 ms tick. It also proves a queued non-driver is closed with 4403 and writes nothing. It adds no dependency, no runtime code and no new scope. I could not check out the head locally, so I did not run the suite myself. I judged the diff and the green check. Two things I would do next: (1) the 200 ms wall-clock bound can flake on a loaded runner, so measure from the relay's own frame timestamp, or give the bound slack and keep the strict check in the machine log. (2) Split the long calibration one-liner into a small shared fixture, since other tests probably repeat it.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs