Skip to content

refactor(matrix): store crypto sidecars in sqlite#91100

Merged
steipete merged 1 commit into
mainfrom
refactor/matrix-crypto-state-sqlite
Jun 7, 2026
Merged

refactor(matrix): store crypto sidecars in sqlite#91100
steipete merged 1 commit into
mainfrom
refactor/matrix-crypto-state-sqlite

Conversation

@steipete

@steipete steipete commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Move Matrix recovery-key, IndexedDB snapshot, and legacy crypto migration sidecars into Matrix plugin-state SQLite.
  • Add doctor migrations that import/archive the old JSON sidecars.
  • Keep legacy JSON usable only during failed migration paths so upgrade recovery does not silently drop readable crypto material.
  • Update startup migration, root scoring, restore locking, and doctor preview wording for the SQLite store.

Verification

  • git diff --check
  • node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.extensions.json extensions/matrix/doctor-contract-api.ts extensions/matrix/doctor-contract-api.test.ts extensions/matrix/src/doctor.ts extensions/matrix/src/doctor.test.ts extensions/matrix/src/legacy-crypto.ts extensions/matrix/src/legacy-crypto.test.ts extensions/matrix/src/matrix/client/storage.ts extensions/matrix/src/matrix/client/storage.test.ts extensions/matrix/src/matrix/crypto-state-store.ts extensions/matrix/src/matrix/monitor/legacy-crypto-restore.ts extensions/matrix/src/matrix/monitor/legacy-crypto-restore.test.ts extensions/matrix/src/matrix/sdk/idb-persistence.ts extensions/matrix/src/matrix/sdk/idb-persistence.test.ts extensions/matrix/src/matrix/sdk/idb-persistence.lock-order.test.ts extensions/matrix/src/matrix/sdk/recovery-key-store.ts extensions/matrix/src/matrix/sdk/recovery-key-store.test.ts extensions/matrix/src/matrix/sdk.test.ts
  • pnpm tsgo:extensions
  • node scripts/run-vitest.mjs extensions/matrix/doctor-contract-api.test.ts extensions/matrix/src/doctor.test.ts extensions/matrix/src/matrix/sdk/idb-persistence.test.ts extensions/matrix/src/matrix/sdk/idb-persistence.lock-order.test.ts extensions/matrix/src/matrix/sdk/recovery-key-store.test.ts extensions/matrix/src/legacy-crypto.test.ts extensions/matrix/src/matrix/monitor/legacy-crypto-restore.test.ts extensions/matrix/src/matrix/client/storage.test.ts extensions/matrix/src/matrix/sdk.test.ts extensions/matrix/src/matrix/client/create-client.test.ts extensions/matrix/src/startup-maintenance.test.ts extensions/matrix/src/matrix/client/file-sync-store.test.ts extensions/qa-matrix/src/runners/contract/scenarios.test.ts
  • .agents/skills/autoreview/scripts/autoreview --mode local clean, no accepted/actionable findings

Known proof gap

  • pnpm check:changed did not run because the local Crabbox binary is 0.15.0 and Testbox delegation requires Crabbox >= 0.22.0.

@openclaw-barnacle openclaw-barnacle Bot added channel: matrix Channel integration: matrix size: XL maintainer Maintainer-authored PR labels Jun 7, 2026
@clawsweeper

clawsweeper Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: refactor(matrix): store crypto sidecars in sqlite This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@steipete

steipete commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready proof for 23ce135a7cc8f22320ab9044acc5b1f8c76414dc.

Local proof:

  • git diff --check
  • node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.extensions.json extensions/matrix/src/matrix/crypto-state-store.ts extensions/matrix/src/matrix/sdk/recovery-key-store.ts extensions/matrix/src/matrix/sdk/idb-persistence.ts extensions/matrix/src/matrix/client/storage.ts extensions/matrix/src/doctor.ts extensions/matrix/doctor-contract-api.ts extensions/matrix/src/legacy-crypto.ts extensions/matrix/src/matrix/monitor/legacy-crypto-restore.ts extensions/matrix/src/matrix/sdk.test.ts extensions/matrix/src/matrix/client/create-client.test.ts extensions/matrix/src/matrix/client/file-sync-store.test.ts extensions/matrix/src/startup-maintenance.test.ts extensions/matrix/src/matrix/client/storage.test.ts extensions/matrix/src/matrix/sdk/idb-persistence.test.ts extensions/matrix/src/matrix/sdk/idb-persistence.lock-order.test.ts extensions/matrix/src/matrix/sdk/recovery-key-store.test.ts extensions/matrix/doctor-contract-api.test.ts extensions/matrix/src/doctor.test.ts extensions/matrix/src/legacy-crypto.test.ts extensions/matrix/src/matrix/monitor/legacy-crypto-restore.test.ts extensions/qa-matrix/src/runners/contract/scenarios.test.ts
  • pnpm tsgo:extensions
  • node scripts/run-vitest.mjs extensions/matrix/doctor-contract-api.test.ts extensions/matrix/src/doctor.test.ts extensions/matrix/src/matrix/sdk/idb-persistence.test.ts extensions/matrix/src/matrix/sdk/idb-persistence.lock-order.test.ts extensions/matrix/src/matrix/sdk/recovery-key-store.test.ts extensions/matrix/src/legacy-crypto.test.ts extensions/matrix/src/matrix/monitor/legacy-crypto-restore.test.ts extensions/matrix/src/matrix/client/storage.test.ts extensions/matrix/src/matrix/sdk.test.ts extensions/matrix/src/matrix/client/create-client.test.ts extensions/matrix/src/startup-maintenance.test.ts extensions/matrix/src/matrix/client/file-sync-store.test.ts extensions/qa-matrix/src/runners/contract/scenarios.test.ts
  • .agents/skills/autoreview/scripts/autoreview --mode local => clean, no accepted/actionable findings.

CI proof:

  • GitHub CI run 27085334195 passed, including build artifacts, lint, prod/test types, storage-state, Matrix-related extension checks, and timing summary.
  • Critical Quality selected shard run 27085334220 passed relevant selected checks.

Known local proof gap:

  • pnpm check:changed did not start because local Crabbox is 0.15.0; this checkout's Testbox delegation requires Crabbox >=0.22.0. Full GitHub CI above covered the branch after that local tooling blocker.

@steipete steipete merged commit 0566b96 into main Jun 7, 2026
174 of 176 checks passed
@steipete steipete deleted the refactor/matrix-crypto-state-sqlite branch June 7, 2026 06:57
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jun 8, 2026
wangmiao0668000666 pushed a commit to wangmiao0668000666/openclaw that referenced this pull request Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: matrix Channel integration: matrix maintainer Maintainer-authored PR size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant