Skip to content

feat(fleet-data): add git module for cross-lane PR awareness#26

Merged
NagyVikt merged 1 commit into
mainfrom
agent/claude/fleet-data-git-module-2026-05-14-21-17
May 14, 2026
Merged

feat(fleet-data): add git module for cross-lane PR awareness#26
NagyVikt merged 1 commit into
mainfrom
agent/claude/fleet-data-git-module-2026-05-14-21-17

Conversation

@NagyVikt

Copy link
Copy Markdown
Contributor

Automated by gx branch finish (PR flow).

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>
@NagyVikt NagyVikt merged commit 8195338 into main May 14, 2026
@NagyVikt NagyVikt deleted the agent/claude/fleet-data-git-module-2026-05-14-21-17 branch May 14, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant