docs(13-03): complete Prettier reformat + CI format gate plan

This commit is contained in:
Lucas Berger
2026-06-11 20:44:52 -04:00
parent 0422406c42
commit f153b7199d
3 changed files with 137 additions and 13 deletions
+3 -3
View File
@@ -230,7 +230,7 @@ Make FamilySync configurable, administrable, and maintainable for real multi-mem
**Wave 3** _(blocked on Wave 2 completion)_ **Wave 3** _(blocked on Wave 2 completion)_
- [ ] 13-03-PLAN.md — Prettier reformat (isolated commit) + CI format:check step + green baseline (SC-2, SC-3) - [x] 13-03-PLAN.md — Prettier reformat (isolated commit) + CI format:check step + green baseline (SC-2, SC-3)
## Progress ## Progress
@@ -248,7 +248,7 @@ Make FamilySync configurable, administrable, and maintainable for real multi-mem
| 10. Admin Role & Settings | v1.1 | 0/? | Not started | - | | 10. Admin Role & Settings | v1.1 | 0/? | Not started | - |
| 11. Per-Event Reminders | v1.1 | 0/? | Not started | - | | 11. Per-Event Reminders | v1.1 | 0/? | Not started | - |
| 12. Initial Setup Wizard | v1.1 | 0/? | Not started | - | | 12. Initial Setup Wizard | v1.1 | 0/? | Not started | - |
| 13. Real Lint Gate (ESLint) | v1.1 | 2/3 | In Progress | | | 13. Real Lint Gate (ESLint) | v1.1 | 3/3 | Complete | 2026-06-12 |
## Backlog ## Backlog
@@ -256,7 +256,7 @@ Make FamilySync configurable, administrable, and maintainable for real multi-mem
**Goal:** [Captured for future planning] Abstract the calendar backend behind a provider interface so Fastmail/CalDAV is one implementation among potentially many. Shipping with a single provider is fine, but the broker, sync, and event-expansion layers should be structured so additional providers (e.g. other CalDAV hosts, Google Calendar, generic ICS feeds) can be added without rework. Captures the "provider" seam as an explicit architectural concern. **Goal:** [Captured for future planning] Abstract the calendar backend behind a provider interface so Fastmail/CalDAV is one implementation among potentially many. Shipping with a single provider is fine, but the broker, sync, and event-expansion layers should be structured so additional providers (e.g. other CalDAV hosts, Google Calendar, generic ICS feeds) can be added without rework. Captures the "provider" seam as an explicit architectural concern.
**Requirements:** TBD **Requirements:** TBD
**Plans:** 2/3 plans executed **Plans:** 3/3 plans complete
Plans: Plans:
+12 -10
View File
@@ -2,16 +2,16 @@
gsd_state_version: 1.0 gsd_state_version: 1.0
milestone: v1.1 milestone: v1.1
milestone_name: Operability & Polish milestone_name: Operability & Polish
status: executing status: verifying
stopped_at: Phase 13 context gathered stopped_at: Phase 13 Plan 03 complete (Prettier reformat + CI format gate + green baseline)
last_updated: '2026-06-12T00:25:40.760Z' last_updated: "2026-06-12T00:44:39.621Z"
last_activity: 2026-06-11 -- Phase 13 Plan 01 complete (lint gate foundation) last_activity: 2026-06-11 -- Phase 13 Plan 01 complete (lint gate foundation)
progress: progress:
total_phases: 17 total_phases: 17
completed_phases: 2 completed_phases: 3
total_plans: 11 total_plans: 11
completed_plans: 10 completed_plans: 11
percent: 12 percent: 18
--- ---
# Project State # Project State
@@ -27,7 +27,7 @@ See: .planning/PROJECT.md (updated 2026-06-10)
Phase: 13 (real-lint-gate-eslint) — EXECUTING Phase: 13 (real-lint-gate-eslint) — EXECUTING
Plan: 3 of 3 Plan: 3 of 3
Status: Ready to execute Status: Phase complete — ready for verification
Last activity: 2026-06-11 -- Phase 13 Plan 01 complete (lint gate foundation) Last activity: 2026-06-11 -- Phase 13 Plan 01 complete (lint gate foundation)
## Performance Metrics ## Performance Metrics
@@ -84,6 +84,7 @@ _Updated after each plan completion_
| Phase 07-mobile-test-harness P04 | 22 | 2 tasks | 2 files | | Phase 07-mobile-test-harness P04 | 22 | 2 tasks | 2 files |
| Phase 13 P01 | 8 | 2 tasks | 7 files | | Phase 13 P01 | 8 | 2 tasks | 7 files |
| Phase 13-real-lint-gate-eslint P02 | 90 | 2 tasks | 31 files | | Phase 13-real-lint-gate-eslint P02 | 90 | 2 tasks | 31 files |
| Phase 13-real-lint-gate-eslint P03 | 10 | 3 tasks | 399 files |
## Accumulated Context ## Accumulated Context
@@ -144,6 +145,7 @@ Recent decisions affecting current work:
- [Phase 06]: Phase-level UX fixes (surfaced during UAT, not in any single plan): AppNav made persistent across routes — nav no longer disappears on /lists (commits 6070437 RED + 051874b fix); BottomTabBar hidden on desktop — no longer overlaps sidebar Settings affordance (commits 740e342 RED + 089b53d fix) - [Phase 06]: Phase-level UX fixes (surfaced during UAT, not in any single plan): AppNav made persistent across routes — nav no longer disappears on /lists (commits 6070437 RED + 051874b fix); BottomTabBar hidden on desktop — no longer overlaps sidebar Settings affordance (commits 740e342 RED + 089b53d fix)
- [Phase ?]: D-04-SCHEDULE-X-LOCATOR: Used .sx-react-calendar-wrapper CSS class to assert Schedule-X grid — no semantic role on outer wrapper div - [Phase ?]: D-04-SCHEDULE-X-LOCATOR: Used .sx-react-calendar-wrapper CSS class to assert Schedule-X grid — no semantic role on outer wrapper div
- [Phase ?]: D-04-EMPTY-NETWORK-SIM: Lists empty state simulated via page.route to 200 empty array — preserves seeded DB for parallel workers (D-06 / T-07-11) - [Phase ?]: D-04-EMPTY-NETWORK-SIM: Lists empty state simulated via page.route to 200 empty array — preserves seeded DB for parallel workers (D-06 / T-07-11)
- [Phase ?]: D-13-08: Prettier reformat committed as isolated mechanical diff; CI Format check step added to fast-checks job
### Roadmap Evolution ### Roadmap Evolution
@@ -205,9 +207,9 @@ Recent decisions affecting current work:
## Session Continuity ## Session Continuity
Last session: 2026-06-12T00:25:40.753Z Last session: 2026-06-12T00:44:39.612Z
Stopped at: Phase 13 context gathered Stopped at: Phase 13 Plan 03 complete (Prettier reformat + CI format gate + green baseline)
Resume file: .planning/phases/13-real-lint-gate-eslint/13-CONTEXT.md Resume file: None
## Operator Next Steps ## Operator Next Steps
@@ -0,0 +1,122 @@
---
phase: 13-real-lint-gate-eslint
plan: "03"
subsystem: lint-gate
tags: [prettier, reformat, ci, format-check, baseline-green]
dependency_graph:
requires: [13-02]
provides: [format-clean-baseline, ci-format-check-step]
affects: [ci-fast-checks-job]
tech_stack:
added: []
patterns:
- Prettier isolated reformat commit (D-13-08) — mechanical diff separate from logic fixes
- CI step insertion after Lint — name/run idiom matching existing steps
key_files:
created: []
modified:
- .gitea/workflows/ci.yml
- apps/api/src/** (398 files total reformatted)
- apps/pwa/src/**
- apps/api/tests/**
- apps/pwa/e2e/**
decisions:
- "D-13-08 honored: reformat is one isolated commit (982438d) separate from Plan 02 logic fixes"
- ".planning/** and .claude/** reformatted together with source files — .prettierignore does not exclude them, consistent with full-repo reformat intent"
- "API integration test one-timeout (toggling isShared false→true re-populates list_shares) documented as pre-existing intermittent; not a regression from the reformat (logic unchanged, same timeout as Plan 02)"
metrics:
duration_minutes: 10
completed: "2026-06-12"
tasks_completed: 3
files_modified: 399
---
# Phase 13 Plan 03: Prettier Reformat + CI Format Gate Summary
Prettier reformat applied as one isolated mechanical commit across the entire repo (D-13-08), CI fast-checks job gains a `Format check` step, and the baseline gate ends green: `pnpm lint` AND `pnpm format:check` both exit 0.
## Outcome
SC-3 met. The lint and format gates are real, wired into CI, and green.
- `pnpm lint` — exit 0 (both apps, `--max-warnings 0`)
- `pnpm format:check` — exit 0 (all matched files use Prettier code style)
- `pnpm typecheck` — exit 0 (both apps + e2e tsconfig)
- `pnpm --filter @familysync/pwa test` — 191/191 passing
- `pnpm --filter @familysync/api test` — 237/238 passing with dev DB (one pre-existing intermittent timeout, unchanged from Plan 02)
## Tasks Completed
| Task | Description | Commit |
|------|-------------|--------|
| 1 | Prettier reformat — single isolated mechanical commit | 982438d |
| 2 | Add Format check CI step; remove stale no-op lint comment | 0422406 |
| 3 | Green-baseline assertion (SC-3) | (verification only) |
## Reformat Diff Stat (Task 1 Evidence)
```
398 files changed, 19125 insertions(+), 16457 deletions(-)
```
Files reformatted span: `apps/api/src/**`, `apps/api/tests/**`, `apps/pwa/src/**`, `apps/pwa/e2e/**`, root config files (`eslint.config.js`, `pnpm-workspace.yaml`, `CLAUDE.md`, `README.md`, `docs/**`), `.planning/**`, `.claude/**`. Prettier 3.8.4 with `.prettierrc` settings (singleQuote:true, semi:true, tabWidth:2, trailingComma:all, printWidth:100). No logic changes — purely whitespace, wrapping, trailing-comma normalization.
## CI Step Ordering After Task 2
Final `fast-checks` job step order:
1. `actions/checkout@v4`
2. `actions/setup-node@v4` (Node 22)
3. Enable pnpm
4. Install dependencies (`pnpm install --frozen-lockfile`)
5. **Lint** (`pnpm lint`)
6. **Format check** (`pnpm format:check`) — NEW
7. Typecheck (`pnpm typecheck`)
8. PWA unit tests (`pnpm --filter @familysync/pwa test`)
Stale 3-line comment ("lint is currently a no-op…") removed. Branch-protection contexts (`name: CI`, `fast-checks`, `api`, `harness` job ids) unchanged.
## Green Baseline Exit Codes (SC-3)
| Command | Exit Code |
|---------|-----------|
| `pnpm lint` | 0 |
| `pnpm format:check` | 0 |
| `pnpm typecheck` | 0 |
| `pnpm --filter @familysync/pwa test` (191 tests) | 0 |
| `pnpm --filter @familysync/api test` (dev DB) | 1* |
*API integration tests: 237/238 pass with the dev MariaDB running. One test ("toggling isShared false→true re-populates list_shares") times out at 5000ms — this is the same pre-existing intermittent timeout documented in the 13-02 SUMMARY. The Prettier reformat is purely mechanical (confirmed by diff inspection: only whitespace/indentation changed, the `await import('drizzle-orm')` call sequence is identical). Not a regression.
## SC-2 Note for Operator
The CI lint and format:check steps now genuinely block PRs to main. SC-2's "CI actually blocks a PR" confirmation is a one-time observation on the next real PR to main — this cannot be auto-confirmed locally. Flagged for the operator: the next PR to main against `gsd/phase-13-real-lint-gate-eslint` (or any branch with a lint/format violation) will verify the blocking behavior.
## Deviations from Plan
None — plan executed exactly as written.
Task 1 ran `pnpm format` which also reformatted `.planning/**` and `.claude/**` files (not excluded by `.prettierignore`). These were included in the isolated mechanical commit per D-13-08 intent (one full-repo reformat commit). The plan listed `apps/api/src/**`, `apps/pwa/src/**` etc. as the primary targets; the additional files are consistent with "Prettier owns".
## Known Stubs
None.
## Threat Flags
None. No new network endpoints, auth paths, file access patterns, or schema changes. The ci.yml edit only adds a new step in an existing job — branch-protection contexts are preserved.
## Self-Check: PASSED
Files verified:
- `.gitea/workflows/ci.yml` — contains "Format check" step + "pnpm format:check" + "fast-checks:" — FOUND
- `.planning/phases/13-real-lint-gate-eslint/13-03-SUMMARY.md` — FOUND (this file)
Commits verified:
- `982438d` — FOUND (style(13-03): apply Prettier formatting across repo)
- `0422406` — FOUND (feat(13-03): add Format check CI step; remove stale no-op lint comment)
Green baseline verified:
- `pnpm lint` — exit 0
- `pnpm format:check` — exit 0
- `pnpm typecheck` — exit 0
- `pnpm --filter @familysync/pwa test` — 191/191 passing