Repository navigation
fix(update): ignore Finder metadata when discovering recovery sets - #186664
Closed
yy19971996 wants to merge 1 commit into
Closed
yy19971996 wants to merge 1 commit into
yy19971996 wants to merge 1 commit into
Conversation
readUpdateRecoveryBackups() enumerates every entry of the update-capture root and must classify each as a sealed or incomplete capture. It already exempts the privacy marker, Doctor schema archives, and rehearsal scratch, but a regular .DS_Store fell through to the final non-capture throw. That throw aborts the whole scan, so one Finder metadata file reported every recovery set as unavailable and hid the captures an interrupted update would need. Skip a regular file named .DS_Store at discovery. Dotfiles and non-UUID names stay admissible otherwise: requiring marker files or UUID-shaped names would change admission of malformed recovery evidence, which must still be reported.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
yy19971996
marked this pull request as ready for review
October 28, 2026 09:24
Contributor
Author
|
Superseded by #186663, which fixes the same discovery bug at the same owner with a marker-based admission contract plus docs. This narrower |
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.
Closes #186650
What Problem This Solves
Fixes:
openclaw update statusreports every update recovery set as unavailable when a Finder.DS_Storefile sits in the update-capture directory — routine on macOS — hiding the retained captures that an interrupted update would need.User Impact
Recovery state stays inspectable on macOS.
openclaw update statuslists the valid and incomplete captures again instead ofUpdate recovery sets unavailable: Unresolved update capture …/.DS_Store has incomplete publication, and no manualfind … -name .DS_Store -deleteis required. The stray file is left untouched, and capture validation plus incomplete-evidence reporting are unchanged.Why This Change Was Made
readUpdateRecoveryBackups()enumerates every entry in<state>.update-captures/and must classify each as a sealed or incomplete capture. It already exempts the privacy marker, Doctor schema archives, and rehearsal scratch, but a regular.DS_Storefell through to the final non-capture throw. That throw aborts the whole scan, so one OS metadata file suppressed every recovery set.The fix adds a narrow exemption for a regular file named
.DS_Storeat the discovery step. It deliberately does not filter dotfiles or non-UUID names in general: requiring marker files or UUID-shaped names would change admission of malformed recovery evidence, which must still be reported. A directory named.DS_Store, symlinks, and every other unexpected entry still reach the existing validation.Evidence
Real CLI, same fixture before and after (
node --import tsx src/index.ts update status --json, isolatedOPENCLAW_STATE_DIR). The capture root holds.DS_Store, one sealed capture with a committed outcome, and one incomplete capture directory.Before (
eba63b90f, no fix) — the two real captures disappear behind the stray file:{"recoverySetsError": "Unresolved update capture /…/state.update-captures/.DS_Store has incomplete publication. Inspection only: openclaw update status --json; npx openclaw@latest doctor --fix. Earlier captures are retained."}After —
recoverySetsErrorabsent, both captures listed,.DS_Storeunmodified:Regression (red on base, green with the fix):
vitest run src/cli/update-cli/status.recovery.test.ts→ 17 passed. With the source change stashed, the new case fails onexpected {…} to not have property "recoverySetsError"; with it, it passes.update-repair-triage.test.ts→ 2 passed.Checks:
oxlint0 warnings / 0 errors on both files;run-format.mts --list-differentclean;git diff --checkclean. Typecheck leaftsconfig.core.test.cli-update.json: 57 errors, identical profile on base and head, none in the changed files — all in untouched files (TS2883vitest/undici declaration portability from this worktree's symlinkednode_modules).pnpm check:changedcould not run here (heap OOM in this sandbox).Environment note:
pnpm openclawandnode openclaw.mjswere unavailable in this checkout — the dev runner refuses to publish runtime artifacts while the host Gateway is running, andpnpm buildrejects a worktree with symlinkednode_modules. The evidence therefore drives the shipped CLI command implementation from source.AI Assistance
This PR is AI-assisted. Used shell tools (
gh,git diff,grep) to traceupdate statusinto the capture scan and to build the before/after CLI fixture; the fix and its regression test were written by the assistant. The implementer understands the change: discovery must skip OS metadata files while still surfacing sealed and incomplete captures.