11 Risks and Technical Debt

Current Risks

Architecture Risks

RiskProbabilityImpactMitigation
Elixir/OTP insufficient for middleware elimination thesis——Resolved 2026-06-22: full-elixir-stack/grpc-removal removed the Go Gateway and gRPC boundary entirely (ADR-019/020/021) — the thesis validated in production, not just loadtest. Silver-tier loadtest remains a pre-release gate for the resulting single-node Elixir server.
OIDC-only excludes too many potential usersLowMediumDeliberate scope decision for target audience with existing IdP
CRDT consistency edge cases in Horde during netsplitLowHighSingle-node deployment today; cluster tested in Phase 2 before enabling libcluster
Cryptographic deletion not legally recognizedLowHighLegal review pre-release; fallback: physical pseudonymization

Open Architecture Decisions

ADRBlocking FeatureImpact
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
Admin route source classification could leak email into operational logs (fixed pre-ship)ResolvedStory war-room-mode, security-review-driven fix
Bootstrap-mode OIDC scope ignored the operator's Step 3 config — providers needing a non-openid scope to expose the admin claim could never complete bootstrapResolvedbugfix-bootstrap-scope-ignored, 2026-07-09
Admin-logs source-classification: 1 MEDIUM accepted non-blocking after a fix attempt was reverted for an architecture conflictAccepted riskStory admin-logs-monitoring-view, Kassandra review
To-device messaging (/sendToDevice, Kassandra review of story to-device-messaging), accepted residuals: (1) a full queue evicts its OLDEST messages silently (the sender is never told, no 429), so a flooded device can lose old verification messages; bounded by the per-device, per-user and per-sender budgets, the loss is the intended price of not letting one sender block others; (2) the rate limit buckets are node-local: N x the documented limit in a cluster; (3) the recipient restriction (a shared JOINED room or an own device) is a client compatibility cost: a user you share no joined room with cannot be reached by to-device messages (Element and FluffyChat verify in the room); (3a) only MANY senders, each below its share, can still evict a victim's older messages once the shares add up beyond the queue (fair device- and user-level eviction, per-sender shares 100 messages / 1 MiB per device and 200 / 4 MiB per user, 4000 / 16 MiB over all recipients): a single flooder or two colluding co-members cannot; the worst-case database footprint is bounded per sender (16 MiB) and per recipient (32 MiB), so (users sharing a room) x 32 MiB in total, documented in 07-deployment; (4) the * fan-out is truncated silently at 100 targets and 1 MiB of rows per request (the targets beyond are dropped like an unreachable one); (4a) one request can wake (and make rebuild its sync) up to 100 long polls of a victim's devices (bounded by the fan-out cap, the budgets and the rate limit; only users who share a joined room can do it); (4b) the node-wide send slots (6) can be held by colluding accounts (4 per user): a recipient-independent starvation of sends on that node, accepted, retried with 429 (the 2 s statement timeout is per statement: a send runs about a dozen statements in two transactions (the rows, then the soft eviction), so a slot is held for the whole run, at worst a multiple of 2 s, and a node has 6); the byte-cost bucket is node-local like the rate limit (N x in a cluster); (5) RLS on both tables is USING (true) (accepted, as the sibling tables: isolation rests on the user_id predicates); (6) E2EE rooms stay disabled (ADR-011), the queue is transport only; (7) no browser / Element end-to-end test in the story (the verification flow needs Dex, Element Web and two devices; the API level is covered through the full router with real sessions and rooms): a MANUAL Element Web <-> FluffyChat self-verification (SAS) check and a /sync long-poll latency check with a real client are a release checkbox; (8) the acknowledgement is a position in the token, not a list of ids: a response's position never covers a row it did not carry (it is the highest stamp of the rows it carried, else the since position; a sync that lost the stamp race with an overlapping sync of the same since carries only what is stamped), but two syncs of the SAME device in flight at once (a client does not do that) can still let a LATER position cover a message that only the other, lost response carried (see 08-concepts); (9) follow-ups, not part of this story: a sync decodes up to 1 MiB of stored JSON and encodes it again (inserting the stored canonical JSON with Jason.Fragment is the follow-up; the only writer is the send), and the per-queue counts and bytes of the eviction are re-aggregated per send (a running counter per queue would remove that cost); (10) accepted notes: the TTL purge walks ctid batches, the purge job shares the oauth_cleanup Oban queue, and the token position is a compare-and-set free read (no CAS on the token); the delivery and stamp sequences (to_device_delivery_seq, the stream_pos identity) restart low after a down+up of migration 000059 or a restore from an old backup (operator note in 07-deployment: set them above the table maxima first); (11) a send (a * or an explicit device entry) that meets a concurrent delete of one of the target devices waits for that delete at most the 100 ms lock_timeout (the send takes FOR KEY SHARE on the device rows, the delete locks the row first) and is then answered 429, the client retries with the same txn id (nothing is stored, the id is not burnt); the same wait also hits a send to a device whose OAuth token rotates at that moment (up to 100 ms, then 429): a weak "device active now" timing signal, only for joined co-members; (12) CLOSED in cycle 4 (was the reverse direction of the device-delete race): a send takes FOR KEY SHARE on the target devices rows only around the INSERT (from the target lookup to the commit of its first transaction; no eviction runs inside that window), so overlapping sends can no longer starve the victim's OAuth token rotation, /oauth2/revoke, DELETE /devices and the admin revoke past their 300 ms lock_timeout; the soft eviction runs in a second, separate transaction after the commit without any lock on devices; residual: the caps are momentarily soft (a queue can exceed its caps until the sender's own second transaction has finished, concurrent senders add up) and a failed or timed-out eviction leaves the excess until an eviction succeeds (the next send to that queue) or the 7-day purge (the second transaction is all-or-nothing: one failing statement rolls back the other six; the send itself is answered 200 and its transaction id is recorded); (12a) the FOR KEY SHARE window is now two indexed lookups, the INSERT and the commit: starving a victim's 300 ms bounded FOR UPDATE needs an unbroken chain of overlapping windows on the victim's row (about 30+ sends per 300 ms), i.e. dozens of colluding co-members at 6 slots per node under the 60 per minute (burst 30) per-user tier, not reachable by one account (optional hardening: FOR KEY SHARE SKIP LOCKED); (12b) a failed phase 2 leaves the excess until the next successful eviction or the purge (possible later hardening: the purge worker also runs the sender-total and user caps); (13) the per-sender total (4000 messages / 16 MiB) is a SOFT cap: it is "16 MiB + the in-flight fan-out" (concurrent sends, 4 per user and N nodes, up to 1 MiB each, and rows another transaction holds and SKIP LOCKED skips can leave the sender above the cap until its next send; about 4N MiB + the locked rows), no cross-user effect; (14) follow-up: a hot 200 loop after a failed or empty-while-pending delivery (while a row is pending the long poll has timeout 0 and the answer is an empty to_device at once, so a client re-syncs without backoff; bounded by the sync rate tier and the 2 s statement timeout, no data loss, no oracle): a node-local per-device cooldown of 1-2 s, or let the long poll wait min(timeout, 2 s); (15) DeviceKeyStore.delete_device/2 is all-or-nothing and silent (the caller sees :ok even when the transaction failed; its only caller is the own device after UIA, the TTL job cleans a leftover queue): accepted.LowAccepted
Device-key directory (/keys/claim, /keys/changes, device_lists, story device-key-directory), accepted residuals: (1) the rate buckets are node-local (N x the limit in a cluster); the per-target buckets are keyed by a SHA-256 digest of the caller-chosen user and device ids (fixed size, never a sub-binary of the request body: Kassandra finding F1 of 2026-11-02, an ETS key that referenced the body pinned up to 1000 request bodies) and are created only after the caller buckets paid (a request refused there creates no row), so the rows one account can create are bounded by its targets budget (600 targets per minute, burst 1000; a refusal in the second stage keeps the first stage tokens spent, which never depends on the state of a target) and by the one hour idle sweep; GET /keys/changes has a per-user tier keys_changes (60 per minute, burst 20); (2) the claim restriction (own devices and users sharing a joined room) is stricter than the spec and Element's DM pre-check, which queries users without a shared room, then creates the DM unencrypted (harmless, ADR-011); a shared-room attacker can drain at most 5 + 10 per hour keys of one device; (3) left can over-report a user who shared a room with the caller only at another time (never under-reports a real loss in /sync, whose end token is the current position; a /keys/changes window with an old to that ends between that user's leave and the caller's own later leave reports the user one window later) and the departure of an ERASED user is not reported; (4) positions are drawn at commit under one global advisory lock, so key and membership writes wait for each other's commit for an instant (never while a client thinks) and a long running commit would delay the others; (5) a change that arrives during a parked long poll is delivered with the next response (no wake-up); (6) POST /keys/query restriction, cross-user signatures and signature verification: DONE in the follow-up story key-query-hardening (REQ-2026-014, see the row below); user_signing_keys for the owner only (decision D1 of the story) is DONE in this story and pinned by device_key_directory_d1_optional_test.exs; (7) a fallback key stored before migration 000060 has no key id and is claimed as <algorithm>:fallback until the client rotates it; (8) the request logger captures no body of keys/claim and keys/upload (and, since key-query-hardening, none of keys/query and keys/signatures/upload); (9) claimed one-time-key rows are KEPT (claimed_at set, key_json kept: store-once, so a consumed key id can never be handed out again), so device_one_time_keys grows with every claim until the device is deleted (a prune of claimed rows past an age that keeps key_id as a tombstone is a possible follow-up); (10) the GDPR erasure does not touch room_members: a later membership change of an erased user (kick, leave) re-creates device_list_changes rows for the erased user id, which the sweep of 07-deployment removes again (run it periodically); (11) rolling deploy: identity-key and cross-signing uploads served by OLD nodes are not stamped into the stream (only the room_members trigger is node independent), so peers learn of such a change only with the next stamped change of that user; (12) the first sync after the deploy with a token that has no .d group lists every shared user (with auto-join rooms that is every user) for every device, answered at once: an N x N /keys/query burst from the clients, which is the price of the conservative answer; (13) the device-list position of a sync token moves up to the highest visible position read before the two stream reads (decision D11), so a quiet device does not rescan old rows; the cost of an incremental sync still grows with the stream rows above the token, not with their number overall.Accepted riskStory device-key-directory, oracle context and ## Decisions D1-D20
Key query hardening (/keys/query, /keys/signatures/upload, story key-query-hardening, REQ-2026-014), accepted residuals: (1) the restriction (the caller and users who share a room in which both are joined) is stricter than the spec; Element's DM pre-check queries invitees, finds no keys and creates the DM unencrypted (harmless while rooms stay unencrypted, ADR-011); allowing a pending invitation is an owner option; (2) the tier keys_signatures (60 per minute, burst 20 per user) is node-local (N x the limit in a cluster) and keyed by the authenticated user id only; the other bounds are per request (200 signed objects, 4 signatures by the caller per object, 1000 queried users) and the body-size cap, so one request costs at most 800 Ed25519 verifications (200 objects x 4; only the caller's own signatures are ever verified) and about three statements per entry; (3) the rows of cross_signing_user_signatures are bounded by signers x the users they share a room with, but a signer who later leaves the shared rooms keeps its rows until the target replaces its master key or one of the two is erased (the rows are only ever shown to the signer, and only for a target the signer still shares a room with, because keys/query leaves other users out); (4) a signature is verified before the write locks are taken and the target is re-read and compared under the lock, but the signing key is not re-read: a self-signing / user-signing key replaced in that window can leave one signature by the previous key, which clients ignore (they verify against the current key); (5) R11 of the oracle (a server MUST NOT allow a device id equal to a cross-signing public key) is not enforced: the lookup of a key id tries the own device first; (6) a cross-user signature upload takes the target's `sync_global advisory lock as well as the signer's (Kassandra L3): a peer's key write or erasure can wait for the signer's short transaction (two row writes), contention not denial of service (the holds are short, the upload is rate limited, 200 objects and 4 signatures per object); no deadlock cycle was found because every writer takes the two locks in sorted order (first <= second) and the order devices -> device_keys -> stream row is unchanged; mitigation / monitoring: the 2 s statement timeout and the lock wait metrics of PostgreSQL (pg_locksadvisory waits), a rising count of statement timeouts onkeys/signatures/upload` is the signal.Accepted risk
Device-key directory, cluster-wide advisory lock (4760, 60), Kassandra finding F4 (LOW, 2026-11-02): ONE advisory lock serialises every membership and key write from the stamp trigger to COMMIT (positions of device_list_changes are drawn at commit), and every /sync without a .d group and every initial sync takes it as well. Impact: contention (writes and syncs wait for each other's commit), not a denial of service, because sync is rate limited and the lock is held only while the commit finishes. Mitigation: the rate limits, monitoring of lock waits (pg_locks with locktype = 'advisory', commit latency); option if it ever hurts: pg_try_advisory_xact_lock with a bounded retry instead of a blocking wait.Accepted riskStory device-key-directory, security review device-key-directory-security-review-2026-11-02
Server-side key backup (/room_keys/**, Kassandra review of story server-side-key-backup): resource exhaustion (CWE-400/770). Resolved by design: the request body is read only after the authentication (no pre-auth parse; an anonymous or junk-bearer request is 401 without its body being read) and after the write rate limit; a per-user aggregate byte budget of 64 MiB over all live versions (every row costs its room and session id bytes + 128 bytes besides session_data; net of replacements, decided under the advisory lock); the bulk reads (GET /keys, GET /keys/{room}) have their own rate-limit bucket (30 per minute, burst 3), at most ONE in flight per user and TWO per node (:room_keys_max_concurrent_bulk_reads_per_node, a monitor based slot, 429 before any database work), and are spliced from the stored JSON text; GET /version has a light bucket (120 per minute, burst 30); every writer takes the per-user lock with a try-lock (a busy lock is a 429 at once, lock_timeout stays as the safety net of row locks) so lock waiters cannot exhaust the shared pool of 10 connections; the total version rows per user are capped at 1000 (an operator prunes old markers with the SQL of the GDPR runbook). Honest peak memory: one bulk read peaked at about 300-350 MiB for a version at the former 256 MiB budget (the spliced iodata copy, the rows, and +0.75x with gzip); at the 64 MiB budget it is about 64 MiB x 2.5, and at most two run per node; streaming the response is the recorded follow-up. Accepted: the soft-delete markers are never pruned automatically (needed for never-reused numbers and the idempotent DELETE), their growth is bounded by the row cap; the rate-limit buckets and the slots are node-local (a cluster of N nodes allows N x the limit); the RLS policies are USING (true) like the sibling tables (accepted: isolation rests on the user_id predicate of every statement); the byte check is O(scan) of the user's rows on every write (follow-up: an O(1) counter column)Resolved / accepted (markers, node-local buckets, RLS pattern, O(scan) per write)Story server-side-key-backup, docs/stories/e2ee-client-support/security-reports/server-side-key-backup-security-review-2026-10-30.md
Server-side key backup, accepted residuals of the cycle-2 review (server-side-key-backup-security-review-2026-10-30-cycle2.md, code review cycle 2): (1) WRITE-side peak: the per-user lock is taken after the body is parsed, so a 5 MiB body costs about 25 MiB of decoded heap and the burst of 5 writes about 125 MiB per account, with NO node-wide cap on the parses; about 3 colluding accounts can strain a 1Gi node and about 8-10 a 2g node (follow-ups: a node-wide gate for the room_keys body parsing in the style of RoomKeysReadGate, or a body cap of 1-2 MiB). (2) The two node slots of the bulk reads cover the database read, the gzip and the send: two accounts with full budgets or slow readers can hold both until Bandit's send timeout (about 30 s; ingress-nginx defaults to proxy-buffering: off, so the drip reaches Bandit), and other users' restores on that node answer 429 meanwhile: with open registration a cross-user availability coupling on a recovery path (cap 2), no data impact (follow-ups: byte-weighted admission, streaming the read, proxy-buffering on for the Kubernetes ingress). (3) The try-lock shares the sync_global key with the blocking AccountDataStore.put/3 and CrossSigningKeyStore.put_keys/2: a concurrent Element setup can get a 429 on a PUT /room_keys/* with the fixed retry_after_ms of 1000; clients retry. (4) The fixed 128 bytes per row of the byte budget do not model the real row overhead (about 0.3-0.5 KiB per row, nor gzip): the "64 MiB x 2.5" peak above is an order of magnitude, not a boundAccepted riskStory server-side-key-backup, security review cycle 2 (APPROVED, 2 accepted MEDIUM)
E2EE compliance channel guard (story e2ee-compliance-channel-guard, REQ-2026-015, epic SEC gate 2 HIGH #1; ADR-011 update 2026-11-03), accepted residual: the to-device channel (/sendToDevice) stays a non-archived, server-opaque user-to-user channel for the allowlisted types (m.room.encrypted, m.room_key_request, m.room_key.withheld, m.secret.request, m.dummy, the eight m.key.verification.* types); m.room.encrypted is refused on every ROOM write path (403 M_FORBIDDEN), m.room_key, m.forwarded_room_key, m.secret.send and org.matrix.room_key.withheld are refused on purpose; bounded by the budgets of to-device-messaging (64 KiB, 50 recipients, queues, 7 days TTL, rate limit); the allowlist is a type filter, not a content filter (it narrows which types may be used, it does not inspect or limit content below those budgets: the channel is as large as before for the allowed types); accepted by the owner at the epic gate, no per-send audit (an operator who needs one opens a new story); the key-backup blobs and cross-signing signatures are opaque client data as well. Known exclusion: Element Call / MatrixRTC end-to-end encrypted calls (io.element.call.encryption_keys, m.call.*) do not work against NebuAccepted riskstory e2ee-compliance-channel-guard, ADR-011
E2EE epic release precondition (epic SEC gate 2 MEDIUM #2): the migrations 000058-000061 (the stories of this epic) must reach a database only AFTER 000056 and 000057 of the OAuth session branch (merged to main on 2026-11-04, 955d8f50, so the order holds for every build of main and the ReleaseTest contiguity (lueckenlos, zusammenhaengend) guard is green); a database that already recorded 000058 or higher without 000056/000057 (a development database that ran an epic build before the merge) is not repaired by the runner, which applies only the versions above the single recorded one: recreate itMerge / release precondition07-deployment.md "E2EE client support epic: release preconditions"
E2EE epic aggregate memory (epic SEC gate 2 MEDIUM #3): one account can hold about 400 MiB of the node (budgets of the epic added up) plus 10-20 MB per concurrent /sync that carries to-device content; two or three colluding accounts reach a 2 GiB node. Accepted epic residual; monitor BEAM process memory, the number of concurrent long polls and the size of to_device_messagesAccepted riskepic e2ee-client-support security review 2026-11-03
E2EE epic (epic SEC gate 2 LOW #4): two concurrent GDPR erasures of users who messaged or signed each other can deadlock (SQLSTATE 40P01) on to_device_messages and cross_signing_user_signatures; the erasure fails closed (nothing half erased) and a retry succeedsAccepted riskepic e2ee-client-support security review 2026-11-03
E2EE epic (epic SEC gate 2 LOW #5): /sync reaches the device-list scan (keys_changes data) and the global advisory lock (4760, 60) through the per-IP sync tier, not through the per-user keys_changes tier; the sync limits are the boundAccepted riskepic e2ee-client-support security review 2026-11-03
State-event forgery (pre-existing, FIXED 2026-10-07)CLOSEDbugfix-unsigned-replaces-state: Room.Server.do_send_event/7 now persists state_key as NULL instead of "", preventing any joined member from forging state events via PUT /send/{eventType}. Migration 000036 backfills m.room.message rows empirically. Follow-up data remediation query documented; query-filter hardening (F-3/F-4/F-6) deferred.
Search-pipeline encryption exclusion still matches post-fix state_key = NULL forged encryption rows (pre-existing, related to above)Mediumbugfix-unsigned-replaces-state security review F-2: search/db.ex predicates must be tightened to enc.state_key = '' (not IS NULL) after state-forgery path is closed + m.room.encryption guard added to non-state send_event/2 path. Separate /nebu-pipeline bugfix required (not blocking this story).
OAuth broker gate items (from story oauth-metadata-dcr-admin-approval, Kassandra SEC Gate 1, 2026-10-09)In progressADR-033, "Gate items before oauth_enabled / story 2 merge"; Tracked in docs/stories/oauth-broker/follow-ups.md
F-1 (MEDIUM, HARD GATE): Trusted-proxy client-IP resolution. Behind nginx on reference deployments (UpCloud, Stackit), all clients share one per-IP rate-limit bucket, so the strict per-IP registration limit is effectively global. Also affects loose bucket + 429 abuse control, and (story oauth-authorize-idp-delegation-code) the {"oauth_authorize", ip} / {"oauth_callback", ip} buckets of the authorize endpoint and the OAuth callback branch (one shared bucket behind nginx throttles every login). Must be closed before oauth_enabled can be true or story 2 merges.Deferredepic: oauth-broker, gate-item 1
N-1 (MEDIUM, HARD GATE): Per-host pending-cap keyed on attacker-asserted host. An attacker can fill the per-host cap (default 20) for a real host (element.company.com) with 20 registrations of distinct metadata; every new registration for that host then answers 503 for up to 30 days (or until admin manually rejects 20 rows). Blocks first OAuth login of the org's real client. Fix: key the cap on (client_host, created_from_ip) (requires item 1), or evict oldest pending row on cap hit + add bulk-reject by host (item 2). Must be closed before oauth_enabled can be true.Deferredepic: oauth-broker, gate-item 4; ADR-033 §"Pending registrations" documents as known property until then
F-1 (MEDIUM): Bulk reject in admin UI for pending registrations (e.g. by client_uri host, or all older than N days). Recovery from a full pending list is otherwise one click per row or SQL.Deferredepic: oauth-broker, gate-item 2
F-4 (LOW): Public-suffix check for client_uri hosts. Use registrable domain as per-host cap key instead of exact host.Deferredepic: oauth-broker, gate-item 3, epic-end review
I-1 (INFO, RESOLVED by story oauth-token-revocation-logout): Metadata advertised /oauth2/revoke while it answered 404. The endpoint is live since story 4 (also while oauth_enabled=false, R13), so every advertised endpoint exists; oauth_enabled still stays off for the remaining gate items.Resolvedepic: oauth-broker, follow-ups.md (b of story 4), ADR-033 R13/R23
Story oauth-authorize-idp-delegation-code (Kassandra SEC Gate 1, 2026-10-10), follow-ups h-k: (h, MEDIUM) global 10 000 cap on live oauth_authz_requests has no per-source cap, so once client IPs resolve correctly a handful of IPs can keep it full and block every OAuth login (never evict oldest rows); (i) auth_time freshness check at the callback / consent screen still open (the OAuth leg already sends prompt=login + max_age=0); (j, LOW) binding cookie __Host- prefix; (k) operator note: strip /oauth2/authorize and SSO-callback query strings from reverse-proxy access logs. Accepted property: the request is consumed before the cookie check (a third party with a live state can burn one login attempt).Deferredepic: oauth-broker, follow-ups.md (h-k), ADR-033 story 2
Story oauth-token-endpoint (follow-ups a-f, l, m; ADR-033 T1-T33): (a, HARD GATE) the trusted-proxy gate (item 1) also covers {"oauth_token", ip} (600/h), {"oauth_token_refresh", ip} (6000/h, deliberately generous, answers 503 {} never 429) and {"oauth_jwks", ip}: behind nginx every client shares one bucket; (b) signing-key rotation tooling + runbook missing (pre-publish the next key for at least JWKS max-age 600 s + id_token lifetime 300 s before activating); (c) no display_name for OAuth devices; (d) UIA / m.oauth for OAuth sessions (stories 5/6); (f) legacy-to-legacy device reuse does not invalidate old tokens (pre-existing spec deviation, story 5). Signing-key compromise (private_jwk_enc is only as safe as the SecretBox key and DB access) would let an attacker forge id_tokens for clients that trust them (access tokens are opaque and unaffected); mitigation is rotation (b) and the undecryptable-key runbook (p).Deferredepic: oauth-broker, follow-ups.md (a-f), ADR-033 story 3
l (before oauth_enabled): a missing IdP refresh token is detected only at the token endpoint (T6: invalid_grant, the user must log in again) instead of at the IdP callback before a code is minted; plus an admin configuration warning for oauth_idp_revalidation = per_refresh without matrix_oidc_refresh_mode=offline.Deferredepic: oauth-broker, follow-ups.md (l), oracle C9
m (before oauth_enabled): the reference nginx templates (deploy/tofu/examples/{stackit,upcloud}/cloud-init.tftpl) proxy only /_matrix/, /.well-known/matrix/, /admin/ and /api/v1/, so /oauth2/* and /.well-known/openid-configuration (T31) are unreachable behind them (Element Web is served at /). Proxy gap to close together with the trusted-proxy gate. Extended by story oauth-account-management (A2): /account and every /account/* sub-path must be routed to the server in both templates too (device sign-out, the m.oauth approval page and the metadata account_management_uri are unreachable otherwise).Deferredepic: oauth-broker, follow-ups.md (m), ADR-033 T31
Story oauth-token-endpoint (Kassandra SEC Gate 1, 2026-10-10), follow-ups n-q: (n, LOW, before oauth_enabled, availability) false logout when two refreshes of the same refresh token overlap and the IdP rotates refresh tokens (the loser's rejection is final before the winner commits; ADR-033 T28 residual); (o, LOW) one matrix_sessions row per rotation is kept until session_expires_at + 7 d (about 6000 rows/h per IP in off mode); (p) signing-key ETS cache owned by a supervised process, SecretBox per-purpose subkey/AAD, undecryptable-key runbook; (q) operator notes: switching idp_revalidation off -> per_refresh revokes OAuth sessions without an IdP refresh token at their next refresh, IdP refresh load per client. F-1 (T28 race guard bypassing per_refresh) was fixed in the story.Deferredepic: oauth-broker, follow-ups.md (n-q), docs/stories/oauth-broker/security-reports/oauth-token-endpoint-security-review-2026-10-10.md
Story oauth-token-revocation-logout (ADR-033 R1-R24, follow-ups r-t, Kassandra SEC Gate 1, 2026-10-10 CLEAN: 0 CRITICAL/HIGH/MEDIUM, 2 LOW fixed, 7 INFO): (a, HARD GATE) the trusted-proxy gate (item 1) also covers {"oauth_revoke", ip} (60/min, burst 600; Element sends two revocations per logout, behind nginx all clients share one bucket); (m) the nginx proxy gap also hides /oauth2/revoke. Accepted property: /oauth2/revoke is unauthenticated, so any holder of any retained token of a session (also a superseded access or consumed refresh token) can end it and delete its device and keys (RFC 7009 grant revocation, I-2; bounded by follow-up o); a leaked legacy token cannot be killed through it (R5).Accepted / Deferredepic: oauth-broker, follow-ups.md, docs/stories/oauth-broker/security-reports/oauth-token-revocation-logout-security-review-2026-10-10.md
r (before oauth_enabled; the story-9 /versions flip code is dormant): legacy POST /logout is not Matrix-conformant: it wipes EVERY session of the user (also OAuth sessions on other devices, whose devices then stay) and keeps the device, whereas Matrix /logout invalidates only the presented token and deletes its device (R16). A legacy logout in one client must not end the user's OAuth sessions in another; NOT fixed by story 5 (oauth-legacy-coexistence, scope decision 6); fix by the bugfix run legacy-logout-per-device (per-device legacy logout).Deferred (owner: bugfix legacy-logout-per-device)epic: oauth-broker, follow-ups.md (r), ADR-033 R16
s (re-scoped 2026-10-13, see the phase-2 rows below: gate before encrypted rooms are allowed / any E2EE claim, not before oauth_enabled): device_lists.changed is not emitted when a device is deleted (revoke, OAuth /logout, /logout/all, DELETE /devices, admin); only cross-signing changes do it. t (non-gating): optional IdP-side revocation of the IdP refresh token when the IdP advertises a revocation_endpoint (R12): today only Nebu's SecretBox copy is deleted and Nebu makes no outbound call from the unauthenticated endpoint.Deferredepic: oauth-broker, follow-ups.md (s, t), epic-end review
Kassandra INFO notes (story oauth-token-revocation-logout): I-1 POST /logout/all needs no UIA (an access token alone deletes all devices and keys, cross-signing stays; spec conformant, new capability; reconsider with the UIA delineation, story-3 (d)); I-5 GDPR erasure ends sessions after its commit (a window of milliseconds) but does not deactivate the user, in-flight codes survive and the user can log in again: operator note, deactivate before erasing, or have erasure deactivate (compliance decision); I-6 codes / authz requests in flight (<= 60 s) are not invalidated by /logout/all or erasure (point-in-time semantics, R17). Verified without action: I-3 no oracle, I-4 revoke live while disabled shows no abuse path, I-7 lock order devices -> matrix_sessions is consistent across issuance, rotation and revoke.Note / Acceptedepic: oauth-broker, security report 2026-10-10
Story oauth-legacy-coexistence (ADR-033 C1-C20; follow-ups r, u-x): r (before oauth_enabled; the story-9 flip code is dormant; owner: bugfix run legacy-logout-per-device, /nebu-pipeline --bug) legacy POST /logout still wipes every session of the user (also OAuth sessions on other devices) and keeps the device, and legacy-to-legacy device reuse (f) still leaves the earlier legacy tokens valid; both deliberately NOT changed in story 5; story 9 flips /versions on Nebu.OAuth.oauth_aware?/0. u (non-gating, when legacy is deprecated): refuse unbound raw IdP JWTs / remove the raw-JWT path (C14); v (non-gating, story 6 or epic-end): the Admin device list shows no owning API / OAuth client (C18); w (story 6, before oauth_enabled): RESOLVED by story oauth-account-management (A13, the account page exists; C7 403 stays for the UIA endpoints): OAuth sessions could not delete other devices (C7 403 M_FORBIDDEN); x (non-gating, epic-end): the legacy rotate_tokens/1 takes no devices lock, so a concurrent legacy /refresh can survive a device deletion (C12)Openepic: oauth-broker, follow-ups.md, ADR-033 "Legacy coexistence (story 5)"
Story oauth-legacy-coexistence (Kassandra SEC Gate 1, 2026-10-10, 0 CRITICAL/HIGH/MEDIUM): L-1 (revival of a binding kept by the kill-switch through POST /login / DeviceBinding.put/4 re-pointing) and L-2 (the action value in the SSO-redirect DEBUG query capture) FIXED in the story (denylisted-JWT login refused, same-device-only conflict update, value masking of every action* key); I-1 after a fresh-UIA self-delete of a raw-JWT caller's own device the preserved binding is refused on the next request (hard logout, deliberate fail closed, no devices lock on the preserve path); I-2 other nodes may accept a JWT for up to 60 s after a failed denylist write (lookup-cache TTL); open raw-JWT items stay under u and xFixed (L-1, L-2); INFO accepted (I-1, I-2)docs/stories/oauth-broker/security-reports/oauth-legacy-coexistence-security-review-2026-10-10.md
Story oauth-account-management (ADR-033 A1-A27; follow-ups y-ab, w closed, (m) extended, story-3 (d) resolved): y (BLOCKING before oauth_enabled, together with (i)) the account login / re-auth sends prompt=login + max_age=0 but accepts a missing auth_time (callback time + one WARNING); OIDC Core 3.1.2.1 obliges the IdP to return it, Dex reportedly omits it, so against such an IdP a re-authentication proves no freshness; resolve with an IdP that honours max_age / emits auth_time or by failing closed (absent = never fresh); e2e scenario @ac2-freshness records the real Dex behaviour. z (non-gating): no account deactivation nor profile editing on the page (product decision). aa (non-gating, epic-end): per-source caps for account login requests and sessions after the trusted-proxy item 1 (global soft cap 10 000, 20 sessions per user, shared {"oauth_account", ip} bucket behind nginx). ab (non-gating, compliance decision): no audit rows for cross-signing reset approvals and account-page device deletions (T29 / R21 / C19 consistency, INFO log lines only)Openepic: oauth-broker, follow-ups.md (y, z, aa, ab), ADR-033 "Account management and m.oauth (story 6)"
Story oauth-account-management (Kassandra SEC Gate 1, 2026-10-12): ag (before oauth_enabled, with y; F-1 MEDIUM, I-1) same-origin approval of a cross-signing reset: /account shares the origin with Element Web (and /admin), so a same-origin script (an XSS in Element Web, which already yields the access token) can fetch the account page, read the CSRF token and approve a reset; freshness is vacuous when the IdP omits auth_time (y); decide between a dedicated account origin (MAS pattern) and a documented accepted risk + release note (partly mitigated: Sec-Fetch-Mode: navigate / Sec-Fetch-Dest: document / Sec-Fetch-User: ?1 required on the destructive POSTs when present, request-first approval bound to device + key set). ah (epic-end / release notes; I-2..I-4): binding-cookie __Host- interplay with the shared per-IP bucket (j, aa); a TLS-terminating proxy that does not set X-Forwarded-Proto yields the non-Secure nebu_account cookie. F-2 (an approved PARTIAL replacement wiped unsupplied keys), F-3 (indistinguishable / uncapped reset requests) and I-6 (future auth_time) FIXED in the story; the Origin: null fallback needs a real-browser POST check before the gateOpen (ag, ah); Fixed (F-2, F-3, I-6)docs/stories/oauth-broker/security-reports/oauth-account-management-security-review-2026-10-12.md, follow-ups.md (ag, ah)
I-2 (INFO): Cache-Control: public, max-age=259200 on metadata means kill switch / issuer change invisible for up to 3 days. Operator runbook note.Deferredepic: oauth-broker, follow-ups.md
I-12 (INFO): Cache Nebu.OAuth.Config.get/0 per node for a few seconds. Every discovery GET reads server_config uncached.Deferredepic: oauth-broker, follow-ups.md
Mitigated (story legacy-sso-redirect-confirmation, epic SEC gate 3 G3-3 closed in the server, 2026-10-13; MANUAL VERIFICATION group F pending): legacy m.login.sso redirectUrl trust. A stricter redirectUrl parser (400 for userinfo, backslash, control bytes, numeric host lookalikes, > 2048 bytes) and a confirmation page after the IdP login for every https target that is not listed (https://<server_name>, the oauth_issuer_url origin, registered redirect URIs of approved OAuth clients, the Admin list sso_redirect_allowed_origins); only Continue mints the loginToken. Behaviour change for legacy web clients on other origins (list them; release note). Residuals (D18, ADR-033, 07-deployment "Accepted risks"): (a) a user who clicks Continue for an attacker origin is not protected; (b) loopback http://localhost|127.0.0.1 and default / operator custom deep-link schemes get no page (local process or app registered for the scheme); (c) https://<server_name> is trusted automatically (.well-known delegation: the apex host); (d) approved OAuth clients' registered redirect URIs (and the paths below them) become trusted legacy targets although a legacy token is a full session; (e) no pre-redirect browser binding of the legacy flow; (f) cross-node single use of the pending entry is best effort; (g) Continue needs JavaScript; (h) no COOP on the flow (popup clients need window.opener; arming script resets on hashchange); follow-ups co (per-subject cap of the :confirm store: one IdP account holder can fill the 10 000 per-node cap) and cp (multi-tap touch arming lure). Still independent of oauth_enabled and the DCR approval gate until legacy shutdown.Mitigated; residuals accepted (owner decision 2026-10-13: implemented incl. the legacy behaviour change); co, cp deferredepic: oauth-broker, ADR-033 "Legacy SSO redirect confirmation", 07-deployment row G3-3 and "Legacy SSO confirmation page"
Superseded wording of the same risk (ADR-033, reworded by epic SEC gate 3, G3-3; kept for history): legacy m.login.sso accepted ANY https redirectUrl: GET /_matrix/client/v3/login/sso/redirect?redirectUrl=https://evil/ leads through IdP login (which only the IdP's prompt=login handling protects) to a 302 to the attacker host with a loginToken that POST /login exchanges for a full session; no approved client, device id or consent is involved; independent of oauth_enabled; the epic's E-2 closure holds for the OAuth path only. It also bypasses the DCR approval gate until legacy shutdown.Closed by the row above (interstitial + allowlist, follow-up by)epic: oauth-broker, ADR-033 §"Discovery: one issuer" / "Phase 2 summary", 07-deployment preconditions row G3-3
OAuth broker phase 2 status (2026-10-13; supersedes the gate wording of the OAuth rows above)Gates closed in code; oauth_enabled still false; MANUAL VERIFICATION pendingClosed by stories oauth-trusted-proxy-client-ip, oauth-dcr-abuse-hardening, oauth-authorize-freshness, oauth-client-revocation, legacy-logout-per-device, oauth-room-summary-unrecognized, oauth-hardening-hygiene, legacy-sso-redirect-confirmation (G3-3) and the P5 templates (items 1, 2, 3, 4, h, i, y, E-2, j, k, l, m, n, r, x, ac, af, ag/E-3, aj/E-1, ak(1), ae, aa, am, an, p). Operator verification before activation: NEBU_TRUSTED_PROXY_CIDRS + negative spoof test, LB XFF append semantics, IdP auth_time / max_age / refresh token, Element Web / FluffyChat / Element X consent, logout, reset and room preview, admin fetch metadata in real browsers, rotation / revoke / rollback rehearsals: docs/architecture/07-deployment.md "Manual verification before activation"
Epic SEC gate 3 (2026-10-13)Dormant merge PASS; activation BLOCKEDBlocking: G3-2 (docs / operator, gating; status: aids added (story client-ip-misconfiguration-warnings: throttled server WARNING for X-Forwarded-For from an untrusted peer, 6-hourly client IP: all ... devices WARNING, OpenTofu check block), positive test MANUAL and GATING, NOT closed; the warnings can miss a collapse and activation is not blocked in code): the POSITIVE client-IP test (two networks must show distinct last_seen_ip through the real public path); with tofu alb and an empty lb_real_ip_cidrs all clients collapse to the LB address, every per-source cap and per-IP bucket becomes global (consent 20 per source, authz / account 300) and one anonymous source can lock every user out of OAuth login: do NOT flip; plus manual verification groups A-F. G3-3 is CLOSED in the server (story legacy-sso-redirect-confirmation: confirmation page + origin allowlist, see the mitigated row above; operator work: list the web client origins, verify group F). G3-1 (revoke lock bounds) is closed by bugfix revoke-lock-bounds. LOW: G3-4 (this (s) wording synced), G3-5 (REDUCED in the server by story consent-arming-hardening (closed for the parked-pointer double-click and multi-gesture lures with the pointer parked, not eliminated): the consent page uses the shared Nebu.Web.ArmScript, a pointer must travel onto Allow after arming; touch and keyboard residuals accepted, follow-up cp; COOP on the consent page: manual item, follow-up cr), G3-6 (root compose opt-out is dev only)
SEC delta gate over the three G3 stories (2026-10-14)CLEAN; activation still BLOCKED (open, operator)1 MEDIUM (X-1: the admin writers of the legacy-SSO trust lists had only session + CSRF; fixed by story sso-origins-admin-hardening: strict fetch metadata + fresh re-authentication + no framing of /admin/config), 3 LOW (X-2 doc sync done, X-3 the G3-2 collapse also hits the legacy confirm page from the merge on: documented, follow-up cv; X-4 ; / %25 path climbs fixed), X-6 (a same-origin script needs no click on either decision page: SO7 / SO8). Remaining blockers: G3-2 positive test, manual groups A-F, written acceptance of the residuals
Safari / WebKit sends no Sec-Fetch-User (found 2026-10-14 on the dev stack; story safari-fetch-metadata-compat, follow-ups cx-cz, ADR-033 SO9)Closed in the server; real-browser verification MANUAL (07-deployment group D)The strict level (SO2) required all four fetch metadata headers and so locked every Safari user out of client approve / reject / revoke, bulk removal, the /admin/config SSO trust saves and the /account reset approval; the earlier docs claimed Safari sends the four headers. For WebKit user agents only, a click proof (hidden _click_proof, set by a shared script on a trusted click) replaces Sec-Fetch-User; without it a notice page replaces the 403; Chrome / Firefox rules unchanged. Residual (accepted with SO7): the field is attested by page script, so a script on the shared origin can set it and on WebKit no longer has to wait for a click
OAuth switch in the Admin UI (story admin-oauth-switch, 2026-10-14; ADR-033 AS1-AS12, follow-ups da-dd)Closed in the server; real-browser and running-instance verification MANUAL (07-deployment group D)oauth_enabled / oauth_issuer_url get an Admin UI writer on /admin/config (owner requirement: activate OAuth later on a running UpCloud instance without database access): strict fetch metadata + Safari click proof, a fresh sign-in, an activation acknowledgement, no framing, one audit row in the same transaction (a change to ON is refused without it, a change to OFF is not blocked by it), a non-blocking status list of what the server can see. The status list does NOT replace the preconditions: the load balancer, the positive client-IP test (G3-2), the IdP auth_time and the clients stay the operator's manual verification. Residuals: SO7 (a script on the shared origin that waits for a click can switch OAuth on or off after a fresh sign-in of the admin), last-write-wins between two admins (dc).
Role mapping self-lock-out guard (story role-mapping-self-lockout-guard, follow-up dg closed; ADR-033 SO10 addendum)Closed in the server; real-browser check MANUAL (07-deployment group D)The role mapping save is refused when the fresh sign-in of the saving admin does not hold the new value (fingerprint of hashed claim values in the marker, no override). Residuals: other administrators can still be locked out by a value only the saver holds (intended), the guard checks the claims of the fresh sign-in and not of the next refresh exchange, more than 32 distinct values at the claim path make the guard refuse values outside the recorded part (sorted order), without a stored claim path a group is only accepted from claims other than the protocol / identity ones, a value only the saver holds still locks the co-admins out (audited, rpc), a refresh token of 3 KB or more overflows the 4 KB admin session cookie on reauth (with or without the guard), the rpc reset_admin_group_claim/1 is deliberately unguarded.
Sweep of the remaining admin forms (story admin-forms-gate-sweep, follow-up de closed, dj closed, dk - dm decided, dn partly closed by story media-retention-audit-atomic (the three media retention values are audited atomically, the rest is not implemented, owner decision), do part a closed by story storage-test-pinned-target (the storage test connection is pinned to the checked address), part b split out (own feature, owner idea), residual ds; ADR-033 SO11)Closed in the server; real-browser check MANUAL (07-deployment group D; e2e only for the media policy save)Every admin form post / DELETE except the bootstrap wizard needs the strict fetch metadata (router enumeration test); the media policy and the storage target also a fresh sign-in (one marker for the page); the test connection never sends stored credentials to another endpoint, and since story media-storage-uses-admin-config neither do the operational calls (the credentials are bound to the saved endpoint, except that the environment's own endpoint and Use SSL use the environment's credentials; a save that changes the endpoint or use_ssl must carry both keys); log retention and the room auto-join toggle are audited. Residuals: LiveView events (media actions, War Room, Trace Map) cannot be gated by fetch metadata and stay open to a same-origin script (SO7), bootstrap and logout stay ungated, the space edits are audited (story space-edit-audit, dj), the audit gaps of the Trace Map, War Room, bootstrap and login / logout are decided: no audit (dk - dm, owner 2026-10-15), the operational S3 calls resolve the stored storage host per request and are not SSRF-pinned: this residual is LIVE since story media-storage-uses-admin-config (every media request goes to the saved endpoint: DNS rebinding after the save gives a blind SSRF with signed requests; ds), no e2e test for the storage target and the test connection.
Atomic audit of the privileged config saves (story admin-config-audit-atomic, follow-ups dh closed, di / dd partly; ADR-033 SO10 addendum)Closed in the server; MANUAL check with an unwritable audit table (07-deployment group D)The role / claim mapping and the SSO / scope widenings are saved only together with their audit row; narrowing / clearing and a refresh mode change to online are the ways back and are applied without it (value-free ERROR naming the form and keys; a narrowing is re-checked under a row lock; a change to offline is refused). Residuals: a roll-back of a MAPPING needs a working audit table (rpc reset_admin_group_claim/1 or SQL otherwise; claim mapping has no rpc), the per-form seams outside the six forms are not compile-guarded yet (dd), the SSO store is still one process for the writes and pop_confirm (rest of di: a stateless MAC binding cookie), a SIEM must watch oauth_switch_changed next to sso_redirect_origins_changed.
Sweep of the privileged admin forms (story admin-config-privileged-forms-sweep, follow-ups cw closed, de, df; ADR-033 SO10)Closed in the server for /admin/config*; real-browser check MANUAL (07-deployment group D)Role mapping and claim mapping now need strict fetch metadata + a fresh admin sign-in bound to their page, are not framable and write audit rows; scopes and refresh mode need strict fetch metadata only (a fresh sign-in would use the scopes they change: lock-out); the SSO scheme list writes its audit row (Y-5). Residuals: a wrong mapping value can lock administrators out (warning + SQL recovery documented, df), the other admin forms (media storage target, user actions, logs retention) are not swept (de), SO7.
SEC delta gate admin-switch (2026-10-14; Admin UI OAuth switch, privileged-forms sweep, SSO confirm bucket order)CLEAN, 1 MEDIUM + 5 LOW, fixed or recorded; activation still BLOCKED (operator)X2-1 a too broad role mapping value would make every user an administrator (universal-value guard), X2-3 the kill switch does not remove the issuer origin's legacy-SSO trust (documented), X2-6 SQL-only emergency paths do not help instances without a console (rpc functions disable_oauth/0, reset_admin_group_claim/1, reset_oidc_scopes/0), X2-5 the shared SsoStore process is the bottleneck of a flood of random cookies (follow-up di). Report: docs/stories/oauth-broker/security-reports/epic-oauth-broker-security-review-admin-switch-delta-2026-10-14.md.
Accepted risks after phase 2AcceptedSO7 shared origin of Element Web, /account and /admin (move Element Web to its own origin to remove it; a dedicated admin hostname is follow-up ba); legacy SSO redirectUrl trust residuals (G3-3 mitigated, residuals a-h of the mitigated row above, co, cp); the double-click arming residuals of the consent and confirmation pages (G3-5 reduced, closed for the parked-pointer lures; a multi-tap touch lure, a keyboard lure with pauses and a moving-target "click game" whose click opens the consent popup under the next target can still land, cp; a popup-based web client loses window.opener through the consent page's COOP, cr); refresh-lease fencing (az); malformed XFF behind a trusted proxy shares the proxy bucket (ap4); the shared client-IP bucket after an empty or wrong NEBU_TRUSTED_PROXY_CIDRS / lb_real_ip_cidrs is safe against spoofing, NOT safe for availability (one source can lock every user out of login; gated by the positive test, G3-2, not "fail-safe"); /48 IPv6 holders (ao, at); no IdP auth_time makes /account destructive actions unavailable (aw); switch-off suspends instead of revoking (ai)
(s) device_lists.changed on device deletion: NOT implemented, gate re-scoped (decision 2026-10-13)DeferredNebu refuses encrypted rooms (ADR-011), so no peer encrypts to a device; the design (change-log table, sync token change) is risky. New gate: before encrypted rooms are allowed (ADR-011 lifted) and before any release that claims E2EE. Story device-lists-changed-on-deletion is backlog (reserved follow-up ids bv, bw, bm-bo). Supersedes the "(s) before oauth_enabled" wording above
Deferred OAuth items (phase 2)Deferred(al) SecretBox v2 / secret rotation (HY17, two-release rollout), (o) rotated-row cap (bs), (t) IdP-side refresh-token revocation, PROXY protocol for TCP-mode load balancers (ap3), batched revoke of very large clients (bb), revoke-all UI (bc), scheduled key rotation (bq), Helm value for NEBU_TRUSTED_PROXY_CIDRS (bu), GET /rooms/{id}/state (bf) and the room-summary side findings (bg-bl: lazy room creation on reads is SEC-relevant, schedule early)

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
Migration 000036 inclusion-list narrowing (m.room.message only, m.reaction + custom types deferred)bugfix-unsigned-replaces-state security review F-1Follow-up
Query-filter hardening in room/db.ex (F-3/F-4) + fetch_replaces_state/1 array chunking (F-6)bugfix-unsigned-replaces-state security reviewFollow-up
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 Elixir process memory growth (Horde room GenServers, ETS tables)
  • Alert on PostgreSQL connection pool saturation (Nebu.Repo pool — Ecto Telemetry)
  • Alert on sync handler P99 latency (long-poll queue depth)
  • 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). ADR-010 (FTS strategy) accepted 2026-05-08; POST /search implemented in Epic 11.