chore(scripts): make onboarding reset/restore build-kind aware - #384
Closed
pnewsam wants to merge 1 commit into
Closed
chore(scripts): make onboarding reset/restore build-kind aware#384pnewsam wants to merge 1 commit into
pnewsam wants to merge 1 commit into
Conversation
Since ENG-324, each build kind keeps its state in a separate config home so builds never share a SQLite DB (~/.cowork-dev, ~/.cowork-preview, ~/.cowork-stable, ~/.cowork for prod). The reset/restore scripts only ever touched ~/.cowork (prod), so resetting onboarding while testing a dev or preview build left the DB that build actually reads untouched. - Accept a build-kind argument (default: dev) and target the matching home. - Back up/restore the whole config home (DB, .env, state.json, projects, data vault) — the .env now lives inside the home, not ~/.anton. - Move aside the legacy ~/.anton/.env and ~/.anton/cowork/state.json so migrateLegacyHome() can't silently re-seed credentials/provider choice into the fresh home and defeat the reset. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Author
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Split out from #383.
Problem
Since ENG-324, each build kind keeps its state (incl. the SQLite DB) in a separate home. The
reset-onboarding.sh/restore-onboarding.shscripts only touched~/.cowork(prod), so resetting onboarding while testing adev/previewbuild left that build's real DB untouched.Fix
Made both scripts build-kind aware. They now:
dev) and target the matching config home,.envnow lives inside it),~/.antonmigration sources so they can't silently re-seed a "fresh" home.QA
./scripts/reset-onboarding.sh(dev) → confirm~/.cowork-devstate is cleared while~/.cowork(prod) is untouchednpm run dev, accept terms → reach the "LOADING WORLD" setup screen (fresh onboarding)./scripts/restore-onboarding.shto restoreNotes
staging, notmain.🤖 Generated with Claude Code