Repository navigation
fix: keep the dev-shell toolchain in lockstep with consumer adoption - #1272
Merged
Merged
Conversation
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.
Closes #1263
Problem
Consumer adoption advances the
.vig-osDEVKIT_VERSIONpin (image + scaffold) but never touches the consumer'sflake.lock, which governs the direnv dev shell. A floatingvigosinput stays wherever the lastnix flake update vigossaw it, so every direnv consumer's shell silently runs the previous release's toolchain — live symptom: org-config's 1.4.0setup-labelsignored the #1254 taxonomy extension and planned to delete the repo's own labels one release after the protecting feature shipped. The existing #1093 scaffold warning deliberately covers pinned (?ref=) inputs only.Fix (three coordinated layers, per the spike on #1263)
mkProjectShellshell-entry version-skew guard (flake.nix) — the shellHook bakes the flake's own release version (the devkit repo-root.vig-osat the locked input rev, read purely at eval) and compares it against the workspace.vig-ospin on every shell entry, warning with thenix flake update vigosremedy until the lock advances. Silent for matching versions, prerelease (-rc*) pins (release-train lanes bump to rc tags a floating update cannot reach — rc content lives on the release branch), and bare consumers without a manifest. Warn-only, never fails the shell. This is the authoritative detector: it is the one place both halves of the skew are visible without network access.install.sh) — a--forceupgrade of a direnv/bothconsumer with a floating input and an existingflake.locknow runsnix flake update vigosafter the scaffold, host-side (a direnv consumer has nix by definition; the scaffold container must not write the lock — network dependence + ownership hazards, install.sh --docker: chown scaffold output before the host-side git phase #1235/install.sh --docker ownership repair breaks scaffold under rootless-podman docker shim #1248). Non-fatal when nix is missing or the update fails: the manual step is printed. Pinned inputs and fresh scaffolds (no lock yet) are untouched.docs/MIGRATION.mdnow describes the two coupled delivery channels in the Updating checklist and corrects the lockstep section's claim that a floating input "needs no manual bump — it is exempt" (it skews viaflake.lock). The [BUG] Bumping DEVKIT_VERSION without the matching vigos flake pin ships the #1053 JSONC banner without its check-json exclude — every commit fails, no warning #1093 comment ininit-workspace.shgets the same correction. Changelog entry under Unreleased.Verification
tests/test_flake_version_guard.py(new, nix-gated like the other flake suites): warns on a mismatched final pin (both versions + remedy in stderr), silent on matching pin /-rc*pin / no manifest — 4/4 green, plustest_flake_devshell.py+test_flake_hooks.pyparity suites green (53 passed, 1 skipped).tests/bats/install.bats(+6, TDD): floating+lock+--forceinvokesnix flake update vigos --flake <dir>; pinned input, missing lock, fresh install, and devcontainer mode all skip; a failing update stays non-fatal and prints the manual step — full file 109/109 green against stubdocker/nix.prek run --all-filesgreen on the final tree.Note for the release train: the shell-side guard is itself flake-delivered, so existing consumers first see it after their next lock advance — which the upgrade path in this PR now performs for them.