veza/veza-backend-api/internal
senke 87e1e0a5ab fix(backend): synchronous Hub.Shutdown to eliminate goleak failures
The chat Hub's Shutdown() only closed the done channel and returned
immediately, racing against goleak.VerifyNone in TestHub_*. Worse, the
broadcast saturation path spawned a fire-and-forget goroutine to send
on the unregister channel, which could leak if Run() exited mid-flight.

Fix:
- Add `stopped` channel closed by Run() on exit; Shutdown() waits on it.
- Buffer `unregister` (256) and replace the anonymous goroutine with a
  non-blocking select. Worst case the client is reaped on its next
  failed broadcast attempt.
- handler_messages_test.go's setupTestHandler started a Hub but never
  shut it down, leaking Run() goroutines into the hub_test.go run that
  followed. Register t.Cleanup(hub.Shutdown) and close the gorm sqlite
  connection too — the connectionOpener goroutine was the secondary leak.
2026-04-14 11:44:27 +02:00
..
api fix(backend): add password change endpoint and 2FA migration 2026-03-25 23:39:28 +01:00
common v0.9.2 2026-03-05 19:27:34 +01:00
config fix(backend): sync config tests with new prod-required fields 2026-04-14 11:41:54 +02:00
core fix: stabilize builds, tests, and lint across all stacks 2026-04-05 16:48:07 +02:00
database v0.9.4 2026-03-05 23:03:43 +01:00
dto Phase 2 stabilisation: code mort, Modal→Dialog, feature flags, tests, router split, Rust legacy 2026-02-14 17:23:32 +01:00
elasticsearch feat(v0.10.2): Recherche fulltext Elasticsearch - F361-F365 2026-03-09 10:13:18 +01:00
email STABILISATION: phase 3–5 – API contract, tests & chat-server hardening 2025-12-06 17:21:59 +01:00
errors v0.9.8 2026-03-06 19:13:16 +01:00
eventbus feat: backend — config, handlers, services, logging, migration 2026-03-23 15:46:57 +01:00
features adding initial backend API (Go) 2025-12-03 20:29:37 +01:00
handlers feat(e2e): add 303 deep behavioral tests + fix WebSocket + lint-staged 2026-04-06 13:35:26 +02:00
infrastructure v0.9.4 2026-03-05 23:03:43 +01:00
integration test(chat): Sprint 5 -- unit tests, E2E tests, feature parity validation 2026-02-22 20:49:32 +01:00
interfaces adding initial backend API (Go) 2025-12-03 20:29:37 +01:00
jobs fix(v0.12.6.1): remediate remaining 15 MEDIUM + LOW pentest findings 2026-03-12 06:13:38 +01:00
logging feat: backend — config, handlers, services, logging, migration 2026-03-23 15:46:57 +01:00
metrics v0.9.4 2026-03-05 23:03:43 +01:00
middleware feat: backend, stream server & infra improvements 2026-03-18 11:36:06 +01:00
models feat: backend — config, handlers, services, logging, migration 2026-03-23 15:46:57 +01:00
monitoring v0.9.4 2026-03-05 23:03:43 +01:00
pagination v0.9.8 2026-03-06 19:13:16 +01:00
recovery chore(v0.102): consolidate remaining changes — docs, frontend, backend 2026-02-20 13:02:12 +01:00
repositories fix(v0.12.6.1): remediate 2 CRITICAL + 10 HIGH + 1 MEDIUM pentest findings 2026-03-12 05:40:53 +01:00
repository fix(v0.12.6.1): update in-memory UserRepositoryImpl to accept context.Context 2026-03-12 05:47:47 +01:00
resilience chore: consolidate CI, E2E, backend and frontend updates 2026-02-17 16:43:21 +01:00
response fix: stabilize builds, tests, and lint across all stacks 2026-04-05 16:48:07 +02:00
security refactor(backend): replace 40 fmt.Printf calls with zap structured logging 2026-02-22 17:44:38 +01:00
services fix: stabilize builds, tests, and lint across all stacks 2026-04-05 16:48:07 +02:00
shutdown incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
testutils v0.9.4 2026-03-05 23:03:43 +01:00
tracing incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
types feat(profile): add profile privacy toggle (B3) 2026-02-20 15:10:02 +01:00
upload [INT-015] int: Add file upload format standardization 2025-12-25 15:40:01 +01:00
utils fix(v0.12.6): apply all pentest remediations — 36 findings across 36 files 2026-03-14 00:44:46 +01:00
validators feat(v0.13.3): complete - Polish Sécurité Avancée 2026-03-13 10:09:01 +01:00
websocket fix(backend): synchronous Hub.Shutdown to eliminate goleak failures 2026-04-14 11:44:27 +02:00
workers feat: backend, stream server & infra improvements 2026-03-18 11:36:06 +01:00