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:
@@ -20,23 +20,23 @@ user_setup: []
|
||||
|
||||
must_haves:
|
||||
truths:
|
||||
- "calendar_outbox table exists in the live MariaDB schema after drizzle-kit push"
|
||||
- "calendar_events has an object_url column populated by sync.ts from obj.url"
|
||||
- "vite-plugin-pwa is installed and importable in apps/pwa"
|
||||
- "All Wave 0 RED test files exist and fail (no implementation yet)"
|
||||
- 'calendar_outbox table exists in the live MariaDB schema after drizzle-kit push'
|
||||
- 'calendar_events has an object_url column populated by sync.ts from obj.url'
|
||||
- 'vite-plugin-pwa is installed and importable in apps/pwa'
|
||||
- 'All Wave 0 RED test files exist and fail (no implementation yet)'
|
||||
artifacts:
|
||||
- path: "apps/api/src/db/schema.ts"
|
||||
provides: "calendarOutbox table + calendarEvents.objectUrl column"
|
||||
contains: "calendarOutbox"
|
||||
- path: "apps/api/tests/broker/vevent.test.ts"
|
||||
provides: "RED stubs for VEVENT builder (CAL-04/CAL-07)"
|
||||
- path: "apps/api/tests/broker/outboxWorker.test.ts"
|
||||
provides: "RED stubs for outbox state machine (D-07/D-08/D-04)"
|
||||
- path: 'apps/api/src/db/schema.ts'
|
||||
provides: 'calendarOutbox table + calendarEvents.objectUrl column'
|
||||
contains: 'calendarOutbox'
|
||||
- path: 'apps/api/tests/broker/vevent.test.ts'
|
||||
provides: 'RED stubs for VEVENT builder (CAL-04/CAL-07)'
|
||||
- path: 'apps/api/tests/broker/outboxWorker.test.ts'
|
||||
provides: 'RED stubs for outbox state machine (D-07/D-08/D-04)'
|
||||
key_links:
|
||||
- from: "apps/api/src/broker/sync.ts"
|
||||
to: "calendarEvents.objectUrl"
|
||||
via: "upsert sets objectUrl from obj.url"
|
||||
pattern: "objectUrl"
|
||||
- from: 'apps/api/src/broker/sync.ts'
|
||||
to: 'calendarEvents.objectUrl'
|
||||
via: 'upsert sets objectUrl from obj.url'
|
||||
pattern: 'objectUrl'
|
||||
---
|
||||
|
||||
<objective>
|
||||
@@ -73,6 +73,7 @@ five RED test files.
|
||||
|
||||
<artifacts_this_phase_produces>
|
||||
New symbols introduced across Phase 3 (excluded from drift verification):
|
||||
|
||||
- DB: `calendarOutbox` table (`calendar_outbox`), `calendarEvents.objectUrl` column (`object_url`)
|
||||
- Backend files: `apps/api/src/broker/vevent.ts` (`buildVeventString`, `NewEventParams`), `apps/api/src/broker/write.ts` (`createCalendarEvent`, `updateCalendarEvent`, `deleteCalendarEvent`), `apps/api/src/broker/outboxWorker.ts` (`runOutboxDrain`, `startOutboxWorker`, `RRULE_PRESETS`)
|
||||
- Backend routes: `POST /api/events/create`, `PATCH /api/events/:uid/edit`, `DELETE /api/events/:uid`, `GET /api/events/sync-status`, `GET /api/events/writable-calendars`
|
||||
@@ -81,7 +82,7 @@ New symbols introduced across Phase 3 (excluded from drift verification):
|
||||
- Zustand keys: `eventFormOpen`, `eventFormMode`, `eventFormUid`, `deleteDialogOpen`, `deleteDialogUid`, `lastSyncedUid`
|
||||
- Dep: `vite-plugin-pwa` (+ peer `workbox-window`, `workbox-build`)
|
||||
- PWA assets: `apps/pwa/public/icon-192.png`, `icon-512.png`, `apple-touch-icon.png`, generated `manifest.webmanifest` + service worker
|
||||
</artifacts_this_phase_produces>
|
||||
</artifacts_this_phase_produces>
|
||||
|
||||
<tasks>
|
||||
|
||||
@@ -123,6 +124,7 @@ New symbols introduced across Phase 3 (excluded from drift verification):
|
||||
On the existing `calendarEvents` table, add `objectUrl: varchar('object_url', { length: 1024 })` (nullable) immediately after the `etag` column — this stores the CalDAV object URL for If-Match update/delete (D-08, RESEARCH.md Open Q2).
|
||||
|
||||
From the apps/pwa directory, install vite-plugin-pwa: `pnpm --filter @familysync/pwa add vite-plugin-pwa` (workbox-window and workbox-build install as peer deps). Do NOT configure the plugin yet (that is Plan 06).
|
||||
|
||||
</action>
|
||||
<verify>
|
||||
<automated>cd /home/luc/Projects/familysync && pnpm --filter @familysync/api exec tsc --noEmit && grep -q "calendar_outbox" apps/api/src/db/schema.ts && grep -q "object_url" apps/api/src/db/schema.ts && grep -q '"vite-plugin-pwa"' apps/pwa/package.json</automated>
|
||||
@@ -212,20 +214,22 @@ New symbols introduced across Phase 3 (excluded from drift verification):
|
||||
</tasks>
|
||||
|
||||
<threat_model>
|
||||
|
||||
## Trust Boundaries
|
||||
|
||||
| Boundary | Description |
|
||||
|----------|-------------|
|
||||
| Boundary | Description |
|
||||
| ------------------------ | ------------------------------------------------------------ |
|
||||
| package registry → build | New npm dependency (vite-plugin-pwa) enters the supply chain |
|
||||
| schema file → live DB | drizzle-kit push mutates the production schema |
|
||||
| schema file → live DB | drizzle-kit push mutates the production schema |
|
||||
|
||||
## STRIDE Threat Register
|
||||
|
||||
| Threat ID | Category | Component | Disposition | Mitigation Plan |
|
||||
|-----------|----------|-----------|-------------|-----------------|
|
||||
| T-03-SC | Tampering | vite-plugin-pwa + workbox peer deps install | mitigate | Blocking human-verify legitimacy checkpoint (Task 1) before install; `npm view` version check; npmjs.com repo confirmation |
|
||||
| T-03-01 | Tampering | drizzle-kit push | mitigate | Blocking human-action checkpoint (Task 5); abort on any reported destructive operation |
|
||||
| T-03-02 | Information Disclosure | calendar_outbox stores payload/etag | accept | Outbox rows are server-side only, never exposed to frontend; payload is the member's own VEVENT |
|
||||
| Threat ID | Category | Component | Disposition | Mitigation Plan |
|
||||
| --------- | ---------------------- | ------------------------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| T-03-SC | Tampering | vite-plugin-pwa + workbox peer deps install | mitigate | Blocking human-verify legitimacy checkpoint (Task 1) before install; `npm view` version check; npmjs.com repo confirmation |
|
||||
| T-03-01 | Tampering | drizzle-kit push | mitigate | Blocking human-action checkpoint (Task 5); abort on any reported destructive operation |
|
||||
| T-03-02 | Information Disclosure | calendar_outbox stores payload/etag | accept | Outbox rows are server-side only, never exposed to frontend; payload is the member's own VEVENT |
|
||||
|
||||
</threat_model>
|
||||
|
||||
<verification>
|
||||
@@ -236,10 +240,11 @@ New symbols introduced across Phase 3 (excluded from drift verification):
|
||||
</verification>
|
||||
|
||||
<success_criteria>
|
||||
|
||||
- Outbox table + objectUrl column pushed live (the schema-push blocking requirement is satisfied here for the schema introduced this wave).
|
||||
- PWA tooling installed and legitimacy-gated.
|
||||
- Complete Wave 0 RED scaffold in place for every later implementing task.
|
||||
</success_criteria>
|
||||
</success_criteria>
|
||||
|
||||
<output>
|
||||
Create `.planning/phases/03-event-write-back-pwa-install/03-01-SUMMARY.md` when done.
|
||||
|
||||
Reference in New Issue
Block a user