feat: support git-backed subfolder vaults#511
feat: support git-backed subfolder vaults#511dieend wants to merge 25 commits intorefactoringhq:mainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR cannot be merged in its current state as it contains no file changes, rendering it impossible to verify the claimed support for git-backed subfolder vaults. While Codacy results are nominally 'up to standards', the analysis is incomplete due to the missing diff.
A major concern is the author's admission that the code was fully generated by an AI model and has not been tested locally. This represents a significant risk for core repository operations. Additionally, none of the required acceptance criteria, such as the scoping of Git operations or the creation of ADR-0108, have been met.
About this PR
- Implementing architectural changes to Git handling using untested AI-generated code is a high-risk activity. The changes must be validated in a local Rust environment to ensure they do not corrupt Git repository structures.
- The PR does not contain any code changes or the required documentation (ADR-0108). Please ensure all files are correctly staged and pushed.
Test suggestions
- Opening a vault in a subfolder of an existing Git repository resolves the correct worktree root.
- Committing changes in a subfolder vault includes only files within that vault subtree, ignoring root-level or sibling changes.
- Syncing (push/pull) in a subfolder vault affects the entire parent repository as intended.
- Calling init_git_repo on a folder already inside a Git worktree does not create a nested .git directory.
- Git history and diff views correctly filter results to the vault-relative path.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Opening a vault in a subfolder of an existing Git repository resolves the correct worktree root.
2. Committing changes in a subfolder vault includes only files within that vault subtree, ignoring root-level or sibling changes.
3. Syncing (push/pull) in a subfolder vault affects the entire parent repository as intended.
4. Calling init_git_repo on a folder already inside a Git worktree does not create a nested .git directory.
5. Git history and diff views correctly filter results to the vault-relative path.
TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 43 |
| Duplication | 0 |
AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
Summary
Adds support for opening a Tolaria vault from a subfolder inside a larger Git repository.
Git discovery now resolves the parent worktree for a vault path, while Tolaria scopes file-facing Git behavior to the opened vault subtree. This allows multiple vaults or external systems to share one repository without Tolaria showing or committing unrelated sibling/root changes.
Note: Code fully generated by Codex GPT 5.5, and I don't have rust setup. Feel free to throw it away.
close #510
Why
I use Obsidian structure under openclaw agent, and would like to separate opening Tolaria and openclaw workspace.
Changes
GitRepoContextto resolve:vault/.git.init_git_repoa no-op when the selected folder is already inside a Git worktree, avoiding nested.gitmetadata.