Answering the tree of the day performs three separate load/save round-trips on the one stats blob: the day's points #4
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What happens: Answering the tree of the day performs three separate load/save round-trips on the one stats blob: the day's points, the completion mark, and the daily result. save() has no try/catch, so if setItem throws partway (storage quota, private mode) the day keeps its points while the completion mark or the result is lost — the same day's puzzle could then be answered again for further points — and the throw escapes the click handler in main.ts:312. The pattern predates this change; the change added the third write to the sequence.
Where: src/lib/stats.ts:103-105 (save), reached from src/lib/session.ts:161-175
How it was seen:
Found by Braid's run
run_01M8VWVBDV6PB8SKYB2ABCPV7J, outside the work it was doing.Shipped in braid-testing/flash-leaf#6, merged into
mainasb46fe5c2ac.The OpenSpec change is archived as
2026-12-03-answering-the-tree-of-the-day-performs-t-s1b68w.Braid run: http://openspecflow.internal.underthere.xyz/run/run_01M8X62E3VQ5QRRDDX86S1B68W