wulf-pulse/lib
lorentz 6e8c78b8d2 fix(23-06): capture actionId in auto-post audit payload, guard manual re-approval of acknowledge_user
23-06-REVIEW.md found two real defects in the just-merged idempotency fix:
- CR-01: autoPostAcknowledgment's audit payload omitted actionId, which the
  campaign-detail API requires to derive completedAt — every auto-posted
  acknowledge_user row rendered a null completion date in the Action Area UI.
- CR-02: the manual approve/remediate path had no server-side guard against
  re-approving acknowledge_user for a campaign that already got auto-posted —
  only a client-side UI check prevented the exact duplicate-note bug 23-06
  was chartered to close, reachable via a direct API call.

Fixes both: capture RETURNING id from the insert and include it in the audit
payload; add an existence check in approveRemediationActions that rejects
acknowledge_user when already posted for the campaign.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W6RuWdiUiXrPK6FLBHjtpY
2026-07-16 23:29:11 -04:00
..
hooks feat(07.1-04): add useUserTimezone client hook 2026-05-07 07:52:16 -04:00
services fix(23-06): capture actionId in auto-post audit payload, guard manual re-approval of acknowledge_user 2026-07-16 23:29:11 -04:00
types feat(appgate): add AppGate SDP integration health check and sync service 2026-07-11 09:43:48 -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