diff --git a/.env.example b/.env.example index d809bbdee..1de010c8e 100644 --- a/.env.example +++ b/.env.example @@ -4,10 +4,10 @@ # Copy this file to .env and fill in the values. # $ cp .env.example .env # -# Required variables: DATABASE_URL or POSTGRES_PASSWORD, SESSION_SECRET, +# Required variables: DATABASE_URL or POSTGRES_PASSWORD, # ENCRYPTION_KEY, API_TOKEN_HMAC_KEY # -# Generate the three secrets with: +# Generate the two secrets with: # $ openssl rand -hex 32 # any UNIX shell # $ node -e 'console.log(require("crypto").randomBytes(32).toString("hex"))' # @@ -44,9 +44,6 @@ NODE_ENV="development" # ----------------------------------------------------------------------------- # Required Secrets — generate with `openssl rand -hex 32` # ----------------------------------------------------------------------------- -# Signs session cookies. Rotating it logs out everyone. -SESSION_SECRET="REPLACE-WITH-OUTPUT-OF-openssl-rand-hex-32" - # AES-256-GCM key for encrypting Withings tokens, GitHub PATs, AI provider # keys, and VAPID private keys at rest. Rotate carefully — old ciphertexts # need re-encryption. diff --git a/.github/workflows/no-todo-markers.yml b/.github/workflows/no-todo-markers.yml new file mode 100644 index 000000000..f72470531 --- /dev/null +++ b/.github/workflows/no-todo-markers.yml @@ -0,0 +1,39 @@ +name: No TODO markers + +on: + push: + branches: [main, develop] + pull_request: + branches: [main, develop] + +permissions: + contents: read + +jobs: + # Product code is currently zero TODO / FIXME / XXX / HACK markers and + # the convention is to keep it that way — open a real follow-up issue + # instead of leaving a marker in the source. This gate fails fast if a + # future contributor reintroduces the pattern. + grep: + name: Forbidden marker grep + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v6 + + - name: Scan src/ for TODO/FIXME/XXX/HACK markers + run: | + # Tests are exempt — they can legitimately reference an outstanding + # ticket via a TODO; `src/generated/` is third-party output from + # `prisma generate` and is regenerated on every db:generate. + if grep -rEn "\b(TODO|FIXME|XXX|HACK)\b" src/ \ + --include='*.ts' \ + --include='*.tsx' \ + --exclude-dir='__tests__' \ + --exclude-dir='generated' \ + --exclude='*.test.ts' \ + --exclude='*.test.tsx'; then + echo "::error::TODO/FIXME/XXX/HACK markers detected in product code — open a follow-up issue instead." + exit 1 + fi + echo "::notice::No forbidden markers in product code." diff --git a/.planning/round-audit-code-quality.md b/.planning/round-audit-code-quality.md new file mode 100644 index 000000000..04c99bb13 --- /dev/null +++ b/.planning/round-audit-code-quality.md @@ -0,0 +1,290 @@ +# Code Quality + Documentation Audit — 2026-05-17 + +## Executive summary + +The repo is in unusually good shape for its size: `tsc --noEmit` and `eslint` +both pass clean, there are zero `TODO`/`FIXME`/`XXX`/`HACK` markers in product +code, zero empty `catch` blocks outside one inline `