Repository navigation
feat: recover from CC Switch configs and track asset snapshots - #6
Merged
Merged
Conversation
Adds a third recovery source (CC Switch's stored provider configs), reports asset-snapshot coverage in status/doctor, and launches the Startup loop through the WMI service so the immediate helper survives the installer session. - ccswitch recover [--provider NAME] [--db FILE] [--apply]: pick the stored config with the most protected paths, merge with overlay_wins, pre-recover backup - state.json records the last asset snapshot; status prints it; doctor warns when missing or older than 30 days - hidden VBS launcher created via Invoke-CimMethod Win32_Process Create (escapes the caller job object) - regression tests for CC Switch recovery, snapshot state, and the WMI launcher
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.
Summary
Three expansions for the recovery/protection lifecycle:
ccswitch recover— when both the store baseline and Codex's own backups are gone, scan the Codex provider configs stored in CC Switch, pick the one protecting the most user-owned paths (current provider wins ties), merge it withoverlay_wins, and take apre-recoverbackup. Dry-run by default;--providerselects by id or name.backuprecords the snapshot instate.json;statusprints it;doctorwarns when no snapshot exists or the newest is older than 30 days.Invoke-CimMethod Win32_Process Create) via a hidden VBS launcher, so it is not a member of the installer's job object. The previouscmd /C start+DETACHED_PROCESShelper was reaped when the installing session ended, leaving the machine unprotected until the next logon.Verified
clippy -D warningsandfmt --checkclean.