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:
@@ -19,10 +19,10 @@ affects: [08-04, phase-09, phase-10, phase-11, phase-12]
|
||||
tech-stack:
|
||||
added: []
|
||||
patterns:
|
||||
- "Combine API-start + readiness + test run in a single CI step so the API is not reaped at a step boundary"
|
||||
- "NODE_OPTIONS=--dns-result-order=ipv4first when Vite is IPv4-only and the runner resolves localhost to ::1 first"
|
||||
- "Idempotent seed step (INSERT IGNORE) for the DEV_AUTH_BYPASS user before global-setup runs — FK chain requires it"
|
||||
- "Call the PWA test:e2e script directly with --filter instead of root test:e2e -- -- to avoid double-pnpm arg forwarding"
|
||||
- 'Combine API-start + readiness + test run in a single CI step so the API is not reaped at a step boundary'
|
||||
- 'NODE_OPTIONS=--dns-result-order=ipv4first when Vite is IPv4-only and the runner resolves localhost to ::1 first'
|
||||
- 'Idempotent seed step (INSERT IGNORE) for the DEV_AUTH_BYPASS user before global-setup runs — FK chain requires it'
|
||||
- 'Call the PWA test:e2e script directly with --filter instead of root test:e2e -- -- to avoid double-pnpm arg forwarding'
|
||||
|
||||
key-files:
|
||||
created: []
|
||||
@@ -31,14 +31,14 @@ key-files:
|
||||
|
||||
key-decisions:
|
||||
- "FIX-1 (53a989c): Start API + run e2e in a single step — bare 'node &' in an early step is reaped when that step exits; the API must remain a child of the test shell through the entire Playwright run"
|
||||
- "FIX-2 (7389740): Use PLAYWRIGHT_BASE_URL=http://127.0.0.1:5173 and NODE_OPTIONS=--dns-result-order=ipv4first — Vite binds IPv4-only; Node fetch does not fall back from ::1 to 127.0.0.1 unlike curl"
|
||||
- "FIX-3 (e486c6b): Seed dev user id=1 (INSERT IGNORE) after migrate, before API start — DEV_AUTH_BYPASS injects the user in-memory only; on a fresh CI DB the FK constraint silently aborted the calendars seed"
|
||||
- 'FIX-2 (7389740): Use PLAYWRIGHT_BASE_URL=http://127.0.0.1:5173 and NODE_OPTIONS=--dns-result-order=ipv4first — Vite binds IPv4-only; Node fetch does not fall back from ::1 to 127.0.0.1 unlike curl'
|
||||
- 'FIX-3 (e486c6b): Seed dev user id=1 (INSERT IGNORE) after migrate, before API start — DEV_AUTH_BYPASS injects the user in-memory only; on a fresh CI DB the FK constraint silently aborted the calendars seed'
|
||||
- "FIX-4 (03e8088): Call 'pnpm --filter @familysync/pwa test:e2e --reporter=list,html' directly — 'pnpm test:e2e -- --reporter=list,html' double-forwards '--' through two pnpm layers; Playwright treats --reporter as a test-file filter and finds no tests"
|
||||
- "Phase 7 harness files (playwright.config.ts, global-setup.ts, vite.config.ts, all specs) were NOT modified — CI owns stack bring-up only (D-01/D-02 phase boundary held)"
|
||||
- 'Phase 7 harness files (playwright.config.ts, global-setup.ts, vite.config.ts, all specs) were NOT modified — CI owns stack bring-up only (D-01/D-02 phase boundary held)'
|
||||
- "Reporter override --reporter=list,html kept: Gitea does not render 'github' annotations; list output is legible in the log"
|
||||
|
||||
patterns-established:
|
||||
- "Harness step pattern: install browsers, then start API + wait for :3000/health, then run Playwright — all in one step"
|
||||
- 'Harness step pattern: install browsers, then start API + wait for :3000/health, then run Playwright — all in one step'
|
||||
- "Idempotent user seed step: INSERT IGNORE + upsert pattern for DEV_AUTH_BYPASS user before global-setup's FK-dependent seeds"
|
||||
|
||||
requirements-completed: [CI-01]
|
||||
@@ -95,6 +95,7 @@ completed: 2026-06-11
|
||||
### Auto-fixed Issues (all Rule 3 — blocking)
|
||||
|
||||
**1. [Rule 3 - Blocking] API reaped at step boundary**
|
||||
|
||||
- **Found during:** CI run after Task 1+2 commits
|
||||
- **Issue:** Bare `node apps/api/dist/index.js &` in an early step was reaped when that step exited. The browser install (multi-minute) ran next, then the test step found no API.
|
||||
- **Fix:** Merged API start + curl :3000/health readiness loop + `pnpm test:e2e` into a single step; moved browser install to the step immediately before it.
|
||||
@@ -102,6 +103,7 @@ completed: 2026-06-11
|
||||
- **Committed in:** 53a989c
|
||||
|
||||
**2. [Rule 3 - Blocking] global-setup ECONNREFUSED on Vite :5173**
|
||||
|
||||
- **Found during:** CI run post fix 1
|
||||
- **Issue:** `global-setup.ts` fetched `${PLAYWRIGHT_BASE_URL}/health`; `PLAYWRIGHT_BASE_URL` defaulted to `http://localhost:5173`; runner resolved `localhost` → `::1`; Vite bound only `127.0.0.1:5173` → `ECONNREFUSED`.
|
||||
- **Fix:** Added `PLAYWRIGHT_BASE_URL: http://127.0.0.1:5173` and `NODE_OPTIONS: --dns-result-order=ipv4first` to the harness step env.
|
||||
@@ -109,6 +111,7 @@ completed: 2026-06-11
|
||||
- **Committed in:** 7389740
|
||||
|
||||
**3. [Rule 3 - Blocking] Missing dev user id=1 causes FK error in global-setup seed**
|
||||
|
||||
- **Found during:** CI run post fix 2
|
||||
- **Issue:** `global-setup.ts` seeds `calendars` + `calendar_events` for `user_id=1`. `DEV_AUTH_BYPASS` injects that user in-memory only (no DB row). On a fresh CI DB, the `INSERT IGNORE INTO calendars` silently aborted on the `users` FK; calendar id=10 was absent; the `calendar_events` insert then failed on the calendars FK.
|
||||
- **Fix:** Added a "Seed dev user" step after `db:migrate`: `INSERT IGNORE INTO users` with `id=1, oidc_iss='dev', oidc_sub='dev-user', display_name='Dev User', color='#4A90D9'`.
|
||||
@@ -116,6 +119,7 @@ completed: 2026-06-11
|
||||
- **Committed in:** e486c6b
|
||||
|
||||
**4. [Rule 3 - Blocking] --reporter flag treated as test-file filter**
|
||||
|
||||
- **Found during:** CI run post fix 3
|
||||
- **Issue:** `pnpm test:e2e -- --reporter=list,html` from the workspace root double-forwarded `--` through two pnpm invocations, delivering `playwright test -- --reporter=list,html`; Playwright interpreted `--reporter=list,html` as a test-file path and found no tests.
|
||||
- **Fix:** Changed invocation to `pnpm --filter @familysync/pwa test:e2e --reporter=list,html` — bypasses the root script delegation entirely.
|
||||
@@ -171,5 +175,6 @@ None — no new network endpoints or auth paths introduced. The `DEV_AUTH_BYPASS
|
||||
- Plan 04 needs `GITEA_REGISTRY_PAT` (deferred D-PROBE-08) — operator must create the PAT before the publish step can push to the Gitea container registry
|
||||
|
||||
---
|
||||
*Phase: 08-gitea-ci*
|
||||
*Completed: 2026-06-11*
|
||||
|
||||
_Phase: 08-gitea-ci_
|
||||
_Completed: 2026-06-11_
|
||||
|
||||
Reference in New Issue
Block a user