Repository navigation
fix(setup): rc4 field-validation batch — direnv commits, prune, scripts - #860
Merged
Merged
Conversation
RED (6 failing bats tests, confirmed locally): env-based githook shebangs, nix-dev-shell-aware commit guard, BASH_SOURCE pipe-safety fallback in lifecycle scripts, prune keeping pre-existing flake.nix/.envrc, tolerant final just-sync, and typos --force-exclude in both hook configs. All surfaced by the 0.4.0-rc4 field validation. Refs: #859
Six fixes surfaced by the 0.4.0-rc4 field validation across five real
consumer repos (full findings on the tracking issue):
- .githooks/*: env-based shebangs (NixOS hosts have no /bin/bash) and
accept IN_NIX_SHELL as sanctioned -- direnv mode could not commit.
- Lifecycle scripts: restore the ${BASH_SOURCE[0]:-$0} pipe-safety
fallback (0.3.x regression caught by a consumer's regression tests).
- init-workspace prune: never delete a pre-existing flake.nix/.envrc in
devcontainer mode (two repos lost their own nix-direnv setup).
- init-workspace final just sync: non-fatal when the preserved
old-generation justfile.project lacks the sync recipe.
- typos hook (repo + scaffold): --force-exclude so consumer
[files] extend-exclude applies to staged files.
- MIGRATION.md: field-validated 0.3.x upgrade checklist.
Verified: 6 new bats tests RED -> GREEN (62/62 suite green), including
a functional host-run of init-workspace.sh proving the prune guard;
full pre-commit suite green. The 3 local pytest failures are the known
stale-local-image class (image-content tests; CI builds fresh).
Refs: #859
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
Fix batch for the six upstream defects surfaced by the 0.4.0-rc4 field validation (#859; findings comments there cover five repos, two orgs, both delivery modes):
.githooks/*acceptIN_NIX_SHELLas sanctioned.githooks/*#!/bin/bashunusable on NixOS hosts#!/usr/bin/env bash${BASH_SOURCE[0]:-$0}→unbound variablewhen piped--mode devcontainerprune deleted consumers' ownflake.nix/.envrc(hyrr, talys)just syncfails on old-generation preservedjustfile.project[files] extend-excludefor staged files → garbage findings on binary artifacts in three reposentry: typos --force-exclude(repo + scaffold via manifest sync)Plus the field-validated "Upgrading an existing 0.3.x consumer" checklist in
docs/MIGRATION.md(prek recipe migration, recipe renames, typos config shadowing, artifact excludes, name re-derivation).Remaining findings (7 CodeQL onboarding, 8 name re-derivation, 14 fresh-adoption clobber, 4 autofix-vs-artifacts defaults) are documented in MIGRATION.md and/or tracked for the next cycle in #854 — they are design-level, not rc5-blocking.
Verification
init-workspace.shwith pre-existingflake.nix/.envrcsurviving--mode devcontainer; suite 62/62.just precommit(full suite, all files): green, exit 0.:dev-image class (image-content tests; CI builds the image from this branch, where they run for real).Requires rc5 (image bakes
assets/), then targeted re-verification per #859's exit criteria.Refs: #859