Skip to content

fix(qa): prevent Matrix E2EE sends from hanging QA runs - #110968

Merged
RomneyDa merged 1 commit into
mainfrom
fix/qa-matrix-e2ee-send-timeout
Jul 18, 2026
Merged

RomneyDa merged 1 commit into
mainfrom
fix/qa-matrix-e2ee-send-timeout

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Jul 18, 2026 •

Copy link
Copy Markdown
Member

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 autoreview gate.

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

  • Before: QA Profile Evidence run 29658161693 stopped producing logs in matrix-e2ee-state-after-missing-encryption and required cancellation.
  • Linux live-transport proof: matrix-e2ee-state-after-missing-encryption passed with the real Matrix driver and deterministic mock provider in 42 seconds on Blacksmith Testbox run 29660828552.
  • Focused regression: node scripts/run-vitest.mjs extensions/qa-lab/src/live-transports/matrix/substrate/e2ee-client.test.ts — 5/5 passed.
  • Dependency/dead-code gate: pnpm deadcode:full — passed on Blacksmith Testbox run 29661929698.
  • Changed-surface gate: pnpm check:changed — extension production/test typechecks, lint, formatting, boundaries, and import-cycle checks passed on Blacksmith Testbox run 29661929698.
  • Final autoreview --mode uncommitted: clean, no accepted/actionable findings.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. labels Jul 18, 2026
@clawsweeper

clawsweeper Bot commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 18, 2026, 5:46 PM ET / 21:46 UTC.

Summary
The branch bounds disposable Matrix E2EE QA text, notice, and image sends by the scenario timeout, stops the client on timeout, and adds a fake-timer regression test.

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: 🐚 platinum hermit
Proof: 🦞 diamond lobster ✨ media proof bonus
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Wait for the remaining required CI shards to complete on the reviewed head.
  • [P2] Obtain ordinary Matrix QA owner review before merge.

Risk before merge

  • [P1] Three compact CI shards were still in progress in the supplied check snapshot; landing should wait for the required checks to settle on the reviewed head.

Maintainer options:

  1. Decide the mitigation before merge
    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.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P2] The concrete implementation appears ready for normal owner review, but the maintainer label and remaining required checks make this a human merge decision rather than an automated repair candidate.

Security
Cleared: The diff adds no dependency, credential, permission, workflow, artifact-execution, or production-runtime surface; it only bounds and cleans up a disposable QA Matrix client operation.

Review details

Best 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 changes

Label justifications:

  • P2: The fix prevents a Matrix QA evidence worker from remaining hung until job timeout, with impact limited to maintainer QA infrastructure.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The PR provides after-fix live Matrix-driver QA evidence with a bounded successful run, supplemented by focused regression and changed-surface validation; the reported evidence contains no private values.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR provides after-fix live Matrix-driver QA evidence with a bounded successful run, supplemented by focused regression and changed-surface validation; the reported evidence contains no private values.
Evidence reviewed

PR surface:

Source +41, Tests +29. Total +70 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 2 61 20 +41
Tests 1 30 1 +29
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 91 21 +70

What I checked:

Likely related people:

  • RomneyDa: Authored this Matrix QA repair and the earlier merged full-profile QA evidence workflow change, giving them direct recent context on the affected operational path. (role: recent QA workflow contributor; confidence: medium; commits: 08035138a780, 6325b0f3c456; files: extensions/qa-lab/src/live-transports/matrix/substrate/e2ee-client.ts, extensions/qa-lab/src/live-transports/matrix/substrate/e2ee-client-internals.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (1 earlier review cycle)
  • reviewed 2026-07-18T21:36:41.354Z sha 1a698d94f0cdbcf062042cbb6f958087343ed177 :: needs maintainer review before merge. :: none

@RomneyDa
RomneyDa force-pushed the fix/qa-matrix-e2ee-send-timeout branch from 1a698d9 to 0803513 Compare July 18, 2026 21:42
@RomneyDa
RomneyDa merged commit 5691589 into main Jul 18, 2026
120 of 123 checks passed
@RomneyDa
RomneyDa deleted the fix/qa-matrix-e2ee-send-timeout branch July 18, 2026 22:32
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 19, 2026
zooqueen pushed a commit to zooqueen/openclaw that referenced this pull request Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: qa-lab maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant