Legacy settings import renames the document before importing, then swallows per-section failures — partial configuration loss on upgrade #7672
Ragnoryok1
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary.
SettingsForms.importLegacyDocument()renames the removedsettings.yamltosettings.yaml.importedbefore it writes any section into the active profile, then catches each section's failure and only logs it. A section whose plugin entry is not mounted at that moment — or whose entry rejects the write for a different reason — is silently dropped, and because the rename already happened the import is never retried.Where
packages/settings/settings/src/index.ts:241-257—rename(path, imported)at:246, the loop at:248-255, bothlogger.warncalls at:253-254.:235— the whole import is a fire-and-forgetvoid ctx.root.loader.await().then(() => this.importLegacyDocument()), so even a total failure is only logged.:238-240states the behaviour is intentional ("a section the running composition rejects is logged and remains only in the renamed file"). My report is not about the log line — it is that the user gets no actionable signal, there is no retry, and the rename makes the loss one-shot and unrepeatable.Evidence from my machine (Windows, 0.1.7-alpha.2). After the upgrade
settings.yamlno longer existed; the only copy issettings.yaml.imported(19.3 KB), alongside a series of timestampedsettings.yaml.bak-*files. Of the eight sections in.imported, seven have a counterpart in the active profile patch (ui-theme,agent-default-model,locale,llm-pi-ai,ui-chat,llm-deepseek, andui-onboardingvia its mapping inLEGACY_SECTION_ENTRIES:203), butagent-presetshas none — no entry of that name in the active patch and no mapping in that table. That is the shape this defect produces: one section missing, no error, the original preserved only in a renamed file.Suggested directions
write()but is not transient), since the samecatchcurrently covers both.Question. Is rename-before-import deliberate as a one-shot-migration guarantee? If so, was a user-visible notice intended, and would import-then-rename break an invariant I cannot see?
All reactions