refactor(settings): decouple standalone CLI onto its own ~/.anton/.env - #313
Draft
pnewsam wants to merge 1 commit into
Draft
refactor(settings): decouple standalone CLI onto its own ~/.anton/.env#313pnewsam wants to merge 1 commit into
pnewsam wants to merge 1 commit into
Conversation
Drop ~/.cowork/.env from the CLI env-file chain so the standalone `anton` CLI owns its own ~/.anton/.env instead of reading the Cowork desktop's mirror (ENG-1295). Remove the now-vestigial desktop_first_run path and its _desktop_greeting/_GREETING_EXAMPLES helpers — a desktop-configured machine now falls through to anton's own onboarding rather than inheriting creds. Part of retiring the DB->.env export (ENG-1295); pairs with the cowork-server decoupling PR. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
The standalone
antonCLI now owns its own~/.anton/.envand no longer reads the Cowork desktop's~/.cowork/.envmirror.~/.cowork/.envfrom the env-file chain in_build_env_files(config/settings.py).~/.anton/.envis authoritative for the standalone CLI; anton's own onboarding already writes it.desktop_first_runpath and its_desktop_greeting/_GREETING_EXAMPLEShelpers (cli.py,chat.py). With the mirror gone, a desktop-configured machine has no inherited key and falls through to anton's own_onboard()instead of the greeting.Why
Part of retiring the DB→
.envexport (ENG-1295). The mirror only shadowed config the CLI already owns and was the last file-based settings path behind the desync bug class. Decoupling lets the export be deleted server-side and removes the whole class for the standalone CLI.When anton runs embedded in cowork-server, the harness builds settings with the DB overlay and no
.envbase (AntonSettings(_env_file=None)), so this chain applies only to the standalone CLI.Tradeoff
Drops "configure once in the desktop, standalone CLI inherits the credentials." A desktop-configured user who runs
antonin a terminal onboards the CLI once. Accepted: the inheritance was convenience, not correctness.Testing
uv run pytestsettings/chat/onboarding slice: 125 passed, 4 skipped.py_compileclean.Draft — pairs with the cowork-server decoupling PR; ship this first so standalone users migrate cleanly. Tracked in ENG-1295.
🤖 Generated with Claude Code