You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] #1111 gitignore migration leaks scaffold-committed files (.envrc) and language-template junk into .gitignore.project #1145
The #1111 migration ("Migrated from the managed root .gitignore on upgrade") copies every entry from the consumer's old root .gitignore that is not in the regenerated managed base into .gitignore.project — verbatim, with no filtering. Observed on the sync-issues-action 1.3.0 deploy (vig-os/sync-issues-action#106, PR #108), where the old file was the pre-1.3.0 Python-template .gitignore:
It migrated .envrc — the old Python template ignored it, but in direnv mode .envrc is a scaffold-COMMITTED file ("committed for nix-direnv onboarding", T4.2 — Downstream pattern: minimal flake stub (non-overwriting) + nix2container production builder #640). Since .gitignore.project is appended to the regenerated root .gitignore, the migrated entry silently shadows the scaffold's intent: the fresh .envrc stays untracked and direnv onboarding breaks for every other clone. git check-ignore -v .envrc confirmed the appended block won.
~90 lines of Python-template noise (__pycache__/, .tox/, celerybeat-schedule, marimo/, …) landed in a Node repo's consumer-owned file, obscuring the handful of real repo-specific entries (dist/* un-ignore set, test_output).
Hand-fixed in sync-issues-action PR #108 by rewriting .gitignore.project; every future migrated consumer hits the same thing.
Steps to Reproduce
Take a consumer whose root .gitignore is a pre-1.3.0 managed template (Python-flavored) — or any old .gitignore containing .envrc.
Run install.sh --version 1.3.0 --mode direnv --force.
Inspect .gitignore.project → contains .envrc and the old template entries; git check-ignore .envrc → ignored.
Expected Behavior
The migration should at minimum drop entries that shadow files the scaffold itself commits (.envrc; consider .gitignore.project, justfile, flake.nix for robustness). Ideally it should also skip entries that belong to a devkit language template (old or current) rather than treating them as repo-specific — the point of the migration is to preserve CONSUMER-authored ignores, not stale template bodies.
Additional Context
Found during the sync-issues-action deployment 2026-07-15. Related: #1111 (original migration), #640 (.envrc committed contract), #1092 (append mechanism).
Fixed by #1146 (merged to dev). migrate_root_gitignore() now (1) never migrates entries shadowing scaffold-committed files (.envrc, flake.nix/flake.lock, justfile/justfile.project, .vig-os, .gitignore.project) and (2) builds the managed-entry filter from ALL gitignore.d fragments, so stale cross-language template lines no longer migrate as consumer entries. Covered by two new bats tests (incl. a git check-ignore assertion that the scaffolded .envrc stays committable); full init-workspace suite 208/208. Closing manually — dev merges don't auto-close. Ships to consumers with the next devkit release.
Activity
fix(workspace): never migrate scaffold-committed or template gitignor…
c-vigo commentedon Jul 16, 2026
Fixed by #1146 (merged to dev).
migrate_root_gitignore()now (1) never migrates entries shadowing scaffold-committed files (.envrc,flake.nix/flake.lock,justfile/justfile.project,.vig-os,.gitignore.project) and (2) builds the managed-entry filter from ALLgitignore.dfragments, so stale cross-language template lines no longer migrate as consumer entries. Covered by two new bats tests (incl. agit check-ignoreassertion that the scaffolded.envrcstays committable); full init-workspace suite 208/208. Closing manually — dev merges don't auto-close. Ships to consumers with the next devkit release.chore: release 1.3.1 (#270)
build(devkit): adopt devkit 1.3.1
chore: release 1.3.1 (#1164)
build(devkit): adopt devkit 1.3.1 (#106)
chore(devkit): bump to 1.3.1 + migrate attestation into release-exten…
feat(scaffold): nix consumer support — detection, gitignore fragment,…
chore: release 0.3.2 (#136)
ci(actions): update github-actions (minor and patch) (#1368)
feat: scan preserved configs for retired hook blocks (#1653)