Skip to content

refactor(matrix): retire pre-July JSON sidecar migrations - #163383

Merged
steipete merged 1 commit into
mainfrom
deslop/l294-migrations-channels2-matrix-sidecars-20261001
Oct 2, 2026
Merged

steipete merged 1 commit into
mainfrom
deslop/l294-migrations-channels2-matrix-sidecars-20261001

Conversation

@steipete

@steipete steipete commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Retires five Matrix JSON state migrations whose last shipped writers predate the July 2026 support window.

User Impact

Upgrades from pre-July-2026 versions are no longer migrated: recovery-key.json, legacy-crypto-migration.json, crypto-idb-snapshot.json, storage-meta.json, and inbound-dedupe.json. Doctor and affected runtime paths preserve those sources and direct operators through OpenClaw 2026.9.5, its Doctor, and one Matrix startup before retrying the current release.

Supported SQLite keys, metadata, crypto snapshots, replay markers and schema upgrades remain intact. Credential JSON and bot-storage.json sync-cache migrations stay: July code still produced those inputs, including Doctor's flat-to-account sync-cache relocation. No public Plugin SDK or SQLite schema change.

Why This Change Was Made

Recovery-key, legacy crypto status, and IndexedDB file writers ended in 0566b969274 on June 6; published v2026.6.5-beta.2 still wrote them, while beta.3 shipped SQLite on June 8. Storage metadata's writer ended in 1a3ded761e0 on June 16 (v2026.6.8 last writer; v2026.6.9-beta.1 first replacement). Inbound dedupe's JSON writer ended in 84a965a1a27 on May 30, first shipped in v2026.5.30-beta.1 on May 31. July's normal, recovery, server-backup and importer paths write canonical SQLite; external IndexedDB is in memory and has no independent file writer.

Deletes the JSON decoders/importers, obsolete migration declarations, exclusive fixtures, and the generic factory left with only one sync-cache consumer. Existing Doctor step ordering and the inbound migration completion key remain. SQLite authority, atomic updates, chunk digest checks, retention ordering, and archive exclusion are preserved. Recovery fixture setup now shares its existing test-support owner instead of duplicating payload writes.

Measured reduction: 671 production TypeScript lines, plus three manifest lines.

Evidence

  • Independent isolated review: no actionable findings through P2.
  • Thirteen focused Matrix owner suites passed, including the intact shipped July account SQLite fixture through Doctor. After final private-API cleanup, all 187 tests in the five affected crypto/storage suites passed again.
  • Doctor state/config suites, 1,132 plugin contracts, Matrix asset generation, and both zero-cycle checks passed. Full changed-file validation passed, including broad extension lint and all three zero-entry dead-export scans.
  • The line-cap gate caught duplicated recovery fixture setup, which moved into existing test support without losing assertions. Knip then identified retirement-orphaned exports; these became private, and tests moved to the actual snapshot API. No baseline exception, retry, timeout increase, or weaker assertion was added.
Linux single-worker test wall times

Measured with pnpm test <file> --maxWorkers=1, including compiler preparation when needed. SDK and IndexedDB numbers are from the final API cleanup; the other timings are from the passing retirement candidate:

Test owner Seconds
Doctor archive scan 14.38
Doctor capacity 11.31
Doctor cold import 2.78
Doctor state migrations 18.14
Client storage admission 15.58
Storage/root selection 29.92
Matrix SDK 24.08
IndexedDB persistence 18.16
Recovery-key store 24.50

All execution used a pinned isolated AWS checkout with verified candidate bytes. The observed merge conflict with main commit b23a3416050 was resolved by preserving its public error helper; 70 affected tests, all 1,132 plugin contracts and both cycle checks passed after that change. Affected changed-file validation and a fresh P2 review also passed. The earlier full retirement/July fixture proof applies to unchanged inputs. Hosted CI passed on head d7f7f11dafaeaea39f5a5ab2d9bd152b2ee87575; extension bundle jobs took 124s and 282s. Merged as 70828f0ba5957642e4e66a042b1c6eadb3db76d2; ancestry and unchanged merged Matrix source verified.

@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: matrix Channel integration: matrix size: XL labels Oct 2, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 2, 2026
@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 2, 2026, 4:40 AM ET / 08:40 UTC (Revision 3).

