Repository navigation
fix(config): one data directory across git worktrees - #559
Merged
Merged
Conversation
A relative data directory resolved against the current git worktree. Each worktree kept its own reviews, benchmarks, corpora, sample validations, caches and hallucinations catalog, and removing a worktree deleted them. The first full sample validation (#505) was lost that way. The spend ledger resolved against whatever directory the command ran in. Relative data paths now resolve against the main worktree, found through a linked worktree's commondir; absolute paths are kept as given. Every data output uses one resolver, the spend ledger included. Input datasets checked into the repository still resolve in the current worktree. Closes #553
This was referenced Sep 25, 2026
Merged
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 #553.
Problem
A relative data directory (
.data) resolved against the current git worktree. Each worktree kept its own reviews, benchmarks, corpora, sample validations, caches and hallucinations catalog, and removing the worktree deleted them. The first full sample validation (#505) was lost this way. The spend ledger was worse: it resolved against whatever directory the command ran in.Changes
main_worktree_root(core/repo.py) finds the main worktree from any worktree. It follows a linked worktree's.gitfile to its git directory, then that directory'scommondir. A submodule-style.gitfile withoutcommondirisn't followed.resolve_data_pathkeeps absolute paths and puts relative ones under the main worktree. It is used for every data output:This is the groundwork for the evaluation run store (#554): every benchmark and evaluation now lands in one data directory, whichever worktree runs it.
Test plan
tests/test_data_dir_worktrees.py(5 tests, against a real repository with a linked worktree):uv run devops ci --force: all 13 gates pass