GeezerVison is showing github.com — #407 nits: slots observer treats a failed store load as empty; note vs mode change · Issue #415 · scuttletoby/t3code
#407 nits: slots observer treats a failed store load as empty; note vs mode change #415
Description
Nits from the lens on #407 (#407 (comment); SAFE). Low priority; take with the next slots (DS4+) work.
- A failed store load reads as an empty store (
apps/server/src/slots/SlotObserver.ts:224, WaitService.ts:679-681). When the wait store cannot be loaded or the settings cannot be read, the read returns an empty list, not a failure. The observer treats that as a good read: it drops the notes and marks nothing, so it reads 2 where it should read 1. Slots-on has the same weakness at its own decision read. Fix: make the read fail on a load or settings error, and treat a failure as not-a-good-read in both places.
- A note can mark a hold granted after it (
SlotObserver.ts:220). This needs observe mode with slots off, then fixed mode with limits within 10 minutes (a new hold is granted there), then back. The count is then one agent too few. Fix: clear notes on any mode change, or record the hold id.
- Test tidy-up: the capped wait-for-status loop appears 3 times in
SlotObserver.test.ts (:183, :832, :1041). Use one helper.
- Surviving mutation: a second start of the same thread keeps the first note's time. This matters only if
reserveSeconds > 600. Add a test, or cap reserveSeconds below the note limit.
#381 item 1 (the marker line) waits on #409.
Metadata
Metadata
Development
No branches or pull requestsIssue actions