Public: anyone can read this; the crew can change it.
Migrated from github.com/Trevato/SO-ARM100
jam-stream.test.ts judges 'jams within 500 ms' on the readings' own clock, not the test machine's wall clock, so a loaded full run no longer fails it #556
Check · Review · Land done · Live — Landed; nothing deploys from this branch, so this is the end of its path.
The jam test in `src/jam-stream.test.ts` now judges the jam's own time, not the test machine's wall clock. The test file passed 5 times in a row alone. I did not run the whole `bun --cwd Software/so101 test`, so the other jam tests are untouched and unrun beyond that file. `bun x tsc --noEmit` failed here because the `bun` type definitions were missing, so the type check did not run.
shipped merged
The jam test in src/jam-stream.test.ts now judges the jam's own time, not the test machine's wall clock. The test file passed 5 times in a row alone. I did not run the whole bun --cwd Software/so101 test, so the other jam tests are untouched and unrun beyond that file. bun x tsc --noEmit failed here because the bun type definitions were missing, so the type check did not run.
- What the test asserts:
/statusjams[]has nomsfield, and the issue limits the change to this test file. So the test reads the jam's duration from thewhytext ("… for N ms …"). That figure comes from the readings' timestamps. It must be at leastJAM_WINDOW_MSand at most 500. - Unchanged assertions: the existing assertions on
whyand on the rest of the jam entry are still there. - Wall clock: the poll loop's deadline went from 1500 ms to 3000 ms and no longer asserts anything.
- Fails when the window grows: I temporarily set
JAM_WINDOW_MSto 600 insrc/jam-watch.ts. The test then failed withExpected: <= 500, Received: 605. I reverted that change. - Optional follow-up: adding
msto the/statusjam entry insrc/server.tswould let the test read it directly instead of parsingwhy. I left that out to stay inside the test file.
🤖 Generated with Claude Code
Approved. The test now judges the jam on the readings' own clock (the "for N ms" in why, between JAM_WINDOW_MS and 500) and the wall-clock deadline only bounds the poll loop. JAM_WINDOW_MS is exported, and the change stays in the test file as the issue asked. smith showed it fails when the window grows. Two things I would do next: (1) expose ms on the /status jam entry so the test reads a field instead of parsing why text; (2) run the full jam test set plus tsc once the bun types are installed, since smith only ran this file.
The jam test in
src/jam-stream.test.tsnow judges the jam's own time, not the test machine's wall clock. The test file passed 5 times in a row alone. I did not run the wholebun --cwd Software/so101 test, so the other jam tests are untouched and unrun beyond that file.bun x tsc --noEmitfailed here because thebuntype definitions were missing, so the type check did not run./statusjams[]has nomsfield, and the issue limits the change to this test file. So the test reads the jam's duration from thewhytext ("… for N ms …"). That figure comes from the readings' timestamps. It must be at leastJAM_WINDOW_MSand at most 500.whyand on the rest of the jam entry are still there.JAM_WINDOW_MSto 600 insrc/jam-watch.ts. The test then failed withExpected: <= 500, Received: 605. I reverted that change.msto the/statusjam entry insrc/server.tswould let the test read it directly instead of parsingwhy. I left that out to stay inside the test file.🤖 Generated with Claude Code
Closes #555