Repository navigation
fix(qa): prevent Matrix E2EE sends from hanging QA runs - #110968
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 18, 2026, 5:46 PM ET / 21:46 UTC. Summary PR surface: Source +41, Tests +29. Total +70 across 3 files. Reproducibility: yes. in source, with medium confidence: an unsettled Matrix SDK send reaches the shared timeout race, which stops the disposable client and rejects with the scenario-timeout error. The PR also reports a before/after live Matrix-driver run, but this read-only review did not independently rerun it. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Retain one shared QA-client operation timeout wrapper for all three Matrix E2EE send variants, then land after the current head’s required checks and owner review confirm the intended deterministic failure behavior. Do we have a high-confidence way to reproduce the issue? Yes in source, with medium confidence: an unsettled Matrix SDK send reaches the shared timeout race, which stops the disposable client and rejects with the scenario-timeout error. The PR also reports a before/after live Matrix-driver run, but this read-only review did not independently rerun it. Is this the best way to solve the issue? Yes. A shared wrapper at the disposable Matrix QA-client boundary covers all affected send variants without changing production Matrix behavior or pre-send image preparation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4e11da2872ec. Label changesLabel justifications:
Evidence reviewedPR surface: Source +41, Tests +29. Total +70 across 3 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
1a698d9 to
0803513
Compare
Related: #110897
What Problem This Solves
Resolves an operational problem where the full QA evidence workflow could remain active until its job timeout when a Matrix E2EE QA-client send stopped settling after room-key sharing. That blocked complete maturity-scorecard evidence generation and held a CI worker indefinitely.
Why This Change Was Made
The disposable Matrix QA client now bounds text, notice, and image send calls by the scenario timeout and stops the client before reporting a timeout. Production Matrix behavior and pre-send media preparation are unchanged. A focused fake-timer regression test covers timeout settlement, client shutdown, and timer cleanup.
AI-assisted: Codex diagnosed, implemented, and validated this change; the final patch passed the repository's
autoreviewgate.User Impact
Maintainers running Matrix or full-profile QA now get a deterministic scenario failure and worker cleanup instead of a multi-hour hung run. There is no user-facing runtime behavior change.
Evidence
matrix-e2ee-state-after-missing-encryptionand required cancellation.matrix-e2ee-state-after-missing-encryptionpassed with the real Matrix driver and deterministic mock provider in 42 seconds on Blacksmith Testbox run 29660828552.node scripts/run-vitest.mjs extensions/qa-lab/src/live-transports/matrix/substrate/e2ee-client.test.ts— 5/5 passed.pnpm deadcode:full— passed on Blacksmith Testbox run 29661929698.pnpm check:changed— extension production/test typechecks, lint, formatting, boundaries, and import-cycle checks passed on Blacksmith Testbox run 29661929698.autoreview --mode uncommitted: clean, no accepted/actionable findings.