wulf-pulse/lib
lorentz 633b48c3b2 fix(18-05): add own-campaign revalidation guard before create-new (CR-03)
Re-analyzing a single-report campaign (no sibling report exists yet)
fell through to "create new campaign" because every tier query
self-excludes the report's own row, so matchCampaignId stayed null and
the report's still-valid campaign was abandoned in favor of a
duplicate campaigns row sharing the same campaign_key.

Add a guard that runs only when no sibling matched and the report
already has campaign_id: recompute the report's current tier keys
once, look up its own campaign row, and reuse it (created:false) when
the stored campaign_key still matches. Falls through to create-new
unchanged when the campaign row is gone or the signal has genuinely
diverged. D-08 sibling upgrades are untouched (guard only runs when no
sibling matched).

- Tests A/B reproduce the exact CR-03 duplicate-campaign scenario and
  failed against the pre-fix code (confirmed during RED)
- Tests C/D guard the create-new no-regression and signal-diverged
  fall-through paths
2026-07-16 00:08:36 -04:00
..
hooks feat(07.1-04): add useUserTimezone client hook 2026-05-07 07:52:16 -04:00
services fix(18-05): add own-campaign revalidation guard before create-new (CR-03) 2026-07-16 00:08:36 -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(18-01): add phishing permission resource + role grants 2026-07-15 19:23:09 -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