ClawSweeper review

What this changes

The Matrix plugin removes five pre-July JSON importers, preserves retired files with intermediate-upgrade guidance, and retains supported SQLite, credential, and sync-cache migrations.

Merge readiness

⛔ Blocked before merge - 3 items remain

Keep open: the cleanup remains distinct from current main, and no blocking code defect was identified. The earlier upgrade-safety evidence gap remains unresolved.

Priority: P2
Reviewed head: d7f7f11dafaeaea39f5a5ab2d9bd152b2ee87575

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused cleanup has useful validation and no concrete correctness finding, but unresolved upgrade compatibility limits merge readiness.
Proof confidence 🌊 off-meta tidepool Not applicable: The repository-state MEMBER association exempts this PR from ordinary external-contributor proof. Reported Doctor and Matrix storage fixtures support the changed owners, but independent existing-state compatibility remains insufficient: no published-updater trace establishes safe activation or recovery when retired files are refused.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The repository-state MEMBER association exempts this PR from ordinary external-contributor proof. Reported Doctor and Matrix storage fixtures support the changed owners, but independent existing-state compatibility remains insufficient: no published-updater trace establishes safe activation or recovery when retired files are refused.
Evidence reviewed 9 items Introduced change: Inspected the pinned merge-base-to-head production and test diff. The change removes JSON importers and adds source-preserving admission checks; unrelated base-branch changes were excluded.
Retirement fits the documented support policy: The retention policy permits retiring formats last written before July 1, 2026 when refusal preserves data and names an intermediate release. The PR provides writer-history claims and directs operators through 2026.9.5; this direction is consistent with the existing policy.
Refusal occurs before client storage migration: The client checks retired files before importing the supported sync cache. Its factory calls this admission path before creating the persistent sync store. Doctor likewise checks retired files before account schema repair.
Findings None None.
Security None None.

How this fits together

Matrix stores account identity, encryption material, sync state, and replay markers locally. Doctor repairs older state before the Matrix client uses it to connect and process messages.

flowchart TD
  A[Existing Matrix account state] --> B[Doctor and client admission]
  B --> C{Supported format?}
  C -->|Yes| D[SQLite state and supported imports]
  D --> E[Matrix client and message processing]
  C -->|No| F[Preserve files and explain recovery]
  F --> G[Intermediate release migration]
Loading

Before merge

  • Resolve merge risk (P1) - Existing installations carrying the five retired JSON formats will stop at Matrix admission and require an intermediate upgrade. Published-updater evidence has not established supported-state upgrade success or source-preserving refusal with the previous Gateway available and rollback working.
  • Complete next step (P2) - Provide published-updater-to-candidate evidence showing supported Matrix upgrades and safe retired-state refusal, including source preservation, previous-Gateway availability, and rollback recovery.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source -674, Tests -75, Docs +3. Total -746 across 24 files.

View PR surface stats
Area Files Added Removed Net
Source 11 125 799 -674
Tests 11 453 528 -75
Docs 2 12 9 +3
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 24 590 1336 -746

Review metrics

Metric Value Why it matters
Retired upgrade inputs 5 JSON formats These existing installations now require an intermediate release rather than direct migration.

Stored data model

Persistent data-model change detected: durable storage schema: extensions/matrix/src/matrix/client/storage-metadata.ts, durable storage schema: extensions/matrix/src/matrix/client/storage.ts, migration/backfill/repair: extensions/matrix/openclaw.plugin.json, migration/backfill/repair: extensions/matrix/src/matrix/crypto-snapshot-doctor.runtime.ts, migration/backfill/repair: extensions/matrix/src/matrix/crypto-state-store.ts, migration/backfill/repair: extensions/matrix/src/matrix/retired-state.ts, and 9 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Verify the published upgrade boundary (recommended)
    Provide published-updater-to-candidate evidence for supported Matrix state and retired-state refusal, including preserved sources, previous-Gateway availability, and rollback recovery.

Technical review

Best possible solution:

Keep the plugin-owned retirement and recovery guidance, with verified upgrade and rollback behavior across the published updater boundary.

Do we have a high-confidence way to reproduce the issue?

