Repository navigation
Conversation
The devcontainer now pulls ghcr.io/blooop/python_template/devcontainer:latest instead of building the image locally. - The duplicate claude-code `features` block is gone. The feature is baked into that image already (ci/devcontainer.json is what CI builds it from, and that declares ../claude-code), so declaring it here made the spec build a derived image on the first launch of every branch and reinstall what the pulled image already had. - `--network=host` is gone. A container per branch is the point of `dl`, and host networking undoes it: every port a dev server binds becomes a host port, so two branches collide on the first one they share. - The `~/.ssh` and `~/.config/gh` mounts are gone. `dl` supplies GH_TOKEN, and the gh mount never worked in the first place because gh keeps its token in the system keyring, so the mounted hosts.yml carried no oauth_token. - `name` moved to the end of the file. It is the only per-repo line here, and sitting next to the image block -- the block the template changes most -- it conflicted on every `pixi run update-from-template-repo`. This repo also had a stale `python_template` there, so the move corrects it to `rockervsc`. The tree is byte-identical to blooop/python_template#170 apart from that name. Separately, and unrelated to the image change, this deletes two files that went with the directory: .devcontainer/workflows/ci.yml and .devcontainer/workflows/publish.yml. Nothing ever ran them. GitHub only reads .github/workflows/, so a workflow file sitting at .devcontainer/workflows/ has never executed once. Both are duplicates of live files that are already in the right place: publish.yml is byte-identical to .github/workflows/publish.yml (md5 8129c42a for both), and ci.yml is an older copy of .github/workflows/ci.yml -- it still pins actions/checkout@v4, prefix-dev/setup-pixi@v0.8.1 and codecov/codecov-action@v4 where the live one is on v5, v0.9.1 and v5. Nothing in the repo references the path. They arrived in 058bfe5 (2024-10-29), a merge from the template that dropped them in the wrong directory, and nothing has touched them since. .github/workflows/ is deliberately left exactly as it is.
Reviewer's GuideSynchronizes the devcontainer with python_template's zero-build model by pulling a published image, moves Claude Code installation into the CI image build, removes conflicting and ineffective runtime settings, adds a local Claude Code feature with host-backed credentials, and deletes unused workflow duplicates. Sequence diagram for launching a branch devcontainersequenceDiagram
participant Dev as Developer
participant Runtime as Devcontainer runtime
participant GHCR as GHCR image registry
participant Host as Host ~/.claude
participant Container as Branch container
Dev->>Runtime: Start branch devcontainer
Runtime->>GHCR: Pull devcontainer:latest
GHCR-->>Runtime: Return prebuilt image
Runtime->>Host: Bind-mount ~/.claude
Runtime->>Container: Set CLAUDE_CONFIG_DIR
Container->>Host: Read and refresh Claude credentials
Container-->>Dev: claude CLI available without rebuild
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #91 +/- ##
=======================================
Coverage 35.41% 35.41%
=======================================
Files 1 1
Lines 48 48
=======================================
Hits 17 17
Misses 31 31 🚀 New features to boost your workflow:
|
The earlier commit on this branch removed the ~/.config/gh bind mount and
justified it with the claim that the mount never worked -- that `gh` keeps its
token in the system keyring, so the mounted hosts.yml carries no oauth_token.
That claim is false on this machine. ~/.config/gh/hosts.yml carries a real
oauth_token, and in a running container using that mount, with GH_TOKEN and
GITHUB_TOKEN unset, `gh auth status` reports:
Logged in to github.com account blooop (/home/vscode/.config/gh/hosts.yml)
gh writes to a keyring only where one is available and falls back to the file
otherwise, so the keyring claim held for some environment but not this one, and
it got generalised into the config as if it always held.
Nothing broke under `dl`, which is why it went unnoticed: `dl` forwards
GH_TOKEN, devpod applies workspace env after the devcontainer's own, and the
env token wins wherever both are present. The entry paths that lost gh auth
they previously had are the non-`dl` ones -- a plain `devpod up`, and VS Code's
Reopen in Container. So the mount comes back.
The ~/.ssh removal is unaffected and stays removed. It was verified separately
in a live container: devpod forwards an ssh agent at a socket path of its own,
`ssh-add -l` lists the host key, and `git ls-remote` against a git@github.com:
origin succeeds with an empty ~/.ssh. The old hardcoded
SSH_AUTH_SOCK=/home/vscode/.ssh/agent.sock actively overrode that working
forwarded socket, so it stays gone too.
|
Pushed a correction to this branch. The earlier commit removed the Nothing broke under The |
…rek-install Synced from blooop/python_template. The previous postCreateCommand ended in `pixi run prek-install`. This repo does not define that task, so `pixi run` exited 127, the lifecycle hook failed, and container creation failed outright -- the workspace never came up. Found by launching the container; neither JSON validation nor CI sees it. postCreateCommand now calls .devcontainer/post-create.sh, which runs the task only where it exists. The script also seeds known_hosts. devpod forwards an ssh agent, so the host's ~/.ssh does not need mounting -- but the agent carries authentication, not host identity, and on a fresh container the first git operation over an ssh remote died with "Host key verification failed". Interactive users can click through that; scripts, agents and in-container CI cannot.
The devcontainer now pulls ghcr.io/blooop/python_template/devcontainer:latest
instead of building the image locally.
featuresblock is gone. The feature is baked intothat image already (ci/devcontainer.json is what CI builds it from, and that
declares ../claude-code), so declaring it here made the spec build a derived
image on the first launch of every branch and reinstall what the pulled image
already had.
--network=hostis gone. A container per branch is the point ofdl, andhost networking undoes it: every port a dev server binds becomes a host port,
so two branches collide on the first one they share.
~/.sshand~/.config/ghmounts are gone.dlsupplies GH_TOKEN, andthe gh mount never worked in the first place because gh keeps its token in the
system keyring, so the mounted hosts.yml carried no oauth_token.
namemoved to the end of the file. It is the only per-repo line here, andsitting next to the image block -- the block the template changes most -- it
conflicted on every
pixi run update-from-template-repo. This repo also had astale
python_templatethere, so the move corrects it torockervsc.The tree is byte-identical to blooop/python_template#170 apart from that name.
Separately, and unrelated to the image change, this deletes two files that went
with the directory: .devcontainer/workflows/ci.yml and
.devcontainer/workflows/publish.yml.
Nothing ever ran them. GitHub only reads .github/workflows/, so a workflow file
sitting at .devcontainer/workflows/ has never executed once. Both are duplicates
of live files that are already in the right place: publish.yml is byte-identical
to .github/workflows/publish.yml (md5 8129c42a for both), and ci.yml is an older
copy of .github/workflows/ci.yml -- it still pins actions/checkout@v4,
prefix-dev/setup-pixi@v0.8.1 and codecov/codecov-action@v4 where the live one is
on v5, v0.9.1 and v5. Nothing in the repo references the path. They arrived in
058bfe5 (2024-10-29), a merge from the template that dropped them in the wrong
directory, and nothing has touched them since.
.github/workflows/ is deliberately left exactly as it is.
Depends on blooop/python_template#170. The published image already exists and is
public, so this works before that merges.
🤖 Generated with Claude Code
Summary by Sourcery
Synchronize the development container with the zero-build template by adopting the published image and adding the shared Claude Code setup.
New Features:
Bug Fixes:
Enhancements:
Documentation:
Chores: