Now I see all three bugs clearly: 1. **Silent boo...
# brain-legoat
b
Now I see all three bugs clearly: 1. Silent bookmark advance:
state.notes[note.id] = stub.updated_at
is set before the commit/sync succeeds, and the state is written unconditionally. So even when sync fails, the note is marked done forever → never retried. That's exactly what happened. 2. Case-collision slugs:
note.id.slice(-6)
keeps mixed case (
VgdEZk
), so on this case-insensitive FS two ids differing only by case collide and wedge sync. 3. Silent failure: commit/sync failure only logs, doesn't exit non-zero, so launchd sees success. Let me fix all three: only mark notes ingested after commit/sync succeeds, lowercase the id suffix, and exit non-zero on failure. I'll back up the file first.