Repository navigation
fix(matrix): fresh installs no longer report an empty inbound dedupe migration in doctor changes - #122808
Merged
Conversation
…installs On a pristine profile, onboarding/doctor printed "Auto-migrated legacy state: Recorded Matrix inbound dedupe migration completion (0 SQLite roots, 0 JSON roots scanned)" even though nothing was migrated. Keep the durable empty-scan receipt (it still prevents later historical databases from being opened) but only emit the user-visible change line when at least one SQLite/JSON root was scanned.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
steipete
marked this pull request as ready for review
August 12, 2026 20:46
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 13, 2026
…installs (openclaw#122808) On a pristine profile, onboarding/doctor printed "Auto-migrated legacy state: Recorded Matrix inbound dedupe migration completion (0 SQLite roots, 0 JSON roots scanned)" even though nothing was migrated. Keep the durable empty-scan receipt (it still prevents later historical databases from being opened) but only emit the user-visible change line when at least one SQLite/JSON root was scanned.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Fixes an issue where a pristine fresh OpenClaw profile's onboarding/doctor run printed a "Doctor changes" panel entry — "Auto-migrated legacy state: Recorded Matrix inbound dedupe migration completion (0 SQLite roots, 0 JSON roots scanned)" — on a brand-new install with nothing to migrate. Migration bookkeeping noise on the default out-of-box path.
Why This Change Was Made
The empty-scan durable receipt is intentional and stays exactly as is: it prevents a later-appearing historical database from being opened by the completed migration. Only the user-visible
changesline is now suppressed when zero SQLite/JSON roots were scanned; any real scan (≥1 root) still reports the receipt line. The doctor panel already skips emptychangesarrays (src/infra/state-migrations.doctor.ts), so a silent receipt produces no panel entry.User Impact
Fresh installs no longer see a confusing "Auto-migrated legacy state" panel entry during onboarding/doctor. Installs with actual legacy Matrix inbound dedupe state see unchanged output.
Evidence
extensions/matrix/doctor-contract-api.test.ts("records an empty legacy scan silently and then skips historical databases"): assertschanges: []on a fresh state dir, then proves the durable receipt still exists by dropping a historical database afterward and asserting detection stays null. Fails pre-fix (old code pushed the 0/0 line).node scripts/run-vitest.mjs extensions/matrix/doctor-contract-api.test.ts extensions/matrix/doctor-contract-api.capacity.test.ts→ 2 files, 19 tests passed.