feat(repo_metadata): remote repo-root detection in DetectedRepositories (5c-2b) - #69
Merged
Conversation
…es (5c-2b) Mirrors Warp's location-agnostic repository detection, adapted to the fork's separate-set structure so the existing local path is untouched. - Adds `remote_repository_roots: HashSet<RemotePath>` alongside the local `repository_roots`. - `get_root_for_lor_path(&LocalOrRemotePath) -> Option<LocalOrRemotePath>` dispatches: Local delegates to the existing `get_root_for_path` (wrapped in Local); Remote walks the path's ancestors on its host against the registered remote roots (`find_remote_repository_root`). - `register_remote_repo_root(RemotePath)` (populated by the remote-server layer from the daemon's RepoMetadata in 5c-2c) and `remove_roots_for_host(&HostId)` (on disconnect). The 22 existing local `get_root_for_path(&Path)` callers are unchanged. Additive prep — the remote roots have no producer until 5c-2c wires the CWD feed. Verified: repo_metadata 88/0/3 (+1 new remote-root registration/lookup/host- isolation/removal test). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012gDYSHa4oDvQbfungWwG1h
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.
Mirrors Warp's location-agnostic repository detection, adapted to the fork's separate-set structure so the existing local path is untouched.
remote_repository_roots: HashSet<RemotePath>alongside the localrepository_roots.get_root_for_lor_path(&LocalOrRemotePath) -> Option<LocalOrRemotePath>dispatches: Local delegates to the existingget_root_for_path(wrapped inLocal); Remote walks the path's ancestors on its host against the registered remote roots.register_remote_repo_root(RemotePath)(populated by the remote-server layer from the daemon's RepoMetadata in 5c-2c) +remove_roots_for_host(&HostId)(on disconnect).The 22 existing local
get_root_for_path(&Path)callers are unchanged. Additive prep — the remote roots have no producer until 5c-2c wires the CWD feed.Verification
repo_metadata88 / 0 / 3 (+1 new test: remote-root registration / nested lookup / host isolation / removal)🤖 Generated with Claude Code