Tree of the day now records in one save #6
Loading…
Reference in a new issue
No description provided.
Delete branch "osf/211-answering-the-tree-of-the-day-performs"
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?
Before, answering the tree of the day made three separate storage writes — points, completion mark and result — and a throw could escape the click handler. If the completion mark or result write failed, the day kept its points while the mark was lost, so the puzzle could be answered again for extra points. Now the daily answer persists all three in a single write, and a storage failure is swallowed inside the stats store: the puzzle still completes, no error reaches the UI, and the day reads as not completed. Practice and the stored data shape are unchanged.
Checks: 1 thing to look at
.forgejo/workflows,.gitea/workflowsor.github/workflows); what only CI tests went unverifiedTry it
git checkout osf/211-answering-the-tree-of-the-day-performsnpm test— the new failing-storage cases assert the atomic write and the silent failure.npx playwright test— the failing-storage case shows the completion screen still appears and a fresh load reads the day as not completed.src/lib/stats.tsfirst, thensrc/lib/session.ts, to follow the atomic daily write and the session path.Code review: No notes left; 4 fixed
Fixed before the commit
src/lib/stats.ts:149)src/lib/stats.test.ts)src/lib/session.test.ts)e2e/smoke.spec.ts:509)Tests: 85 passed in 2 lanes
All 3 scenarios of
answering-the-tree-of-the-day-performs-t-s1b68whave a tagged test.The test lint found, in the run's tests on the last check:
Recorded, not decided
src/lib/stats.test.ts:310B3 inskips the practice write when the read fails, leaving the existing blob untouched: bare toThrow(): require toThrow(TypeName) or toThrow(/message/)src/lib/stats.test.ts:311B3 inskips the practice write when the read fails, leaving the existing blob untouched: bare toThrow(): require toThrow(TypeName) or toThrow(/message/)src/lib/stats.test.ts:320B3 inskips the practice write when the read fails, leaving the existing blob untouched: bare toThrow(): require toThrow(TypeName) or toThrow(/message/)Braid run 211: 25 m on vLLM · inkling-2-mini
answering-the-tree-of-the-day-performs-t-s1b68w(29 steps)Opened by Braid from braid-testing/flash-leaf#4.