wulf-pulse/lib
lorentz e057255f4f fix(24): address code-review findings — PATCH identity guard, empty-array tombstone, health-check timeout, record-key normalization
Two critical issues from the post-phase code review:

- PATCH /api/route53/zones/[zoneId]/records/[recordId] never verified the
  request body's name/type/setIdentifier matched the record identified by
  the URL. A mismatch would silently UPSERT a brand-new AWS recordset
  (leaving the original live and untouched) while corrupting the mirror's
  record_key invariant. Now rejects with 400 if any of those three fields
  differ from the existing record — renaming/retyping is delete-plus-create,
  not an update.

- route53-sync-service.ts's syncZones()/syncRecords() tombstone queries used
  "id <> ALL(seenIds)" style queries with no empty-array guard — a
  successful-but-empty AWS response would soft-delete every previously
  synced zone/record in one shot. Same bug class already fixed in
  pax8-sync-service.ts; now guarded the same way here.

Two smaller fixes:

- checkRoute53()'s AWS auth probe had no timeout, unlike every other
  integration's liveCheck() (8s AbortController). Added the same bound via
  the SDK's abortSignal option.
- buildRecordKey() relied on every caller to pre-normalize name/type case
  before calling it. Now normalizes internally (lowercase name, uppercase
  type) so the record_key invariant holds regardless of caller discipline.

Full REVIEW.md findings in 24-REVIEW.md. Two remaining Warnings (alias
records un-editable/undeletable, no admin-UI surface for route53_audit_log)
deliberately left as backlog items for a follow-up phase — out of scope for
a post-execution fix pass.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-05 23:15:27 -04:00
..
hooks feat(07.1-04): add useUserTimezone client hook 2026-05-07 07:52:16 -04:00
services fix(24): address code-review findings — PATCH identity guard, empty-array tombstone, health-check timeout, record-key normalization 2026-08-05 23:15:27 -04:00
types test(24-01): add failing test for Route 53 credential factory 2026-08-05 19:24:28 -04:00
utils fix(quick-260521-foj-01): widen Companies full sync to fetch all companies 2026-05-21 11:21:48 -04:00
auth-client.ts feat: add authentication, user management, and admin features 2026-01-31 12:43:14 -05:00
auth-utils.ts feat(design): nav/visual overhaul — brand layer, /status route, KPI dashboard, TanStack DataTable 2026-05-03 09:33:13 -04:00
auth.ts feat(09-01): add theme column to user table + Better Auth additionalField 2026-05-10 07:22:26 -04:00
bootstrap.ts fix: "user" table writes use "updatedAt" not updated_at 2026-05-10 23:03:36 -04:00
permissions.test.ts fix(auth): stop hasPermission crashing for non-admin ("user") roles 2026-07-12 18:20:36 -04:00
permissions.ts feat(20-02): grant phishing approve+remediate to admin roles (D-02) 2026-07-16 10:43:18 -04:00
status-registry.ts feat(design): nav/visual overhaul — brand layer, /status route, KPI dashboard, TanStack DataTable 2026-05-03 09:33:13 -04:00
utils.ts Restructure: rename to Pulse and move app to root 2025-10-28 23:08:54 -04:00