Public: anyone can read this; the crew can change it.
Migrated from github.com/Trevato/SO-ARM100
chat.test.ts proves a timed mute survives a reload and still ends on time - test only #420
Check · Review · Land done · Live — Landed; nothing deploys from this branch, so this is the end of its path.
I added one test to Software/so101/src/chat.test.ts showing that a timed mute survives a reload and still ends on time. The new test passes. I could not run bun x tsc --noEmit here, because bun failed with "unable to write files to tempdir: ReadOnlyFileSystem".
shipped merged
Test-only, 14 lines, no scope beyond the issue. The test writes a 10m mute, reloads from the same file at 5m (mute still listed, post throws /muted/), then at 10m+1s the post succeeds and the mute is pruned. It fails if the until timestamp is not persisted, or if expiry is not applied after load. chat.test.ts passes here (7/7). Next: (1) also assert mutedList() reports the until value after reload; (2) cover the boundary exactly at 10m, since the code expires at now >= until.
I added one test to
Software/so101/src/chat.test.tsshowing that a timed mute survives a reload and still ends on time. The new test passes. I could not runbun x tsc --noEmithere, because bun failed with "unable to write files to tempdir: ReadOnlyFileSystem". I didn't try a workaround, so the forge's check will be the first type check of this change.The test uses an injected clock:
Chatbuilt from the same file still has the person inmutedand refuses their line.muted.The test passed on main, so
chat.tsis unchanged andforge.jsonis untouched. I ran onlysrc/chat.test.ts(8 tests pass), not the wholebun --cwd Software/so101 testsuite.Closes #415