feat(setup-repo): offer a repo-specific env-file over the shared one#311
Draft
tildesrc wants to merge 3 commits into
Draft
feat(setup-repo): offer a repo-specific env-file over the shared one#311tildesrc wants to merge 3 commits into
tildesrc wants to merge 3 commits into
Conversation
The setup-repo task (opened by `quickstart`) now asks whether to keep the shared secrets file (panopticon.env) or give the repo its own <repo>.env, before minting a token. The repo begins on the shared file — quickstart registers it that way — and only switches when the operator picks the repo-specific option: the script creates the private <repo>.env, repoints the repo record via PATCH /repos/<id> (so future task containers source it), retargets the flow so the minted credential lands there, and forgets the shared file's already-sourced creds so the credential check reflects the new file. The choice is offered only while the repo is still on the shared file (and skipped when <repo>.env would equal panopticon.env). ShellRunner.spawn gains a repo_id it exports as PANOPTICON_REPO_ID so the script can act on the repo record over REST. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Rename the shared credentials file from panopticon.env to shared.env — it's the file every repo starts on, so a generic name reads better than the project's own. Renames the packaged template (shared.env.template) and the setup-repo choice step's shared-file constant. As a bonus the repo-specific <repo>.env no longer collides with the shared file for the panopticon repo itself (its <repo>.env is now panopticon.env, distinct from shared.env). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…-choose-env-file # Conflicts: # src/panopticon/sessionservice/shell_runner.py # src/panopticon/sessionservice/spawner.py # src/panopticon/workflows/setup_repo.sh # src/panopticon/workflows/setup_repo_lib.sh # tests/sessionservice/test_shell_runner.py # tests/sessionservice/test_spawner.py
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.
When
panopticon quickstartopens a setup-repo task, it now asks whether to keep using the shared secrets file (shared.env) or give this repo its own<repo>.envcredentials file — before setting up credentials.The repo begins on the shared file (quickstart already registers it that way) and only switches when the operator picks the repo-specific option. On that choice the script:
<repo>.envfirst (the task service won't point a repo at a missing file),PATCH /repos/<id>so future task containers source it, andPANOPTICON_ENV_FILE/env_file) so the credential lands in the new file and the "what's configured" checks reflect it.The choice is offered only while the repo is still on the shared file, and skipped when
<repo>.envwould just equalshared.env(a repo literally named "shared").This branch also renames the shared credentials file from
panopticon.envtoshared.env— it's the file every repo starts on, so a generic name reads better than the project's own (and the panopticon repo's own<repo>.envno longer collides with the shared file).To let the script act on the repo record,
ShellRunner.spawngains arepo_idit exports asPANOPTICON_REPO_ID; two new shell helpers (ensure_private_env_file,set_repo_env_file) live insetup_repo_lib.sh.Merged latest
main(incl. #310's setup-repo rewrite: repo-aware summaries, adopt/paste/mint credential flows, and thenew-sessionimsg-cap minify fix); the env-file choice is integrated into that flow as its first step.Plan:
plan.mdartifact on the task.