🤖 fix: restore settings backups from the legacy mux/ managed path - #3958
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ba2419e356
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This comment has been minimized.
This comment has been minimized.
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eab04e86ef
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…check, no cross-tree validation)
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f810f54e77
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This comment has been minimized.
This comment has been minimized.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7d55ae1498
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This comment has been minimized.
This comment has been minimized.
|
@codex review Round summary: the probe read is now capped at the per-file payload limit (streaming kill, no re-fetch on over-limit). The "fall back on deep payload corruption" suggestion is resolved as by-design — a parseable Xum manifest under the configured path is the user's current backup, and silently restoring the stale pre-rename snapshot would mask corruption; the actionable INVALID_BACKUP error is the intended contract. |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Settings backups pushed before the product rename live under the legacy
mux/managed path, so a fresh Xum install pointed at the same repository failed withNo Xum backup found in 'xum/' on this branch. The backup cache now selects one effective managed path per prepare: the configured spelling, or its legacymuxspelling when only that tree carries a backup manifest. Reads and writes follow the selection, so pre-rename backups restore correctly and pushes update them in place instead of forking a secondxum/copy.Background
The Backup settings default managed path moved
mux/→xum/across the rename, but the backup cache only ever materialized (sparse checkout), validated, and read the configured directory. Rename compatibility is centralized insrc/common/compat/legacyMux.ts, so the alias lives there rather than as a scattered fallback.Implementation
legacyMux.ts:listBackupManagedPathSpellings()returns the configured spelling first, then the legacy spelling produced by replacing wholexumpath segments withmux(substrings likexum-settingsare untouched).gitRepo.ts: before checkout,resolveEffectiveManagedPathprobes the fetched commit for<spelling>/manifest.jsonwith a bounded, non-recursivels-treethat requires the entry to be a blob (a directory spelled like the manifest is rejected). Only the selected tree is validated, sparse-checked-out, staged, and diffed — junk under the unselected spelling can never block or bloat the backup in use.PreparedBackupRepository.managedPath;BackupServiceaddresses every payload operation (export, preview, validate, restore) to it. The payload store itself stays single-path.Validation
New tests:
mux/-era backup viaxum/config; push updatesmux/in place (noxum/fork); configuredxum/wins when both spellings hold backups; canonical junk (gitlink + directorymanifest.json) doesn't block selecting a valid legacy backup.Pre-existing local failures unrelated to this change (case-insensitive APFS + a SIGTERM-flaky 200-commit transfer test) fail identically on the base commit.
Risks
Low-moderate: the managed-path selection sits in the cache-materialization path all backup operations share. If selection ever picked the wrong spelling, pushes would write to that spelling — mitigated by the blob-manifest probe, configured-path precedence, and the in-place-push/no-fork tests. Behavior for repositories without any legacy spelling is unchanged (selection short-circuits to the configured path).
Generated with
xum• Model:coder:anthropic-wif/claude-fable-5• Thinking:xhigh