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:
@@ -5,7 +5,14 @@ subsystem: api/event-change-dispatcher
|
||||
tags: [web-push, notif-03, event-change, tdd, red-green, sync, diff]
|
||||
dependency_graph:
|
||||
requires: [05-02, 05-04, 05-06]
|
||||
provides: [dispatchEventChange, isMeaningfulChange, EventChange type, syncCalendar onChanges callback, calendar_events.title population]
|
||||
provides:
|
||||
[
|
||||
dispatchEventChange,
|
||||
isMeaningfulChange,
|
||||
EventChange type,
|
||||
syncCalendar onChanges callback,
|
||||
calendar_events.title population,
|
||||
]
|
||||
affects:
|
||||
- apps/api/src/lib/eventChangeDispatcher.ts
|
||||
- apps/api/src/broker/sync.ts
|
||||
@@ -27,14 +34,14 @@ key_files:
|
||||
- apps/api/src/broker/poller.ts
|
||||
- apps/api/src/broker/outboxWorker.ts
|
||||
decisions:
|
||||
- "D-03 actor exclusion: ne() at DB level + filter() in application code (defence-in-depth; mock-based tests require app-level filter since mock ignores WHERE predicate)"
|
||||
- 'D-03 actor exclusion: ne() at DB level + filter() in application code (defence-in-depth; mock-based tests require app-level filter since mock ignores WHERE predicate)'
|
||||
- "onChanges: optional parameter on syncCalendar; old-row SELECT only runs when onChanges is provided (zero overhead for callers that don't need change detection)"
|
||||
- "Actor name in notification copy: deferred to future D-02 enhancement; MVP uses generic 'New calendar event' / 'Calendar event updated' / 'Calendar event removed' with event title in body"
|
||||
- "Delete detection: pre-prune SELECT fetches uid+title of rows about to be pruned; runs only when onChanges is provided and seenUids is non-empty"
|
||||
- "Location comparison: old rawVevent re-parsed with ical.js per event; malformed old VEVENT skips location comparison gracefully"
|
||||
- 'Delete detection: pre-prune SELECT fetches uid+title of rows about to be pruned; runs only when onChanges is provided and seenUids is non-empty'
|
||||
- 'Location comparison: old rawVevent re-parsed with ical.js per event; malformed old VEVENT skips location comparison gracefully'
|
||||
metrics:
|
||||
duration: 8
|
||||
completed_date: "2026-06-10"
|
||||
completed_date: '2026-06-10'
|
||||
tasks_completed: 1
|
||||
files_changed: 4
|
||||
---
|
||||
@@ -84,6 +91,7 @@ The RED scaffold (`tests/lib/eventChangeDispatcher.test.ts`) was already committ
|
||||
- Actor = `userId` (the member who wrote via the outbox — D-03)
|
||||
|
||||
**TDD Gate Compliance:**
|
||||
|
||||
- RED: `test(05-01): add Wave-0 RED scaffolds + VAPID fixture + setup truncation` — `ef558b6` (Plan 05-01)
|
||||
- GREEN: `feat(05-07): implement eventChangeDispatcher + syncCalendar diff/title/onChanges` — `30e9de1`
|
||||
|
||||
@@ -101,6 +109,7 @@ pnpm --filter @familysync/api typecheck → passed (no errors)
|
||||
```
|
||||
|
||||
All 4 `eventChangeDispatcher` tests GREEN:
|
||||
|
||||
- dispatches for a new event (operation=create)
|
||||
- dispatches for an event with a title change
|
||||
- does NOT dispatch for a description-only edit (D-04)
|
||||
@@ -129,10 +138,10 @@ None. The `calendar_events.title` column is now populated on every sync pass. Th
|
||||
|
||||
No new threat surface introduced beyond what is in the plan's threat model. All three mitigations applied:
|
||||
|
||||
| Threat | Mitigation |
|
||||
|--------|-----------|
|
||||
| T-05-20: actor notified of own change | `ne()` + `filter()` dual-layer actor exclusion |
|
||||
| T-05-21: description-edit spam | `isMeaningfulChange()` early return for non-meaningful updates |
|
||||
| Threat | Mitigation |
|
||||
| ------------------------------------------- | ---------------------------------------------------------------------------------------- |
|
||||
| T-05-20: actor notified of own change | `ne()` + `filter()` dual-layer actor exclusion |
|
||||
| T-05-21: description-edit spam | `isMeaningfulChange()` early return for non-meaningful updates |
|
||||
| T-05-22: notification code calling Fastmail | `eventChangeDispatcher.ts` reads only `push_subscriptions` from MariaDB; no tsdav import |
|
||||
|
||||
## Self-Check
|
||||
|
||||
Reference in New Issue
Block a user