Repository navigation
fix(config): shared data resolves under the main worktree for every reader, writer and cleanup (#616) - #618
Merged
Conversation
…eader, writer and cleanup (#616) #553 made shared data resolve under the main worktree, but several sites still anchored it at the top-most root or the current directory. From a linked worktree outside the checkout they read and wrote the worktree's own .data, so data split across worktrees and was lost with them: workspace clean (which also ignored data.dir and DEVOPS_CLI_DATA_DIR), the hallucination catalogue's relative DEVOPS_CLI_DATA_DIR, the benchmark and prompt-eval datasets (the benchmark silently fell back to baseline cases), model bundles, workspace discovery, the analysis and CI result caches, the library drift report, the dashboard, the controller and the sandbox logs and registry. Every one now resolves through resolve_data_path; prompt-eval verifies sources in the worktree it runs in. The CI result cache lives in the shared cache directory, one file per worktree, so a gate never trusts another worktree's result. workspace clean prunes the configured data directory, where data is written, and refuses anything that is not a dedicated data directory: system and top-level directories, the home directory and its parents, repositories and git directories, worktrees and their parents, directories holding tracked files or another repository, and another workspace's data, also through a symlink. A checkout or worktree below another repository still resolves shared data to the outer directory, as since before #585; strict xfail tests record it and #617 tracks it. Closes #616
This was referenced Sep 25, 2026
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
#553 made shared data (reviews, benchmarks, caches, the hallucination catalogue and the rest) resolve under the main worktree, so every worktree shares one data directory. Several sites still bypassed that resolver. From a linked worktree created outside the checkout they read and wrote the worktree's own
.data, so data split across worktrees and was lost when one was removed.This builds on #614's resolver and leaves it unchanged.
Changes
Every data site now uses
resolve_data_path:devops workspace clean, which also ignoreddata.dirandDEVOPS_CLI_DATA_DIR;DEVOPS_CLI_DATA_DIR;devops benchmark --suiteanddevops ai prompt-evaldatasets (the benchmark silently fell back to baseline cases);prompt-evalstill verifies sources in the worktree it runs in. A relative--datasetor--output-diris under the main worktree, as the help now says.CI result cache: it lives in the shared cache directory, one file per worktree, named after the worktree's root. A gate never trusts another worktree's result, and parallel worktrees don't evict each other.
devops workspace cleanprunes where data is written, and nothing else. It refuses:Child directories configured on their own, such as
data.reviews_dir, are left alone.Known limit: a checkout or worktree below another repository resolves shared data to the outer directory, as it has since before fix(cli): gate checks the worktree it runs in, not the main checkout (#582) #585. Strict
xfailtests record it, and Checkouts and Worktrees Below Another Repository Resolve to Their Own Repository #617 tracks it on the v0.2.25 roadmap.Roadmap and task file: the One data directory across git worktrees #553 entry gains a completion note, and this fix is recorded as delivered. The task file is included.
Verification
repos/and a submodule, and against each unsafe directory it must refuse. Its dry run names and checks what it would prune.devops cigate passed on push.Closes #616