Repository navigation
fix(matrix): prevent gateway stop on Megolm missing-key decryption failures - #94044
yuxuan-7814 wants to merge 1 commit into
Conversation
…ilures - Reduce retry attempts for MEGOLM_UNKNOWN_INBOUND_SESSION_ID from 8 to 2 (keys were never shared, so retrying is futile) - Add isRecoverableSyncError() to classify decryption, Megolm, and transient network errors as recoverable instead of fatal - Prevent sync.unexpected_error from treating recoverable errors as fatal Closes openclaw#93501
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close: this PR is superseded by the open, mergeable, proof-positive Matrix retry PR at #94416; this branch changes broader sync-error handling, lacks concrete after-fix output, and still does not repair late-key exhausted retry recovery. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Close this PR and keep review focused on #94416 as the canonical Matrix missing-key recovery path. So I’m closing this here and keeping the remaining discussion on #94416. Review detailsBest possible solution: Close this PR and keep review focused on #94416 as the canonical Matrix missing-key recovery path. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main and v2026.6.10 show exhausted Matrix decrypt retries are not requeued by later crypto key signals, and the linked issue supplies a real missing-key outage report. I did not rerun a live Matrix room for this PR, but the canonical replacement includes redacted live Synapse proof for the same failure mode. Is this the best way to solve the issue? No. This PR is broader and weaker than the canonical replacement because it string-matches monitor-layer sync errors and shortens retry timing without repairing the MatrixDecryptBridge late-key retry state. Security review: Security review needs attention: Security review needs attention because the diff changes Matrix auth/session failure handling by making token-shaped sync errors recoverable.
AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against d1b917120a47. |
|
The implementation is clean. Consider updating the documentation to reflect this change. |
Summary
Fix gateway halts caused by MEGOLM_UNKNOWN_INBOUND_SESSION_ID errors. Reduces missing-key decryption retries from 8 (~2.5 min) to 2 (~3 sec), and classifies decryption/Megolm/network errors as recoverable instead of fatal.
Linked context
Closes #93501
Real behavior proof (required for external PRs)
openclaw gateway runand monitor logs during message decryptionsync.unexpected_errorhandled as recoverable, gateway continues runninggateway haltedmessages, decryption errors logged but sync continuesTests and validation
openclaw gateway runin foreground modeMEGOLM_UNKNOWN_INBOUND_SESSION_IDerrorsRisk checklist
Current review state