Repository navigation
feat(workspace): opt-in .devcontainer/ prune on container-less mode upgrade - #1000
Merged
c-vigo merged 4 commits intoJul 13, 2026
Merged
Conversation
This was referenced Jul 13, 2026
c-vigo
added a commit
that referenced
this pull request
Jul 13, 2026
…997) One release choreography, mode-aware toolchain provisioning: resolve-toolchain + setup-devkit-toolchain composites (ADR Option A), single mode-aware ci.yml, all release/automation workflows container-free in direnv/bare, opt-in .devcontainer/ prune, vig-utils host-side, actionlint. Sub-PRs: #998 #999 #1000 #1001 #1002 #1005 #1006 #1007. Refs: #988
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
Add an opt-in
--prune-devcontainerflag toassets/init-workspace.sh(forwardedby
install.sh) that removes a pre-existing.devcontainer/when(re)scaffolding in a container-less mode (
direnvorbare).Why
Mode switching is deliberately non-destructive toward a pre-existing
.devcontainer/(#738), which is correct for coexistence but strands a stale,broken container on a real container → direnv migration (concrete case:
vig-os/commit-action's old apt/Debian.devcontainer/). This gives operators asupported, explicit way to prune it while keeping the #738 default intact.
Behavior
--prune-devcontainer(direnv/bare only): a populated pre-existing.devcontainer/is removed. Without it, [BUG] install.sh --mode direnv --force overwrites populated consumer files (pyproject.toml, .devcontainer/) #738 behavior is unchanged (preserved).devcontainer/bothmodes:Error: --prune-devcontainer only applies to direnv/bare modes (got: <mode>),exit 1 — same failure shape as an invalid
--mode.--no-prompts) prompt once when a populatedpre-existing
.devcontainer/is detected in a container-less mode:Prune existing .devcontainer/? (y/N), default No = preserve. Skipped under--no-promptsand--preview(preview decides purely from the flag and staysside-effect-free).
--preview: with the flag the.devcontainer/moves from the PRESERVEDlisting to the DELETED listing; the tree is not touched.
install.shforwards the flag (parse → CMD array), documented in--help.docs/MIGRATION.md: new "Migrating a devcontainer/both repo to direnv/bare"subsection with the preview-then-apply runbook.
Test evidence
bats tests/bats/init-workspace.bats tests/bats/install.bats→ 224 passed, 0 failed(no automated CI on PRs into the epic branch — local evidence).
New tests (all green):
--mode=direnv --prune-devcontainerremoves a pre-existing.devcontainer/(Mode-switch doesn't prune a pre-existing .devcontainer/ on container→direnv migration #990)--mode=bare --prune-devcontainerremoves a pre-existing.devcontainer/(Mode-switch doesn't prune a pre-existing .devcontainer/ on container→direnv migration #990)--mode=direnvwithout the flag still preserves.devcontainer/(Mode-switch doesn't prune a pre-existing .devcontainer/ on container→direnv migration #990 keeps [BUG] install.sh --mode direnv --force overwrites populated consumer files (pyproject.toml, .devcontainer/) #738)--prune-devcontaineris rejected in devcontainer mode (Mode-switch doesn't prune a pre-existing .devcontainer/ on container→direnv migration #990)--prune-devcontaineris rejected in both mode (Mode-switch doesn't prune a pre-existing .devcontainer/ on container→direnv migration #990).devcontainer/in a container-less mode (Mode-switch doesn't prune a pre-existing .devcontainer/ on container→direnv migration #990)--preview --prune-devcontainerlists.devcontainer/as DELETED without deleting (Mode-switch doesn't prune a pre-existing .devcontainer/ on container→direnv migration #990)--previewwithout the flag lists a pre-existing.devcontainer/as PRESERVED (Mode-switch doesn't prune a pre-existing .devcontainer/ on container→direnv migration #990)--prune-devcontainerto init-workspace.sh (Mode-switch doesn't prune a pre-existing .devcontainer/ on container→direnv migration #990)--prune-devcontainer(Mode-switch doesn't prune a pre-existing .devcontainer/ on container→direnv migration #990)Full
prek run --all-filesgreen (sync-manifest mirrored the CHANGELOG entry intoassets/workspace/.devcontainer/CHANGELOG.md; re-staged and re-run clean).Refs: #990