Commit Graph
1058 Commits
Author SHA1 Message Date
Lucas Berger b1851f475e docs(08): SUMMARY + VERIFICATION — phase 8 complete, CI-01 + CI-02 delivered
CI / fast-checks (pull_request) Successful in 49s
CI / api (pull_request) Successful in 56s
CI / harness (pull_request) Successful in 3m23s
CI / publish (pull_request) Has been skipped
- 08-04-SUMMARY.md: publish job verified green (run #14), both tags pushed,
  security audit pass (PAT masked, --password-stdin), REGISTRY_PAT naming note
- 08-VERIFICATION.md: all six phase-8 ROADMAP criteria passed with evidence table
- REQUIREMENTS.md: CI-01 + CI-02 marked complete (checkboxes + traceability table)
- ROADMAP.md: phase 8 marked [x] complete (2026-06-11), 08-04 plan ticked
- STATE.md: phase complete, D-PAT-NAMING decision recorded, operator next steps updated
2026-06-11 16:17:53 -04:00
luckberg 98acff8108 Merge pull request 'Phase 8: Gitea CI — runner probe + PR gating jobs (fast-checks + api)' (#3) from gsd/phase-08-gitea-ci into main
CI / fast-checks (push) Has been skipped
CI / api (push) Has been skipped
CI / harness (push) Has been skipped
CI / publish (push) Successful in 1m7s
2026-06-11 16:11:41 -04:00
Lucas Berger 73eecf7559 fix(08-04): reference secrets.REGISTRY_PAT — Gitea reserves the GITEA_ prefix
CI / fast-checks (pull_request) Successful in 49s
CI / api (pull_request) Successful in 57s
CI / harness (pull_request) Successful in 3m30s
CI / publish (pull_request) Has been skipped
The registry PAT secret had to be named REGISTRY_PAT (Gitea forbids the GITEA_
prefix for secret names). Point the publish docker-login at secrets.REGISTRY_PAT.
2026-06-11 16:05:54 -04:00
Lucas Berger dcf42423a5 chore(08): remove throwaway runner-probe workflow before merge to main
CI / fast-checks (pull_request) Successful in 50s
CI / api (pull_request) Successful in 56s
CI / harness (pull_request) Successful in 3m27s
CI / publish (pull_request) Has been skipped
Probe answers are recorded in 08-01-SUMMARY; the probe is no longer needed and
should not live on main (it was workflow_dispatch-only/inert anyway).
2026-06-11 15:57:49 -04:00
Lucas Berger ebcc38d810 feat(08-04): publish job — build + push API image on merge to main
- Add publish job gated on push to refs/heads/main (never pull_request)
- docker login via --password-stdin with secrets.GITEA_REGISTRY_PAT (Pitfall 13)
- docker build --target production -f apps/api/Dockerfile . (repo-root context, T-08-10)
- Push :latest and :${MILESTONE}-${SHORT_SHA} tags per D-04
- docker logout in always() step to drop credential after push
- No dev-bypass flag in publish job (T-08-09 boundary)
2026-06-11 15:56:37 -04:00
Lucas Berger 212d8c1691 docs(08-03): SUMMARY — harness green, 58 specs both profiles on cold CI stack
- Run #11 (PR #3): 58 passed in 1.6 min (iphone/WebKit + pixel/Chromium)
- 4 infrastructure fixes: API-reap at step boundary, IPv4-first for Vite, dev-user FK seed, reporter double-forward via pnpm
- No Phase 7 harness file modified (phase boundary D-01/D-02 held)
- Advance position to 08-04 (publish job)
2026-06-11 15:52:15 -04:00
Lucas Berger 03e8088238 fix(08-03): call pwa test:e2e directly so --reporter forwards cleanly
CI / fast-checks (pull_request) Successful in 49s
CI / api (pull_request) Successful in 1m0s
CI / harness (pull_request) Successful in 3m26s
Run #10 cleared global-setup but playwright errored 'No tests found':
`pnpm test:e2e -- --reporter=list,html` routes through two pnpm script layers
(root→pwa) and the `--` survives into `playwright test -- --reporter=list,html`,
where playwright treats --reporter as a test-file filter. Call the pwa script
directly and append the flag without `--` (validated: 58 specs list vs 0).
2026-06-11 15:43:09 -04:00
Lucas Berger e486c6be9f fix(08-03): seed dev user id=1 — global-setup assumes it exists
CI / fast-checks (pull_request) Successful in 48s
CI / api (pull_request) Successful in 56s
CI / harness (pull_request) Failing after 2m0s
global-setup.ts seeds calendars/lists/events for user_id=1 but never creates
the user (DEV_AUTH_BYPASS injects DEV_USER in-memory only). On a fresh CI DB the
calendars INSERT IGNORE is silently skipped on the users FK → calendar 10 missing
→ calendar_events insert fails FK. Add an idempotent users(id=1) seed after
migrate (validated locally: full insert chain passes). No harness files changed.
2026-06-11 15:36:52 -04:00
Lucas Berger 73897407c7 fix(08-03): harness uses 127.0.0.1 + ipv4first — Vite is IPv4-only
CI / fast-checks (pull_request) Successful in 50s
CI / api (pull_request) Successful in 56s
CI / harness (pull_request) Failing after 1m49s
global-setup polls baseURL/health via Node fetch; the runner resolves localhost
to ::1 first, but Vite binds IPv4-only (127.0.0.1:5173), so localhost→::1:5173
→ ECONNREFUSED → health poll never returns 200. (curl passed for :3000 because
curl falls back IPv4↔IPv6 and the API is dual-stack; Node fetch does not.)
Proven: [::1]:5173 ECONNREFUSED vs 127.0.0.1:5173 200. Point PLAYWRIGHT_BASE_URL
at 127.0.0.1 and add --dns-result-order=ipv4first. No harness files changed.
2026-06-11 15:20:24 -04:00
Lucas Berger 53a989c3fb fix(08-03): keep API alive during harness — start API + run e2e in one step
CI / fast-checks (pull_request) Successful in 49s
CI / api (pull_request) Successful in 56s
CI / harness (pull_request) Failing after 2m50s
Run #7 harness failed: global-setup polled :5173/health (Vite proxy → :3000)
and never got 200. The API connected to the DB and :3000/health was green
during the separate 'Wait for API' step, but the bare-backgrounded node
process was reaped at the step boundary and was dead by the time the e2e step
ran (after the multi-minute browser install). Confirmed locally the API does
not self-crash (alive + healthy for 75s in-shell).

Install browsers first, then start the API and run Playwright in a SINGLE step
so the API stays a child of the test shell for the whole run; capture the test
exit code and kill the API after. No harness files touched.
2026-06-11 15:05:04 -04:00
Lucas Berger 71c89093b1 feat(08-03): add Playwright install + harness run (both profiles) + artifact upload
CI / fast-checks (pull_request) Successful in 48s
CI / api (pull_request) Successful in 56s
CI / harness (pull_request) Failing after 2m53s
- npx playwright install --with-deps webkit chromium from apps/pwa/ (D-PROBE-05)
- pnpm test:e2e -- --reporter=list,html overrides github reporter (Pitfall 5; Gitea ignores annotations)
- Both iphone (WebKit) + pixel (Chromium) profiles run (D-05; no --project filter)
- Step env: CI=true, PLAYWRIGHT_BASE_URL=http://localhost:5173, DEV_AUTH_BYPASS=true, NODE_ENV=development, DB_*
- On failure: upload apps/pwa/test-results/ via ChristopherHX/gitea-upload-artifact@v4 (D-06/D-PROBE-06)
- Always: kill API background process via /tmp/api.pid
- No edits to playwright.config.ts / global-setup.ts / vite.config.ts / specs (phase boundary)
2026-06-11 14:45:52 -04:00
Lucas Berger d55e347a09 feat(08-03): add harness job — DB + migrate + API background + :3000 readiness
- Add harness job to ci.yml (ubuntu-latest, pull_request, parallel with fast-checks + api)
- MariaDB 11 service container with healthcheck.sh readiness (same pattern as api job)
- mysql2 readiness poll (no mysql CLI in runner image, D-PROBE-03)
- db:migrate via drizzle-kit (never db:push, T-08-07)
- pnpm --filter @familysync/api build before starting (Pitfall 4)
- API background: DEV_AUTH_BYPASS=true inline on node line (Pitfall 8), NODE_ENV=development
- curl retry loop on localhost:3000/health, 60s deadline, kill+exit on timeout (D-02/T-08-08)
2026-06-11 14:45:07 -04:00
Lucas Berger 2a34a94cc6 docs(08): correct premature completion — phase 8 + CI-01 still in progress
CI / fast-checks (pull_request) Successful in 48s
CI / api (pull_request) Successful in 57s
Plans 08-03 (harness UI-regression job) and 08-04 (publish job) are not yet
built; CI-01's definition includes the harness step (08-03). Revert phase 8
and CI-01 from complete back to in-progress.
2026-06-11 14:42:33 -04:00
Lucas Berger 694ffe713b docs(08): commit phase research (was untracked) 2026-06-11 14:39:30 -04:00
Lucas Berger 78229168b9 docs(08-02): SUMMARY — PR gating jobs green on cold run 2026-06-11 14:37:32 -04:00
Lucas Berger 181d161da6 docs: add backlog 999.16 — wire real ESLint lint gate (deferred from phase 8) 2026-06-11 14:33:22 -04:00
Lucas Berger 0b148b96f8 chore(08-01): probe to manual-only (workflow_dispatch)
CI / fast-checks (pull_request) Successful in 48s
CI / api (pull_request) Successful in 57s
Stops the throwaway probe re-running on every push and contending with
ci.yml on the single runner. Fork answers already captured in 08-01-SUMMARY.
2026-06-11 14:29:38 -04:00
Lucas Berger dc31d4e1ec fix(ci): make root lint script a no-op-when-absent gate
pnpm -r lint exited 1 (ERR_PNPM_RECURSIVE_RUN_NO_SCRIPT) because no package
defines a lint script yet, failing the CI fast-checks job. Switch to
pnpm -r --if-present lint so it exits 0 today and gates automatically once a
lint script is added. (Lint tooling wiring remains out of scope.)
2026-06-11 14:29:08 -04:00
Lucas Berger c0f892cae5 fix(db): squash migrations to single baseline (cold-migrate was broken)
0000_easy_slipstream already created lists/list_shares/list_items and the
calendars unique constraint, but 0001_lists_schema re-created those tables and
0001_calendars_user_url_unique was an orphan (not in _journal) — so a cold
`drizzle-kit migrate` against an empty DB failed with ERROR 1050 'Table lists
already exists'. Dev only survived because its DB was built incrementally; CI
is the first cold migrate and exposed it.

Regenerated a single 0000_baseline.sql from schema.ts. Verified on a fresh
mariadb:11: migrate succeeds, schema is structurally identical to the running
dev DB, `drizzle-kit generate` reports no drift, and all 238 API tests pass.
Local dev DBs must be rebuilt (drop + db:migrate); no prod exists.
2026-06-11 14:28:08 -04:00
Lucas Berger 3343f36e97 feat(08-02): ci.yml api job with mariadb service
runner-probe / runner-probe (push) Successful in 1m47s
CI / fast-checks (pull_request) Failing after 22s
CI / api (pull_request) Failing after 26s
- api job: runs-on ubuntu-latest, if pull_request, parallel with fast-checks (no needs:)
- services: mariadb:11 with healthcheck.sh --connect --innodb_initialized options
  (--health-start-period=30s for MariaDB 11 InnoDB cold-start, --health-retries=10)
- DB_HOST: mariadb (Docker-executor confirmed by D-PROBE-02)
- Throwaway creds: familysync/testpass scoped to ephemeral service container (T-08-03)
- No actions/cache (D-PROBE-04)
- Node mysql2 readiness poll via --input-type=commonjs inline script, 90s deadline
  (no mysql CLI in runner image per D-PROBE-03; Pitfall 11 belt-and-suspenders)
- db:migrate (drizzle-kit migrate); drizzle push never used (T-08-04, MariaDB unsafe)
- pnpm --filter @familysync/api test: full DB-backed API test suite
2026-06-11 10:22:45 -04:00
Lucas Berger 667f01702c feat(08-02): ci.yml fast-checks job
- on: pull_request + push branches:[main]; workflow env MILESTONE: v1.1
- fast-checks job: runs-on ubuntu-latest, if pull_request
- Node 22 via actions/setup-node@v4 + corepack enable pnpm
- No actions/cache (D-PROBE-04: times out on this runner)
- pnpm install --frozen-lockfile, lint (no-op), typecheck, PWA unit tests
- DB-backed pnpm test intentionally absent from this job
2026-06-11 10:21:17 -04:00
Lucas Berger 087d9af117 docs(08-01): SUMMARY — probe fork answers recorded, plan complete
- Docker-executor mode confirmed; runs-on: ubuntu-latest (not self-hosted)
- MariaDB service container works; DB_HOST=mariadb; no mysql CLI in image
- actions/cache@v4 unreliable (timeout) — skip in Plans 02/03
- Playwright WebKit deps install cleanly; Phase-7 harness CI-feasible
- ChristopherHX/gitea-upload-artifact@v4 confirmed; actions/upload-artifact@v4 broken
- ${GITHUB_SHA:0:7} valid for image tags
- STATE.md: plan 08-01 complete, position advanced to 08-02 (Wave 2)
- ROADMAP.md: 08 phase progress updated (1/4 plans complete)
2026-06-11 10:16:26 -04:00
Lucas Berger 134d4db08a fix(08-01): probe runs-on ubuntu-latest — runner has no self-hosted label
runner-probe / runner-probe (push) Successful in 5m33s
The act_runner advertises ubuntu-latest/ubuntu-24.04/ubuntu-22.04; runs-on:
self-hosted matched no runner and the probe job stayed queued. Switch the
probe (and the plan key-link) to ubuntu-latest. ci.yml (Plans 02-04) must
use the same label.
2026-06-11 10:04:41 -04:00
Lucas Berger e57b76ef59 docs(08-01): update STATE.md — Task 2 complete, awaiting Task 3 human-verify checkpoint
runner-probe / runner-probe (push) Has been cancelled
2026-06-11 09:53:40 -04:00
Lucas Berger b333d7b7ea feat(08-01): add runner-probe workflow
- Probe-only workflow triggering on gsd/phase-08-gitea-ci branch only
- Answers P-01..P-11 + P-13: Node version, pnpm, runner mode (critical
  fork Docker vs host), Docker socket, MariaDB service container spawn
  and reachability on both hostnames, actions/cache, Playwright WebKit
  deps, gitea-upload-artifact fork, and GITHUB_SHA short-SHA expression
- Uses healthcheck.sh --connect --innodb_initialized for MariaDB (never
  the binary removed from mariadb:11 — Pitfall 11)
- Uses ChristopherHX/gitea-upload-artifact@v4 (not the official action
  which aborts on Gitea with GHES detection — Pitfall 6 / T-08-SC)
- P-12 (docker login) deferred to Plan 04 — probe never references any
  secret (T-08-01 compliant)
- All steps that may fail use continue-on-error: true so probe reports
  findings instead of red-failing on expected unknowns
2026-06-11 09:53:13 -04:00
Lucas Berger 4a510f1d79 docs: add backlog item 999.15 — desktop e2e coverage; drop from phase 8 context 2026-06-11 09:36:53 -04:00
Lucas Berger 41b0b60291 docs(08): create phase plan 2026-06-11 09:34:48 -04:00
Lucas Berger 4e474cdd9c docs(08): create phase plan — 4 plans (runner-probe, PR jobs, harness, publish) 2026-06-11 09:26:48 -04:00
Lucas Berger 92acf02989 docs(08): add validation strategy 2026-06-11 09:16:30 -04:00
Lucas Berger e8a9ce4ea9 docs(state): record phase 8 context session 2026-06-11 08:50:02 -04:00
Lucas Berger c3cee0baae docs(08): capture phase context 2026-06-11 08:50:02 -04:00
Lucas Berger 4303a1b680 docs(07): code-review --fix complete — 5 warnings fixed, re-review status clean 2026-06-11 08:00:55 -04:00
Lucas Berger 9c38dd33ff fix(07): WR-02 explicit readiness flag + WR-01 /api/me dev-bypass gate in global-setup 2026-06-11 07:51:51 -04:00
Lucas Berger 5322cfc2b0 fix(07): WR-06 correct misleading 'remove by reload' comments to describe evaluate(remove) 2026-06-11 07:51:45 -04:00
Lucas Berger 2b745adb29 fix(07): WR-05 drop redundant unroute calls (per-test context isolation handles cleanup) 2026-06-11 07:51:41 -04:00
Lucas Berger c564fc67a1 fix(07): WR-07 prove SW block via getRegistration, skip when SW unavailable 2026-06-11 07:51:34 -04:00
Lucas Berger 789e87a360 docs(07): mark deep-review blockers BL-01/BL-02 resolved (53c3ca5); verification addendum 2026-06-11 07:39:58 -04:00
Lucas BergerandClaude Opus 4.8 53c3ca56b8 fix(07-04): make calendar populated-state test non-vacuous (BL-01) + deterministic seed window (BL-02)
Deep review found the calendar 'populated state' assertions were vacuous:
- getByText('Nothing here').toHaveCount(0) targeted CalendarShell's EmptyState,
  which CalendarShell NEVER renders (success branch always mounts ScheduleXCalendar;
  EmptyState.tsx is dead code, imported by nothing). The check was permanently green
  regardless of the seed — a regression dropping all events would have shipped green.
- .sx-react-calendar-wrapper renders on any successful auth, with or without events,
  so it never proved the seed reached the UI.

Replaced the dead-EmptyState check with a real DB→UI proof: assert the seeded event
title 'Seeded Test Event' is rendered in the grid. Verified non-vacuous — passes with
the seed on both profiles; with /api/events mocked to [] the title is absent (would fail).

BL-02: the seed anchored the event at now+24h. Both phone profiles render the
month-agenda view of the CURRENT month, so on a month's last day 'tomorrow' falls into
the next month and vanishes from the grid, making the new visibility assertion date-fragile.
Re-anchored to noon-today (UTC) — always today's local date, always in the current-month view.

Verified: full 58-test suite passes both profiles; typecheck clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 07:38:41 -04:00
Lucas Berger f52b722b9b docs(07): deep code review report (2 blockers, CR-01 verified resolved) 2026-06-11 07:32:58 -04:00
Lucas Berger 84921a0464 docs(phase-07): evolve PROJECT.md after phase completion 2026-06-11 02:30:21 -04:00
Lucas Berger 407bf1e91c docs(phase-07): complete phase execution 2026-06-11 02:29:36 -04:00
Lucas Berger 3b4fd9a5b1 docs(07): add phase verification report 2026-06-11 02:29:17 -04:00
Lucas Berger e105dce9de docs(07): mark CR-01 resolved in review report 2026-06-11 02:24:11 -04:00
Lucas BergerandClaude Opus 4.8 fcc680e553 fix(07-02): fail-closed guard on global-setup seed (CR-01, data-loss prevention)
global-setup.ts TRUNCATEs four tables against whatever DB_* points at, with no
production guard — an operator with prod DB_* still exported could wipe lists/
list_items/list_shares/calendar_events. The README promised a DEV_AUTH_BYPASS
guardrail the code never enforced. Adds a fail-closed guard mirroring
apps/api/src/auth/devBypass.ts: hard NODE_ENV==='production' check first, then
require DEV_AUTH_BYPASS==='true' before opening any DB connection. README updated
with the test-process env requirement (run command + CI runner env).

Verified: guard throws without DEV_AUTH_BYPASS; full 58-test suite passes with it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 02:23:38 -04:00
Lucas Berger 8458dc25eb docs(07): add code review report 2026-06-11 02:20:32 -04:00
Lucas Berger 10e570b21d docs(07-04): complete state coverage plan — calendar.spec.ts + lists.spec.ts 2026-06-11 02:13:34 -04:00
Lucas Berger b074b4abb2 feat(07-04): add lists.spec.ts — populated and empty-state tests (TEST-01)
- Populated state: asserts 'Open list: E2E Grocery List' button visible + listitem count ≥1 + 'No lists yet' absent + no overflow
- Empty state: routes /api/lists to 200 [] before goto, asserts 'No lists yet' + 'Tap + to create' visible + no overflow; unroutes after
- Seeded DB not mutated — empty state is network-simulated (T-07-11 / D-06)
- No absolute URLs; both states pass Rule 2 overflow check
2026-06-11 02:11:44 -04:00
Lucas Berger 17b625b6fe feat(07-04): add calendar.spec.ts — populated, error, auth-bypass + SW precondition tests
- Populated state: asserts .sx-react-calendar-wrapper visible + 'Nothing here' absent
- Error state: mocks /api/events* to 500, asserts 'Couldn't load events' heading + Retry ≥44px + no overflow; unroutes after
- TEST-02 preconditions: asserts nav landmark visible (authed reach) + URL on localhost (no Authelia redirect) + navigator.serviceWorker.controller null (SW block)
- No absolute URLs; route mocks paired with unroute (T-07-11)
2026-06-11 02:11:36 -04:00
Lucas BergerandClaude Opus 4.8 c44bcc9c37 chore(07): gitignore Playwright harness outputs (test-results, reports)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 02:07:07 -04:00
Lucas BergerandClaude Opus 4.8 4cd7931c3c fix(07-03): make e2e typecheck pass — add DOM lib to tsconfig.e2e, cast styleHandle el to Element
Playwright transpiles specs without typechecking (esbuild), so layout.spec.ts ran
green while `tsc -p tsconfig.e2e.json` failed: page.evaluate(() => document...)
callbacks need the DOM lib, and styleHandle.evaluate((el) => el.remove()) typed el as
Node (no .remove()). Phase 8 CI runs the typecheck gate, so this would have broken CI.
Adds DOM/DOM.Iterable to the e2e tsconfig (also covers 07-04 specs) and casts el to Element.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 02:06:15 -04:00