CluPilotCloud/app
nexxo 28e681b9df fix(vpn): lock every hub mutation; resolve duplicate keys inside the lock
- ConfigureWireguard and RemoveWireguardPeer mutate the hub too, and were not
  taking the lock, so a sync could still read the interface around them and
  write stale state. Both now hold wireguard:hub, which is what makes the
  read/mutation guarantee actually hold.
- The duplicate-key check ran before the allocation lock, so two concurrent
  creations with the same key both passed it and the loser hit the unique index
  as an unhandled 500. The check moved inside the lock, with the index kept as
  a caught backstop for any writer that does not take it — reproduced in a test
  by inserting a colliding row from within the allocation call.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-25 21:55:57 +02:00
..
Actions fix(auth/admin): atomic user+customer signup; Rule::in for country validation (comma-safe) 2026-07-25 18:33:09 +02:00
Console feat(engine): orchestrator core (state machine + tick + lock) 2026-07-25 09:54:52 +02:00
Http fix(security): match ADMIN_HOSTS case-insensitively; share test helpers 2026-07-25 20:56:26 +02:00
Livewire fix(vpn): lock every hub mutation; resolve duplicate keys inside the lock 2026-07-25 21:55:57 +02:00
Mail fix(admin): confirm maintenance delivery via MessageSent (retryable until sent); guard resend/cancel on derived state; fix flaky non-unique host wg_ip 2026-07-25 16:14:01 +02:00
Models fix(vpn): stop revoked accesses coming back and stale jobs undoing intent 2026-07-25 21:41:03 +02:00
Notifications fix(engine-b): default-deny firewall, disk-based capacity, synchronous credential mail 2026-07-25 12:39:15 +02:00
Providers fix(security): close the Livewire bypass of the admin host restriction 2026-07-25 20:50:22 +02:00
Provisioning fix(vpn): lock every hub mutation; resolve duplicate keys inside the lock 2026-07-25 21:55:57 +02:00
Services fix(vpn): stop revoked accesses coming back and stale jobs undoing intent 2026-07-25 21:41:03 +02:00
Support feat(admin): VPN access management with live peer state 2026-07-25 21:38:12 +02:00