Move the login volumes to the shared feature, and add gh's - #75
Merged
Conversation
Builds on #76, which persisted the Codex login by declaring its volume in each committed variant. Two things were left. gh was not covered, and has the same problem for the same reason: its configuration lives in the container's home, so every rebuild costs a fresh `gh auth login` - which is noticed one push later rather than at the rebuild. And the volume was declared twice, in linux/ and in wslg/, which is one place too many for a mount both variants want. It belongs where ~/.platformio already is: the shared feature, which every variant loads. That also covers a variant nobody had thought about - wslg had the same gap and was fixed by the same line. So the two per-variant declarations come out again; leaving them in would put two mounts on one target, which fails container creation rather than being ignored. The Dockerfile seeds ~/.config/gh beside ~/.codex, at 0700 for both: an empty named volume takes its ownership from the path it covers, and gh refuses to read a config directory others can enter. The README's two passages became one. #76 put its section high up, where somebody looking for it will find it, and that is where this stays - carrying both volumes now, the reason they are in the feature, and the seeding. Further down, the sentence #76 struck out is replaced rather than left as a gap: what must stay out of a committed variant is a secret or an internal address, and a mount line is neither. Not verified by a build. There is no Docker daemon in the container, so what was checked is that the JSON parses and that no variant now collides with the feature on a mount target. The test is two rebuilds of the Linux variant: the first creates the volumes, the second is the one that shows a login survived. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
AndreasBur
force-pushed
the
persist-tool-logins-in-shared-feature
branch
from
August 25, 2026 11:25
00e7cbb to
fcab8f2
Compare
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.
Rebased onto
masternow that #76 is in. That one persisted the Codex login by declaring itsvolume in each committed variant; two things were left over.
gh has the same problem, for the same reason
gh's configuration lives in the container's home, so every rebuild costs a freshgh auth login— and unlike the Codex one, that is noticed a push later rather than at therebuild itself. It gets the same treatment: a
wordclock-ghvolume at/home/vscode/.config/gh.The volume was declared twice
linux/andwslg/each carried the mount, which is one place too many for something bothvariants want. It belongs where
~/.platformioalready is — the shared feature, whichevery variant loads:
{ "source": "wordclock-codex", "target": "/home/vscode/.codex", "type": "volume" }, { "source": "wordclock-gh", "target": "/home/vscode/.config/gh", "type": "volume" }So the two per-variant declarations come out again. Leaving them in would put two mounts on
one target, which fails container creation rather than being ignored — that is the part of
this rebase that is not cosmetic, and
wslg/needed it as much aslinux/did.That move also fixes a variant nobody had looked at: WSLg had the same gap, and the same
line closes it.
The Dockerfile and the README
~/.config/ghis seeded beside~/.codex, both at 0700 — an empty named volume takes itsownership from the path it covers, and
ghrefuses to read a config directory that otherscan enter. 0755 would be the cache's mode, and a credential is not a cache.
The two README passages became one. #76 put its section high up, where somebody looking for
it will find it, and that is where it stays — carrying both volumes now, why they are in the
feature, and the seeding. Further down, the sentence #76 struck out is replaced rather than
left as a gap: what must stay out of a committed variant is a secret or an internal address,
and a mount line is neither. It names a volume that exists only on the machine that created
it, and nothing about it reaches the repository.
One thing outside this diff
The untracked
vector/devcontainer.jsondeclared both volumes itself and had to give them up,for the duplicate-mount reason above. It is gitignored, so it is not here; it was edited
locally and its comment records why. Its
chownstays — volumes created before this keptthe ownership they were created with, and an image cannot reach back into an existing volume.
Verification, and its limit
Checked: the feature JSON parses, and no variant collides with the feature on a mount target
(all three checked against the feature's list programmatically, which is how the leftover
wslgline was caught).Not checked by a build — there is no Docker daemon inside the dev container. The real test
is two rebuilds of the Linux variant: the first creates the volumes, and only the second can
show that a login survived. Worth doing before merging, since that is exactly what this claims
to fix.