template: persist bash history across container rebuilds - #202
Merged
Merged
Conversation
nozaq
force-pushed
the
claude/bash-history-persistence-w8pkhc
branch
from
September 12, 2026 05:50
84d955f to
f90e8a1
Compare
nozaq
marked this pull request as ready for review
September 13, 2026 00:34
nozaq
force-pushed
the
claude/bash-history-persistence-w8pkhc
branch
2 times, most recently
from
September 13, 2026 00:38
1887f8f to
b1a260d
Compare
Every template now mounts a ${devcontainerId}-bash-history volume at
/home/dev/.local/state/bash, the directory the debian base image points
HISTFILE into, so a project's shell history survives a rebuild the same way
its toolchain caches do.
The variable and the directory belong to the image, the way the terraform and
opentofu images set TF_PLUGIN_CACHE_DIR for the plugin cache their templates
mount, so the templates only add the volume. This depends on the
bare-devcontainer/images change that adds both.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6orjBAZq9L5t7rV5RDmXd
The mise image stopped defining a bookworm variant on 2026-09-06: mise from 2026.7.0 on needs a newer glibc than Debian 12 provides, and its calendar versioning means no later release can satisfy bookworm again. The template kept offering the tag, and the frozen image still in the registry let the smoke test pass, so the mismatch went unnoticed until the new HISTFILE assertion needed an image built after that release. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6orjBAZq9L5t7rV5RDmXd
nozaq
force-pushed
the
claude/bash-history-persistence-w8pkhc
branch
from
September 13, 2026 00:39
b1a260d to
de25812
Compare
This was referenced Sep 13, 2026
Merged
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.
Shell history is lost on every rebuild today, which works against rebuilding often to pick up image updates. Every template now keeps it in a named volume, the same way it keeps its toolchain caches.
Changes
Applied identically to all 13 templates:
mountsgains a${devcontainerId}-bash-historyvolume at/home/dev/.local/state/bash, the directory thedebianbase image pointsHISTFILEinto.NOTES.mdgains the volume in thePersistent Cachestable, a shared sentence in the section intro, and a shared closing paragraph namingHISTFILEand the default it replaces.debianhad no such section and gets one.README.mdregenerated fromNOTES.mdin the formatrelease.ymlproduces.versionbumped by a minor, since the applied configuration changes.Also:
test/_global/common.shassertsHISTFILEand that the mounted directory is writable, so every template's smoke test covers it.README.mdexample and themountsbullet mention the volume.HISTFILEitself is not set here. It belongs to the image, the wayterraformandopentofusetTF_PLUGIN_CACHE_DIRfor the plugin cache their templates mount, so a template only adds the volume. bare-devcontainer/images#466 adds it, and is released.Second commit: the mise bookworm proposal
The new assertion turned
verify (mise, bookworm, …)red, and the cause was older than this pull request. Themiseimage stopped defining a bookworm variant on 2026-09-06, because mise from 2026.7.0 on needs a newer glibc than Debian 12 provides and its calendar versioning means no later release can satisfy bookworm again. The template keptbookworminimageVariant.proposals, and the frozen image left in the registry still starts and still runsmise --version, so nothing caught it.HISTFILEis the first assertion that needs an image built after that release, so it surfaced the stale tag.The second commit drops the proposal and says in
NOTES.mdwhy onlytrixieis offered and why the remainingbookwormtags should not be pinned to. Every other template's proposals were cross-checked against thebuild.yamlof its image;misewas the only mismatch.Verification
The 13
devcontainer.jsonfiles were checked to parse and to carry the new mount. Each regeneratedREADME.mddiff was checked to contain only theNOTES.mdchange. Containers were not started here, since Docker is unavailable in this environment; CI covers that.🤖 Generated with Claude Code
https://claude.ai/code/session_01L6orjBAZq9L5t7rV5RDmXd