GSD planning artifacts (.planning/**) are rewritten by tooling on every workflow run and are never hand-formatted. Including them in Prettier scope caused pnpm format:check to exit 1 on virtually every future PR, making the SC-3 green baseline impossible to hold. Add .planning/ to .prettierignore, mirroring the same rationale as dist/ and apps/api/src/db/migrations/. Real source docs (README.md, docs/**) remain in Prettier scope. No playwright-report/, test-results/, or coverage/ directories exist to ignore.
7.0 KiB
phase, plan, subsystem, tags, dependency_graph, tech_stack, key_files, decisions, metrics
| phase | plan | subsystem | tags | dependency_graph | tech_stack | key_files | decisions | metrics | |||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 13-real-lint-gate-eslint | 03 | lint-gate |
|
|
|
|
|
|
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 passingpnpm --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:
actions/checkout@v4actions/setup-node@v4(Node 22)- Enable pnpm
- Install dependencies (
pnpm install --frozen-lockfile) - Lint (
pnpm lint) - Format check (
pnpm format:check) — NEW - Typecheck (
pnpm typecheck) - 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 0pnpm format:check— exit 0pnpm typecheck— exit 0pnpm --filter @familysync/pwa test— 191/191 passing
Correction (post-verification)
Gap found: An independent re-run of pnpm format:check after the initial plan execution exited 1, not 0. Three GSD-managed files were not Prettier-formatted:
.planning/phases/13-real-lint-gate-eslint/13-03-SUMMARY.md.planning/ROADMAP.md.planning/STATE.md
Root cause: .planning/ was not in .prettierignore. GSD rewrites these planning docs on every workflow run (after every plan execution, state updates, roadmap sync, etc.) and never applies Prettier formatting to them. Including them in Prettier scope means the format gate fails on virtually every future PR, making SC-3 ("baseline gate ends green") impossible to hold in practice.
Fix applied: Added .planning/ to .prettierignore with an explanatory comment. This mirrors the existing rationale for dist/ and apps/api/src/db/migrations/ — tool-generated output that must not gate Prettier. Real source docs (README.md, docs/**) remain in Prettier scope; they were reformatted in commit 982438d and stay formatted.
No other generated paths required ignoring — playwright-report/, test-results/, and coverage/ directories do not exist on this tree.
Verified exit codes after fix:
| Command | Exit Code |
|---|---|
pnpm format:check |
0 |
pnpm lint |
0 |
pnpm typecheck |
0 |
Commit: fix(13-03): exclude .planning from Prettier so the format gate stays green