feat: password reset, email change, per-owner names and full audit pass #66

Merged
eliott merged 1 commit from fix/user-guide-bugs into develop 2026-10-11 18:54:07 +02:00
Owner

Summary

User guide fixes (password reset, email change, per-owner unique names) plus a full audit pass of the API and its infra.

Data integrity

  • Export: keyset paging inside one repeatable-read read-only snapshot, film ISOs included, stream backpressure
  • Import: keeps shoot doneAt, isPinned, createdAt and frame createdAt; stricter frame number / color / icon validation
  • Frames: delete renumbers by current number with the row locked in the tx; moving into a done shoot is rejected and the source shoot is recompacted; PATCH no longer returns the raw pg result
  • PATCH: explicit null on required fields is a 400, empty body is a no-op, 23502 maps to 400
  • Camera format and film iso references are ownership-checked
  • Changelog: future entries hidden, ms cursor precision, capped for new users

Performance

  • Migration 0027: indexes on FK and updated_by columns, partial global-row indexes, shoot_list_idx matching the list ORDER BY
  • Shoot list counts frames only for page rows, stable id tiebreaker, X-Total-Count on all=true lists
  • pg pool limits + statement timeout (raised inside import/export), async zip inflate, cached crypto keys

Infra

  • .env excluded from the image; multi-stage, non-root Dockerfile with NODE_ENV=production
  • Graceful shutdown, advisory-locked migrate + seed, /health + compose healthcheck
  • trust proxy, strict rate limits on /sign-in/username and other credential endpoints, compression
  • Log rotation, Postgres tuning, dev volume path fix; pinned Node/pnpm/actions; check-only lint

Version stays 0.10.0 (already bumped on this branch, minor). Changelog v0.10.0 extended with the user-facing fixes.

Deploy notes

  • Rotate BETTER_AUTH_SECRET, DB and SMTP passwords if an older image ever left the host (.env was baked in)
  • Reverse proxy must be exactly one hop and append X-Forwarded-For

Test plan

  • tsc, eslint, 141 unit + 148 integration tests pass; drizzle-kit reports no drift; image builds and runs as node
  • Manually verified locally in the browser
## Summary User guide fixes (password reset, email change, per-owner unique names) plus a full audit pass of the API and its infra. ### Data integrity - Export: keyset paging inside one repeatable-read read-only snapshot, film ISOs included, stream backpressure - Import: keeps shoot `doneAt`, `isPinned`, `createdAt` and frame `createdAt`; stricter frame number / color / icon validation - Frames: delete renumbers by current number with the row locked in the tx; moving into a done shoot is rejected and the source shoot is recompacted; PATCH no longer returns the raw pg result - PATCH: explicit `null` on required fields is a 400, empty body is a no-op, `23502` maps to 400 - Camera `format` and film `iso` references are ownership-checked - Changelog: future entries hidden, ms cursor precision, capped for new users ### Performance - Migration `0027`: indexes on FK and `updated_by` columns, partial global-row indexes, `shoot_list_idx` matching the list ORDER BY - Shoot list counts frames only for page rows, stable `id` tiebreaker, `X-Total-Count` on `all=true` lists - pg pool limits + statement timeout (raised inside import/export), async zip inflate, cached crypto keys ### Infra - `.env` excluded from the image; multi-stage, non-root Dockerfile with `NODE_ENV=production` - Graceful shutdown, advisory-locked migrate + seed, `/health` + compose healthcheck - `trust proxy`, strict rate limits on `/sign-in/username` and other credential endpoints, compression - Log rotation, Postgres tuning, dev volume path fix; pinned Node/pnpm/actions; check-only `lint` Version stays `0.10.0` (already bumped on this branch, minor). Changelog `v0.10.0` extended with the user-facing fixes. ### Deploy notes - Rotate `BETTER_AUTH_SECRET`, DB and SMTP passwords if an older image ever left the host (`.env` was baked in) - Reverse proxy must be exactly one hop and append `X-Forwarded-For` ## Test plan - tsc, eslint, 141 unit + 148 integration tests pass; drizzle-kit reports no drift; image builds and runs as `node` - Manually verified locally in the browser
User guide fixes:
- password reset and email change flows, per-owner unique names (0026)
- changelog v0.10.0 entry

Audit fixes:
- export: keyset paging in one repeatable-read snapshot, include film ISOs,
  backpressure; import keeps doneAt/isPinned/createdAt, stricter validation
- frames: renumber by current number on delete, lock inside the tx, move
  into done shoot rejected, source shoot recompacted, PATCH returns no body
- explicit null on required PATCH fields is a 400, empty PATCH is a no-op,
  23502 mapped to 400; camera format and film iso ownership validated
- changelog hides future entries, ms cursor precision, capped for new users
- 0027: FK, updated_by, global-row and shoot list indexes; shoot list counts
  frames only for page rows; X-Total-Count on all=true lists
- pg pool limits and statement timeout, async zip inflate, cached crypto keys
- infra: .env excluded from image, multi-stage non-root Dockerfile,
  NODE_ENV=production, graceful shutdown, advisory-locked migrations,
  /health + compose healthcheck, trust proxy, strict auth rate limits,
  compression, log rotation, pinned Node/pnpm/actions, check-only lint
eliott merged commit 7f84c054d1 into develop 2026-10-11 18:54:07 +02:00
eliott deleted branch fix/user-guide-bugs 2026-10-11 18:54:07 +02:00
Sign in to join this conversation.
No reviewers
No labels
run-ci
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
RollNote/rollnote-api!66
No description provided.