Repository navigation
fix(matrix): preserve unrelated files when migration fails - #144883
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 11, 2026, 7:39 AM ET / 11:39 UTC. ClawSweeper reviewWhat this changesThe PR removes invalid filesystem rollback during Matrix migration failures, adds preservation-and-retry regression coverage, and corrects recovery guidance. Merge readiness✅ Ready for maintainer review This remains a useful, focused fix: current main and v2026.9.4 retain the reported failure path. No introduced correctness or security defect was found. Priority: P2 Review scores
Verification
How this fits togetherMatrix client startup imports legacy sync and recovery files into plugin-owned SQLite stores. Each store preserves committed data and archives imported files so startup can retry unfinished migration work. flowchart TD
A[Matrix client startup] --> B[Legacy files present]
B --> C[Import into SQLite stores]
C --> D[Archive imported files]
D --> E[Continue startup]
C --> F[Migration failure]
D --> F
F --> G[Preserve completed work and retry]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -18, Tests +105, Docs 0. Total +87 across 3 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep import and archive recovery with the existing SQLite owners, and never interpret migration display descriptions as filesystem destinations. Do we have a high-confidence way to reproduce the issue? Yes: current-main source supports the reported sequence of successful recovery-key archival, later archive failure, and rollback moving a matching sibling file. The linked report records the failing regression; this review did not execute it. Is this the best way to solve the issue? Yes: removing the invalid compensation is the narrowest repair because it cannot undo SQLite writes or actual archives, while the existing owners already preserve canonical values for retry. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b5907743200d. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* commit 'f2ce199238e974b1d4caff8f11112aa51eb00d9e': (310 commits) refactor(copilot): deduplicate transcript user text (#144888) refactor(sessions): await discovery and config readiness (#144854) refactor(e2e): deduplicate release file assertions (#144904) ci: keep growing hosted test plans within the job cap (#144965) fix(macos): avoid stale dashboard command assertions (#144710) refactor(memory): await standing intent operations (#144832) refactor(ui): derive native device settings types from schemas (#144705) refactor(memory): await journal operations and allocate sequences atomically (#144824) refactor(tests): share command field assertions (#144955) refactor(matrix): share bounded context cache insertion (#144939) refactor(i18n): share Apple catalog reader (#144848) fix(doctor): preserve legacy registry files when quarantine fails (#144787) refactor(tests): reuse PixVerse auth fixtures (#144926) fix(bonjour): silence transient ENODEV socket warnings (#144870) fix(matrix): preserve unrelated files when migration fails (#144883) feat(sqlite): run Team Reports storage in owned workers (#144871) fix(update): install explicit same-version artifacts (#144894) refactor(ui): share cached message extraction (#144244) refactor: normalize Claude usage responses at one boundary (#144707) refactor: simplify CLI child listener registration (#144929) ...
Closes #144882
What Problem This Solves
Fixes an issue where a failed Matrix sidecar migration could move an unrelated sibling file into
recovery-key.jsonwhen its name matched a human-readable SQLite destination label. Retrying left the file misplaced.Why This Change Was Made
Remove filesystem compensation over those display labels and name the remaining records as migration descriptions. Preserve the actual SQLite owners, import and archive order, canonical-value precedence, successful logs, and original error prefix/cause. Correct the stale documentation to describe the already-shipped per-file import and retry behavior.
User Impact
A failed import preserves unrelated files, committed SQLite state, actual archives, and remaining inputs for retry. No schema, transaction, retention, account, or lease behavior changes.
Evidence
A real SQLite/temp-file regression passed without the sentinel and failed on original code by moving its exact bytes into the legacy recovery filename, both before and after closed-handle retry. After the repair, all 66 tests across storage, sync-cache, recovery-key, and Doctor migration suites passed. The changed-code gate and fresh review also passed; five underlying persistence/client owners remain byte-identical.
Complete change: −17 production code lines, +100 test code lines, and unchanged documentation line count, for +83 code lines overall. This is a correctness fix, with no net-reduction claim. No live Matrix service or real credentials were used.