feat(fleet-data): add git module for cross-lane PR awareness#26
Merged
NagyVikt merged 1 commit intoMay 14, 2026
Merged
Conversation
Adds rust/fleet-data/src/git.rs — a thin subprocess wrapper around `gh pr list --json` and `git merge-base --is-ancestor`, with the same shape as accounts/tmux/panes (subprocess + pure parse + typed output + TTL-cached loader). Purpose: answer the question colony's readyScopeOverlapWarnings will ask — "for candidate lane B claiming files F, which open PRs touch F and have not yet been absorbed into B's base?" The data-layer answer lives here; the colony-side consumer extends readyScopeOverlapWarnings in a follow-up PR to surface a merge_pending warning in next_action. Per task_claim_file's docstring, Colony's coordination is soft — never a hard block — so the autopilot deprioritizes such candidates rather than refusing them. Cache TTL is 45s, tuned against gh's 5000/hr rate limit: four dashboard binaries each refreshing once per window peak at ~320 calls/hr, two orders of magnitude under the cap, while a newly-opened PR still surfaces within ~one minute. Failure posture mirrors accounts.rs: no gh on PATH, unauthenticated, or a parse failure all return Ok(vec![]) so a dashboard without gh access renders no warnings rather than crashing. branch_contains_pr conservatively returns Ok(false) on lookup failure — "cannot prove this PR is merged" produces a warning, which is the safe default. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Automated by gx branch finish (PR flow).