PR J: Redis-backed Event Bus broker (feature-flagged) #14

Open
nsatoshi wants to merge 1 commits from devin/1776881249-pr-j-redis-event-bus into main

1 Commits

Author SHA1 Message Date
Devin
bf12f94250 Redis-backed Event Bus broker (feature-flagged via REDIS_URL)
Some checks failed
CI / Frontend Lint (pull_request) Failing after 7s
CI / Frontend Type Check (pull_request) Failing after 6s
CI / Frontend Build (pull_request) Failing after 7s
CI / Frontend E2E Tests (pull_request) Failing after 8s
CI / Orchestrator Build (pull_request) Failing after 6s
CI / Contracts Compile (pull_request) Failing after 7s
CI / Contracts Test (pull_request) Failing after 6s
Code Quality / SonarQube Analysis (pull_request) Failing after 19s
Code Quality / Code Quality Checks (pull_request) Failing after 4s
Security Scan / Dependency Vulnerability Scan (pull_request) Failing after 5s
Security Scan / OWASP ZAP Scan (pull_request) Failing after 3s
Closes gap-analysis v2 §7.3 and §10.3.

- New services/eventBusBroker.ts: per-process singleton with unique
  instanceId; subscribes to a Redis pub/sub channel (default
  ccombo:events) and re-emits inbound records on the in-process
  EventEmitter. Outbound envelopes carry the instanceId so the
  originating replica drops its own echo.
- eventBus.publish() hands every persisted record to the broker after
  the local emit, so same-process SSE subscribers see zero change
  while remote-replica subscribers now receive every event.
- When REDIS_URL is unset the broker is strictly inert (no connect,
  no publish) — single-process behaviour is preserved byte-for-byte.
- 3 unit tests for feature-flag semantics; full suite 83/83 green.
- Live Redis behaviour will be covered by the Testcontainers suite
  in PR Q.
2026-04-22 18:09:02 +00:00