Skip to content

feat(reset): keep edited home files when a preserved-home reset updates defaults - #285

Draft
deviantintegral wants to merge 2 commits into
vm-update-noticesfrom
preserve-home-defaults
Draft

deviantintegral wants to merge 2 commits into
vm-update-noticesfrom
preserve-home-defaults

Conversation

@deviantintegral

Copy link
Copy Markdown
Member

No description provided.

deviantintegral and others added 2 commits October 27, 2026 10:44
…es defaults

A --preserve-home reset restores the old home before finalize, and
finalize then overwrote every config file sand provisions, losing any
change a user or agent had made. Home files are now written through a
small installer (/usr/local/libexec/sandbar-safe-home-file) that records
the exact bytes it installed under ~/.config/sandbar/home-baselines/. On
a later preserved-home reset it replaces a file only if it still matches
that baseline; an edited, untracked, deleted or symlinked file is left as
it is and the new default is written to
~/.config/sandbar/proposed-defaults/ for review. A symlinked parent
directory aborts the reset with its recovery archives kept.

Finalize now receives sand_fresh_clone, sand_preserved_home and
sand_preserved_agents so roles can tell a fresh guest from a restored
one. The fresh clone's own baselines are cleared before the old home is
restored, so a VM from before this change has unknown, not "unchanged",
files. On a preserved home the project role leaves stored GitLab
credentials alone and clones with a temporary credential instead.

Behaviour change: an existing ~/.claude/settings.json on a preserved
home is no longer migrated in place (for example remoteControlAtStartup
forced off); the migrated settings are offered in proposed-defaults.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SCTT8TiEsACEMbcMiXT2uj
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SCTT8TiEsACEMbcMiXT2uj

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant