11 Risks and Technical Debt

Current Risks

Architecture Risks

RiskProbabilityImpactMitigation
Elixir/OTP insufficient for middleware elimination thesisMediumHighSilver-tier loadtest validates before release; Redis optionally addable
OIDC-only excludes too many potential usersLowMediumDeliberate scope decision for target audience with existing IdP
CRDT consistency edge cases in Horde during netsplitLowHighSingle-node MVP; cluster tested in Phase 2 before enabling libcluster
Cryptographic deletion not legally recognizedLowHighLegal review pre-MVP; fallback: physical pseudonymization

Open Architecture Decisions

ADRBlocking FeatureImpact
ADR-010 (FTS strategy)POST /_matrix/client/v3/search not implementedUsers cannot search message history
ADR-011 (Managed E2EE)E2EE stubs only (keys/upload acknowledged, not stored)No end-to-end encryption

Security Risks

FindingStatusReference
Token invalidation gap - short-lived tokens not revoked until OIDC expiryAccepted risk (MVP)Story 7-26
Compliance session revoke CSRF (fixed)ResolvedStory 7-16b, Kassandra HIGH-1
Moderation caller_id from request body (fixed)ResolvedStory 7-32, SEC Gate 2 HIGH
Safari re-login lands on #/welcome (Dex cached id_token + Safari 302 cache)ResolvedStory 11-7

Technical Debt

Known Deferred Work

ItemDeferred InPriority
Real alias storage (PUT /directory/room/{alias} currently a stub)Epic 7Medium
Room upgrade implementation (POST /rooms/{id}/upgrade returns 501)Epic 7 (resolved Story 9-27)Resolved
GET /joined_rooms returns empty list (clients use /sync instead)Epic 7Low
Multi-instance dashboard for hostersEpic 7 retrospectiveGrowth
Apple/Google push notificationsPRD §Growth FeaturesGrowth
S3 media backendPRD §Growth FeaturesGrowth
Matrix federation protocolPRD §Phase 3 VisionVision

Performance Gaps

GapCurrent StateTarget
N+1 profile lookups in GetJoinedMembersAccepted for MVPBatch query (Phase 2)
load_factor always returns 1.0MVP placeholderReal calculation (Phase 2)
AIMD drain strategy not yet implementedLinear only (MVP)Phase 2

Test Coverage Gaps

GapStatus
Silver-tier loadtestPlanned post-MVP
Playwright E2E for all Admin UI pagesCoverage in progress (Epic 7–8)
Gherkin coverage for all Matrix endpointsPartial (traceability matrix at epic end)

Monitoring Recommendations

Items that should be set up before production:

  • Prometheus alerts for gRPC stream GELB/ROT status transitions
  • Alert on message_buffer table row count exceeding threshold
  • Alert on message_dead_letter table non-zero count
  • Audit log retention cron alert if purge job fails

Source: _bmad-output/implementation-artifacts/sprint-status.yaml, deferred items and security findings; _bmad-output/planning-artifacts/prd.md, §Risk Mitigations; Story 11-7 (Safari re-login bug resolved: nonce replay prevention, Cache-Control: no-store, denylist check at login)