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:
@@ -12,18 +12,18 @@ files_modified:
|
||||
- apps/api/tests/routes/events.test.ts
|
||||
must_haves:
|
||||
truths:
|
||||
- "POST /api/events/create with the exact client CreateEventPayload shape ({title,start,end,allDay,recurrence}) returns 202, not 400"
|
||||
- "PATCH /api/events/:uid/edit with the same client shape returns 202, not 400"
|
||||
- "An authenticated OIDC request (devBypassActive=false) with a known iss+sub resolves to a real users.id and is allowed to write — it does NOT unconditionally 401"
|
||||
- "A request with no dev user and no OIDC session returns 401"
|
||||
- 'POST /api/events/create with the exact client CreateEventPayload shape ({title,start,end,allDay,recurrence}) returns 202, not 400'
|
||||
- 'PATCH /api/events/:uid/edit with the same client shape returns 202, not 400'
|
||||
- 'An authenticated OIDC request (devBypassActive=false) with a known iss+sub resolves to a real users.id and is allowed to write — it does NOT unconditionally 401'
|
||||
- 'A request with no dev user and no OIDC session returns 401'
|
||||
artifacts:
|
||||
- path: apps/api/src/routes/events.ts
|
||||
provides: "Canonical title/start/end zod contract + async OIDC iss/sub→users.id resolution on all 5 handlers"
|
||||
contains: "upsertUser"
|
||||
provides: 'Canonical title/start/end zod contract + async OIDC iss/sub→users.id resolution on all 5 handlers'
|
||||
contains: 'upsertUser'
|
||||
key_links:
|
||||
- from: "apps/api/src/routes/events.ts"
|
||||
to: "apps/api/src/auth/user.ts"
|
||||
via: "upsertUser(iss, sub, email)"
|
||||
- from: 'apps/api/src/routes/events.ts'
|
||||
to: 'apps/api/src/auth/user.ts'
|
||||
via: 'upsertUser(iss, sub, email)'
|
||||
pattern: "upsertUser\\("
|
||||
---
|
||||
|
||||
@@ -101,6 +101,7 @@ Downstream gap plans (03-10) read the new field names (`title/start/end`) out of
|
||||
|
||||
Add the two contract tests described in <behavior>. Commit RED then GREEN
|
||||
(`test(03-09): ...` then `feat(03-09): ...`).
|
||||
|
||||
</action>
|
||||
<verify>
|
||||
<automated>cd apps/api && npx vitest run tests/routes/events.test.ts</automated>
|
||||
@@ -143,6 +144,7 @@ Downstream gap plans (03-10) read the new field names (`title/start/end`) out of
|
||||
Per D-10 identity is oidc_iss+oidc_sub; upsertUser keys on `uniq_oidc_identity`. Return 401 ONLY when no session exists (covered by upsertUser path).
|
||||
|
||||
Add the two tests in <behavior>. Commit RED then GREEN.
|
||||
|
||||
</action>
|
||||
<verify>
|
||||
<automated>cd apps/api && npx vitest run tests/routes/events.test.ts</automated>
|
||||
|
||||
Reference in New Issue
Block a user