Not applicable to this cleanup PR; source inspection establishes the changed admission behavior, but no published-updater scenario was executed during this review.

Is this the best way to solve the issue?

Yes, removing obsolete readers at the Matrix owner fits the documented retention policy; complete upgrade-boundary evidence is still needed to establish safe deployment.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 2ab22d8772fb.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is bounded Matrix maintenance with a meaningful legacy-upgrade compatibility concern.
  • merge-risk: 🚨 compatibility: Merging removes direct migration for five persisted formats and makes affected operators upgrade through 2026.9.5.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The repository-state MEMBER association exempts this PR from ordinary external-contributor proof. Reported Doctor and Matrix storage fixtures support the changed owners, but independent existing-state compatibility remains insufficient: no published-updater trace establishes safe activation or recovery when retired files are refused.

Evidence

What I checked:

  • Introduced change: Inspected the pinned merge-base-to-head production and test diff. The change removes JSON importers and adds source-preserving admission checks; unrelated base-branch changes were excluded. (d7f7f11dafae)
  • Retirement fits the documented support policy: The retention policy permits retiring formats last written before July 1, 2026 when refusal preserves data and names an intermediate release. The PR provides writer-history claims and directs operators through 2026.9.5; this direction is consistent with the existing policy. Public docs: docs/gateway/doctor/config-migrations.md. (docs/gateway/doctor/config-migrations.md:33, d7f7f11dafae)
  • Refusal occurs before client storage migration: The client checks retired files before importing the supported sync cache. Its factory calls this admission path before creating the persistent sync store. Doctor likewise checks retired files before account schema repair. (extensions/matrix/src/matrix/client/storage.ts:294, d7f7f11dafae)
  • Current main and release still retain the import declarations: Both fetched main and v2026.9.7 declare storage-metadata, recovery-key, and legacy-crypto migrations removed by this branch. Current main's retirement helper covers the earlier retirement work, rather than this complete cleanup. (extensions/matrix/openclaw.plugin.json:10, 2ab22d8772fb)
  • Latest release context: The latest release manifest retains the three JSON migration declarations removed by this PR; the requested cleanup is not already shipped. (extensions/matrix/openclaw.plugin.json:10, c074824a27c9)
  • Upgrade proof remains distinct from fixture validation: The captured PR body reports isolated Matrix suites, a shipped July SQLite fixture through Doctor, and subsequent focused validation. Those are useful supplemental checks, but it supplies no published-updater-to-candidate result showing supported upgrades and safe refusal with previous-Gateway availability and rollback. The prior completed review requested precisely that evidence. (d7f7f11dafae)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Raw commit b23a341 adds extensions/matrix/src/matrix/retired-state.ts:2 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: b23a34160504; files: extensions/matrix/src/matrix/retired-state.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add published-updater-to-candidate evidence for supported-state upgrades and source-preserving refusal with previous-Gateway availability and rollback recovery.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-02T08:21:32.041Z sha c81bd87 :: blocked before merge. :: none
  • reviewed 2026-10-02T08:28:07.579Z sha c81bd87 :: blocked before merge. :: none

@steipete
steipete force-pushed the deslop/l294-migrations-channels2-matrix-sidecars-20261001 branch from c81bd87 to d7f7f11 Compare October 2, 2026 08:35
@steipete
steipete enabled auto-merge (squash) October 2, 2026 08:36
@steipete
steipete merged commit 70828f0 into main Oct 2, 2026
114 of 116 checks passed
@steipete
steipete deleted the deslop/l294-migrations-channels2-matrix-sidecars-20261001 branch October 2, 2026 08:44
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 3, 2026
…63383)

Retire pre-July Matrix recovery-key, legacy crypto status, IndexedDB snapshot, storage metadata, and inbound-dedupe JSON imports. Leave retired sources intact with intermediate-upgrade guidance, and preserve supported July SQLite and sync-cache migration contracts.

Focused Matrix suites, the shipped July SQLite fixture through Doctor, Doctor suites, plugin contracts, changed-file checks, both import-cycle checks, and independent review passed. Preserve the public error helper fix from main during conflict resolution.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: matrix Channel integration: matrix docs Improvements or additions to documentation merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL 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