style(13-03): apply Prettier formatting across repo

Mechanical reformat — no logic changes. 398 files changed, 19125
insertions(+), 16457 deletions(-). Prettier 3.8.4 with .prettierrc
(singleQuote:true, semi:true, tabWidth:2, trailingComma:all,
printWidth:100). Isolated per D-13-08 for reviewability.
This commit is contained in:
Lucas Berger
2026-06-11 20:35:18 -04:00
parent 4bc0445173
commit 982438dc10
398 changed files with 19050 additions and 16382 deletions
@@ -12,20 +12,20 @@ requirements: [NOTIF-02]
must_haves:
truths:
- "A burst of N coalesceListPush calls for the same (listId, actorId) within the window fires exactly ONE dispatch with count=N (D-01)"
- 'A burst of N coalesceListPush calls for the same (listId, actorId) within the window fires exactly ONE dispatch with count=N (D-01)'
- "The coalesced dispatch passes the actor's userId as excludeUserId so the actor is never notified of their own change (D-03)"
- "The coalesced notification copy is generic: title 'ActorName updated ListName', body 'N change(s)' — no item text (D-02)"
- "A new burst after the window fired starts a fresh count (timer/map entry cleared)"
- 'A new burst after the window fired starts a fresh count (timer/map entry cleared)'
artifacts:
- path: "apps/api/src/lib/pushCoalescer.ts"
provides: "coalesceListPush(listId, actorId, actorName, listName, dispatch, windowMs) — per-(list,actor) debounce"
exports: ["coalesceListPush"]
- path: 'apps/api/src/lib/pushCoalescer.ts'
provides: 'coalesceListPush(listId, actorId, actorName, listName, dispatch, windowMs) — per-(list,actor) debounce'
exports: ['coalesceListPush']
min_lines: 25
key_links:
- from: "apps/api/src/lib/pushCoalescer.ts"
to: "dispatch callback"
via: "setTimeout fires once per window with excludeUserId=actorId"
pattern: "setTimeout"
- from: 'apps/api/src/lib/pushCoalescer.ts'
to: 'dispatch callback'
via: 'setTimeout fires once per window with excludeUserId=actorId'
pattern: 'setTimeout'
---
<objective>
@@ -75,19 +75,21 @@ Output: `apps/api/src/lib/pushCoalescer.ts` with `coalesceListPush`, turning the
</feature>
<threat_model>
## Trust Boundaries
| Boundary | Description |
|----------|-------------|
| Boundary | Description |
| ---------- | ------------------------------------------------------------------------------- |
| in-process | coalescer holds no external input; actorName/listName come from trusted DB rows |
## STRIDE Threat Register
| Threat ID | Category | Component | Disposition | Mitigation Plan |
|-----------|----------|-----------|-------------|-----------------|
| T-05-06 | Information Disclosure | list-change copy | mitigate | D-02 generic copy — no item text in payload; only actor name + count + list name |
| T-05-07 | Spoofing | actor self-notification | mitigate | excludeUserId=actorId threaded to the fan-out (D-03); caller filters userId != actorId |
| T-05-08 | Denial of Service | unbounded pending map | accept | Two-person household, per-(list,actor) keys bounded; entries self-delete on fire |
| Threat ID | Category | Component | Disposition | Mitigation Plan |
| --------- | ---------------------- | ----------------------- | ----------- | -------------------------------------------------------------------------------------- |
| T-05-06 | Information Disclosure | list-change copy | mitigate | D-02 generic copy — no item text in payload; only actor name + count + list name |
| T-05-07 | Spoofing | actor self-notification | mitigate | excludeUserId=actorId threaded to the fan-out (D-03); caller filters userId != actorId |
| T-05-08 | Denial of Service | unbounded pending map | accept | Two-person household, per-(list,actor) keys bounded; entries self-delete on fire |
</threat_model>
<verification>
@@ -96,10 +98,11 @@ Output: `apps/api/src/lib/pushCoalescer.ts` with `coalesceListPush`, turning the
</verification>
<success_criteria>
- Failing test committed (RED).
- coalesceListPush implemented; test passes (GREEN).
- Burst→single, plural rules, window reset, per-actor isolation, self-suppression all verified.
</success_criteria>
</success_criteria>
<output>
Create `.planning/phases/05-web-push-notifications/05-03-SUMMARY.md` with RED/GREEN commits.