Repository navigation
feat(manifest): dual-key DEVKIT_VERSION pin parser with legacy fallback - #968
Merged
Merged
Conversation
Assert the .vig-os version-pin parsers read the renamed DEVKIT_VERSION key, prefer it over the legacy DEVCONTAINER_VERSION regardless of file order, and still resolve a legacy-only manifest. Covers the resolve-image composite action (pytest) and the initialize.sh / version-check.sh scaffold parsers (bats). Fails against the current DEVCONTAINER_VERSION-only parsers. Refs: #781
…(GREEN) Every .vig-os version-pin reader now prefers a DEVKIT_VERSION key and falls back to the legacy DEVCONTAINER_VERSION when absent, so un-migrated consumer pins keep resolving during the devcontainer -> devkit rename (soft cutover). Both keys are captured and preferred after the read, so DEVKIT_VERSION wins regardless of line order. Updates the resolve-image composite action (root + scaffold mirror), the scaffold initialize.sh / version-check.sh parsers, and the Nix image build tag resolution. The written .env / compose var name is unchanged in this slice. Refs: #781
16 of 19 tasks
c-vigo
enabled auto-merge
July 10, 2026 11:08
c-vigo
added a commit
that referenced
this pull request
Jul 10, 2026
## Summary Stage 1 slice of **#781**: flip the version-pin **write** path to the renamed `DEVKIT_VERSION` key. Builds on the merged dual-key reader (#968), so this is a **soft cutover** — readers still accept the legacy `DEVCONTAINER_VERSION`. ## Changes - **Template `assets/workspace/.vig-os`** — `DEVKIT_VERSION={{IMAGE_TAG}}`. - **`init-workspace.sh`** — writeback sed rewrites either key → `DEVKIT_VERSION` (migrates a stray legacy line); header comment updated. - **`release.yml` finalize** — writes `DEVKIT_VERSION` to the repo-root `.vig-os`. - **Repo-root `.vig-os`** — now `DEVKIT_VERSION=0.5.1` (dogfoods the new key). - **`justfile.devc` `devc-upgrade`** — **reader missed by the initial parser sweep** (it reads the pin via `awk`, not `sed/grep/case`); now dual-keyed, preferring `DEVKIT_VERSION` with the legacy fallback. - **`flake.nix`** — comment only (the `{{IMAGE_TAG}}` substitution is key-agnostic). - Scaffold `ci.yml` / `prepare-release.yml` — user-facing pin-key mentions updated. ## Migration behaviour `.vig-os` is **not** in `PRESERVE_FILES`, so a `--force` upgrade overwrites it from the template (now `DEVKIT_VERSION`) and the stale legacy key naturally drops. New bats test `init-workspace migrates a legacy DEVCONTAINER_VERSION pin to DEVKIT_VERSION (#781)` covers this end to end. ## Out of scope (later slices) The docker-compose **`.env` interpolation variable** stays `DEVCONTAINER_VERSION` (it's the compose var, not the pin) — its rename rides the image-ref cutover (PR 2). ## Testing - `tests/bats/init-workspace.bats` — 7 version-pin tests green (incl. migration); full file 127 green. TDD RED→GREEN. - `tests/bats/just.bats` — `devc-upgrade` reads `DEVKIT_VERSION`, still honors legacy. Green. - `tests/test_integration.py` — scaffolded-`.vig-os` assertions flipped to `DEVKIT_VERSION` (container tests run in CI). - `just precommit` (full suite) — green. Refs: #781
c-vigo
added a commit
that referenced
this pull request
Jul 10, 2026
…973) ## Summary The final Stage-1 slice of **#781**: move the container image to the **new GHCR package `ghcr.io/vig-os/devkit`** and rename the flake output attributes to match. The new package is already seeded (`0.5.1` + `latest`, multi-arch, public), so CI resolves against it. Two commits: 1. `refactor(flake)` — attribute rename `devcontainerImage` → `devkitImage`, `devcontainerImageEnv` → `devkitImageEnv`, `devcontainer-bootstrap` → `devkit-bootstrap` (+ all call sites and the flake-services / workflow-cachix test anchors). 2. `feat(image)!` — image **ref** `ghcr.io/vig-os/devcontainer` → `ghcr.io/vig-os/devkit` across the flake, CI/release workflows, `install.sh`, the scaffold template (compose + workflows + actions), and docs (README/TESTING regenerated from templates). ## Breaking change Consumers pulling `ghcr.io/vig-os/devcontainer` must move to `ghcr.io/vig-os/devkit`. The old package is **frozen at `0.5.1` and stays pullable**; the soft-cutover pin parser (#968) + `install.sh --force` re-scaffold migrate consumers without a hard break. ## Intentionally NOT changed (verified) - **Released `CHANGELOG` entries**, the **`MIGRATION.md` note** that the old package stays pullable, and the **historical ADR** — all still cite `ghcr.io/vig-os/devcontainer` on purpose. - **OCI `source` label** and **cosign `--certificate-identity-regexp`** — these are `github.com` *repo* paths and follow the **Stage 3** repository rename, not the image ref. - **docker-compose `${DEVCONTAINER_VERSION}`** interpolation var — deferred (it's the compose var, not the image ref or pin key). ## Verification - `nix eval .#devkitImage.imageName` → `ghcr.io/vig-os/devkit` ✅ - `test_flake_services` (evaluates the flake) + `test_workflow_cachix` — green (attr rename). - `install.bats` / `clean.bats` / `just.bats` / `test_install_script` (unit) — green; caught + fixed a regex-escaped ref (`ghcr\.io/…`) the bulk sed missed. - `just precommit` full suite — green (README/TESTING regenerated, actionlint, sync-manifest). - Container/integration image tests run in CI against the seeded `devkit` package. Refs: #781
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.
Summary
First slice of the
devcontainer→devkitrename (#781): make every.vig-osversion-pin reader accept the renamed
DEVKIT_VERSIONkey, falling back to the legacyDEVCONTAINER_VERSIONwhen it is absent.This is the load-bearing first step — landing it makes every later rename slice
(image ref, dispatch targets, pin-key writeback) non-breaking for consumers: a repo whose
.vig-osstill saysDEVCONTAINER_VERSIONkeeps resolving, and one re-scaffolded toDEVKIT_VERSIONresolves too. Soft cutover, per the approved plan.Behaviour
DEVKIT_VERSION; fall back toDEVCONTAINER_VERSIONwhen the new key is absent.DEVKIT_VERSIONwins regardlessof line order (not "first match wins").
Read sites updated (all five)
.github/actions/resolve-image/action.ymlassets/workspace/.github/actions/resolve-image/action.ymlassets/workspace/.devcontainer/scripts/initialize.sh.envpinassets/workspace/.devcontainer/scripts/version-check.shflake.nixOut of scope for this slice (later PRs): the image ref
ghcr.io/vig-os/devcontainer, thewritten
.env/ compose var name, and the written pin key (init-workspace.sh/release.ymlfinalize still write
DEVCONTAINER_VERSION).install.shdoes not read the version pin from.vig-os, so it is untouched here.Testing
TDD (RED → GREEN):
tests/test_resolve_image_manifest.py— newDEVKIT_VERSION-only + dual-key precedence(both orders) cases. 4 passed.
tests/bats/manifest-parsers.bats— newDEVKIT_VERSIONread + precedence cases forinitialize.shandversion-check.sh, with the four legacy#885regression tests intact.8 passed.
just precommit(full suite, incl. shellcheck/actionlint/nixfmt/sync-manifest) — green.Refs: #781