allod-parity and go-checks fail from a linked worktree: path: copies a dangling .git file #284
Labels
No labels
blocked
bug
decision
duplicate
enhancement
help wanted
invalid
landed?
question
ready-to-merge
stale
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/tools#284
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Building
allod-parityorgo-checkswith apath:flake reference from a linked git worktree fails, while the same build from the primary checkout passes. The failure signature isallod: invalid description '<desc>'; use only letters, numbers, '.', '_', and '-'for a description that is plainly valid (t218-no-origin,memory-backpass-2026-10-22).Mechanism
validDescriptionincmd/allod/change.goends withgit check-ref-format --branch agent/<desc>run in the caller's current directory. Thepath:fetcher copies the source tree verbatim, including.git. In the primary checkout.gitis a directory and git works inside the copy. In a linked worktree.gitis a one-line file (gitdir: /abs/path/.git/worktrees/<name>) whose target does not exist in the build sandbox, so every git invocation under the copied tree fails withfatal: not a git repository: (null), and the validator reports the description as invalid. The parity tests andTestMemoryBackpass*both callallod change begin -dwith the copied tree as cwd, so they are the tests that surface it.Reproduce without Nix: copy a worktree's
.gitfile into an empty directory, edit its path to something nonexistent, and rungit check-ref-format --branch agent/xthere. It exits 128 withnot a git repository.Fix options
validDescriptionindependent of the cwd:git check-ref-format --branchdoes not need a repository, so run it withGIT_DIRpointed at an empty directory, or with cwd set to a known non-repository such as the system temp root..gitfromsrcinflake.nix(lib.cleanSourceorbuiltins.pathwith a filter) so the checks never see a repository at all, which matches what the git fetcher does for.#references.The first is smaller and also fixes any other
gitcall inallodthat assumes its cwd is sane. Noticed while validating allod/tools#281 from anallod change begin -dworktree; the change under test did not touchcmd/allod.