Repository navigation
fix(worktree): tolerate a foreign-git cwd in the _wt_repo backtick - #1204
Merged
Merged
Conversation
c-vigo
added a commit
that referenced
this pull request
Jul 20, 2026
…el (#1215) ## Summary Unfreezes release/1.4.0 by merging `dev` into it, deliberately pulling epic #1205 (per-consumer `DEVKIT_WORKFLOW` gitflow/trunk model, merged to dev via #1212) and the renovate `github-backup` 0.64.0→0.64.2 bump (#1213) into the 1.4.0 release. **This deviates from the epic's documented 1.5.0 target** — accepted trade-off: an rc5 was required anyway (the branch is five fixes past rc4), and gitflow consumers get a provable byte-for-byte no-op. ## Gates cleared before this merge - **Dev composite tree proven green**: the merged dev head `4ac2ca90` (feature + renovate bump as one tree) passed a full dispatched `ci.yml` run ([29726877354](https://github.com/vig-os/devkit/actions/runs/29726877354)) — the pre-merge PR checks had only tested stale bases. - **Epic completeness audited**: every acceptance criterion of #1206–#1211 mapped to merged code; gitflow no-op pinned by `test_gitflow_scaffold_matches_default_path` and `test_gitflow_render_files_are_byte_identical_to_template`. Sub-issues remain open only as bookkeeping (dev-PR `Refs:` doesn't auto-close). ## Merge composition Two real conflicts, composed to preserve both sides: - `assets/init-workspace.sh`: kept #1196's `MODE_CONFIG_EXCLUDES` array (supersedes dev's older explicit exclude blocks) **and** appended #1205's trunk-only `sync-main-to-dev.yml` exclude + preview skip-guard; `render_workflow_model()` and its invocation intact. - `tests/bats/init-workspace.bats`: additive union of #1195's chmod-scope test and #1205's six trunk tests. CHANGELOG surgery: dev's two Unreleased entries moved into the `[1.4.0]` section (Added/Changed), `## Unreleased` restored to the empty skeleton (#590 invariant); `assets/workspace/.devcontainer/CHANGELOG.md` re-synced byte-identical (sync-manifest hook green). All seven release-branch hardening fixes (#1190 #1193 #1199 #1200 #1201 #1202 #1204) survive. ## Verification - Targeted suites: 66 passed (`test_workflow_model`, `test_install_script`, `test_workflow_prepare_extension`, `test_workflow_sync_checkout`) - Full pytest: 1098 passed, 28 skipped; 3 failures all environmental/pre-existing (2× `vig-utils` `TestFindRepoRoot` env, 1× `test_manifest_files` stale local image — CI rebuilds) - bats: 331 ok, 0 not ok (`init-workspace.bats`, `install.bats`) - `pre-commit run --all-files`: fully green - Containment: `git log HEAD..origin/dev` empty; diff vs dev = release fixes + changelog structure only ## After merge Cut **rc5** (required regardless of this PR) and extend rc validation with the trunk-render suites + a gitflow-consumer scaffold byte-identity check. Refs: #1205
This was referenced Jul 20, 2026
c-vigo
added a commit
that referenced
this pull request
Jul 20, 2026
Closes #1219. Drops the @gerchowl CODEOWNERS entries (`.claude/skills/`, `justfile.worktree`, vig-utils developer tooling). c-vigo is the de-facto sole maintainer; with `require_code_owner_review` on main, those unreachable-owner paths hard-block release finalization whenever a release diff touches them — currently blocking 1.4.0 (#1186 stuck at REVIEW_REQUIRED over `justfile.worktree`, the #1203/#1204 fix). @c-vigo stays on the key control surfaces (workflows, actions, release scripts, renovate configs, CODEOWNERS itself, SECURITY.md). Targets main directly (governance file; CODEOWNERS is evaluated from the PR base branch, so this must land on main to unblock #1186 — a dev-first route would wait a full release cycle). The sync-main-to-dev automation carries it back to dev. Merge requires admin bypass: the author cannot approve their own PR and there is no second code owner — explicitly authorized by the maintainer. Refs: #1219
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
justfile.worktreedeclares_wt_repo := \basename "$(git rev-parse --show-toplevel)"`, a top-level backtickjustevaluates **eagerly on every invocation** — sogit rev-parse --show-toplevelruns for any recipe (just sync,just lint, …). In a git worktree whose.gitfile points at a gitdir outside a bind mount (the bare-podmanscaffold context from #1197), git can't resolve the repo and leaksfatal: not a git repository: (null)to stderr on everyjustcall. The substitution now falls back topwd(… 2>/dev/null || pwd), matching the existingsetup-labels.sh` idiom.Split out from #1197 (agent observation) — a separate code path from
print_preserved_template_diff.Scope
justfile.worktreeis fixed; the scaffolded.devcontainer/justfile.worktreeis regenerated from it viascripts/manifest.toml(both committed, in sync).Fixedentry added under[1.4.0](unlike the other RC fixes, this corrects pre-existing, already-released behavior).Test
TDD — RED test first, then fix. New
worktree.batscase runsjust -f justfile.worktree --evaluate _wt_repoin a foreign-git cwd and asserts nofatal:leaks.bats tests/bats/worktree.bats→ 9 passed (new case confirmed RED before, GREEN after).Closes #1203