From Sprint 0-1 reviews (widgets/sdk task review Minors + final review triage #7/#8), bundled as one hardening pass:
Widgets (packages/widgets):
UnlockToast removal uses reference equality (x !== u) and key ${achievementId}-${unlockedAt} — same-millisecond or reused-payload unlocks can collide/remove prematurely
BadgeCabinet keeps a stale list if a refetch-on-unlock fails (decide: keep-stale vs clear)
vi.useRealTimers() in the test isn't in try/finally — fake timers can leak if an assertion throws
SDK (packages/sdk):
- On mixed failures (5xx then network error), the thrown
PromoceanApiError carries the stale earlier 5xx status
- The exhausted-retries test asserts a message substring rather than
instanceof PromoceanApiError + .status
From Sprint 0-1 reviews (widgets/sdk task review Minors + final review triage #7/#8), bundled as one hardening pass:
Widgets (
packages/widgets):UnlockToastremoval uses reference equality (x !== u) and key${achievementId}-${unlockedAt}— same-millisecond or reused-payload unlocks can collide/remove prematurelyBadgeCabinetkeeps a stale list if a refetch-on-unlock fails (decide: keep-stale vs clear)vi.useRealTimers()in the test isn't intry/finally— fake timers can leak if an assertion throwsSDK (
packages/sdk):PromoceanApiErrorcarries the stale earlier 5xx statusinstanceof PromoceanApiError+.status