Problem
The pipeline orchestrator makes 5-6 serial API calls per PR (merge state, review decision, reviews list, CI status, thread query), each requiring an LLM round-trip. A single run takes 10+ minutes for one PR.
Fix
Add a single batched GraphQL query to the orchestrator instructions that fetches everything in one call:
query($owner: String!, $name: String!, $label: String!) {
repository(owner: $owner, name: $name) {
pullRequests(first: 10, states: OPEN, labels: [$label]) {
nodes {
number
headRefName
mergeStateStatus
reviewDecision
autoMergeRequest { enabledAt }
labels(first: 10) { nodes { name } }
reviews(first: 10) { nodes { author { login } state } }
reviewThreads(first: 100) {
nodes {
id
isResolved
comments(last: 1) { nodes { author { login } } }
}
}
commits(last: 1) {
nodes {
commit {
statusCheckRollup {
contexts(first: 20) {
nodes {
... on CheckRun { name conclusion }
}
}
}
}
}
}
}
}
}
}
One call, all data. The agent reasons about the result instead of making serial tool calls.
Impact
Should reduce orchestrator runtime from 10+ minutes to 2-3 minutes.
Problem
The pipeline orchestrator makes 5-6 serial API calls per PR (merge state, review decision, reviews list, CI status, thread query), each requiring an LLM round-trip. A single run takes 10+ minutes for one PR.
Fix
Add a single batched GraphQL query to the orchestrator instructions that fetches everything in one call:
One call, all data. The agent reasons about the result instead of making serial tool calls.
Impact
Should reduce orchestrator runtime from 10+ minutes to 2-3 minutes.