Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: remove Copilot gating from branch reconciliation

[._.]/ Adam Eivya26d7be83cd1
diff --git a/.changelog/next/fixed-agent-dd0a4966.md b/.changelog/next/fixed-agent-dd0a4966.md
new file mode 100644
index 0000000000..f43effcfb3
--- /dev/null
+++ b/.changelog/next/fixed-agent-dd0a4966.md
@@ -0,0 +1 @@
+- Branch reconciliation now follows existing review feedback and live CI and mergeability state.
diff --git a/server/services/branchReconcile.js b/server/services/branchReconcile.js
index 56231166f4..ec1eb30a35 100644
--- a/server/services/branchReconcile.js
+++ b/server/services/branchReconcile.js
@@ -1032,12 +1032,11 @@ export function desiredEndState(state, actions, { prNumber, worktreePath, collis
}
// IN_REVIEW
const canMerge = actionOn(actions, 'autoMerge');
- // The Copilot gate is time-boxed for the same reason the merge waits on CI
- // in-session: a repo without Copilot review enabled never produces one, and an
- // unbounded "await the review" leaves a green PR open forever. 10 minutes
- // mirrors the claim-issue flow's Copilot poll.
- return `Drive the open PR toward green: request/await the Copilot review and address feedback.${canMerge
- ? ` Merge ONLY when the LATEST Copilot review reports "0 comments" (pre-resolved threads do NOT count; a PR over 20k lines is exempt from the Copilot check and needs only CI-green + mergeable). If no Copilot review lands within 10 minutes of requesting it, the Copilot gate is satisfied — this repo may not have Copilot review enabled — and CI-green + MERGEABLE is the whole gate. ${driveToMerge(pr)}`
+ // Existing PRs have already passed through whatever review workflow the repo
+ // uses. Reconciliation must not request or assume a particular reviewer; its
+ // merge gate is the forge's live CI and mergeability state.
+ return `Drive the open PR toward green: inspect any existing review feedback and address it.${canMerge
+ ? ` Merge ONLY when CI is green and the PR is MERGEABLE. ${driveToMerge(pr)}`
: ' Do NOT merge (auto-merge is disabled) — stop once the PR is green and ready for the user to merge.'}`;
}
diff --git a/server/services/branchReconcile.test.js b/server/services/branchReconcile.test.js
index 1a037712ba..1749c3aa57 100644
--- a/server/services/branchReconcile.test.js
+++ b/server/services/branchReconcile.test.js
@@ -1076,10 +1076,11 @@ describe('desiredEndState', () => {
expect(instruction).not.toContain('<num>');
});
- // A repo without Copilot review enabled never produces one — an unbounded
- // "await the review" would strand a green PR open forever.
- it('time-boxes the IN_REVIEW Copilot gate', () => {
- expect(desiredEndState('IN_REVIEW', {})).toContain('within 10 minutes');
+ it('does not request or gate an IN_REVIEW branch on Copilot', () => {
+ const instruction = desiredEndState('IN_REVIEW', {});
+ expect(instruction).toContain('CI is green and the PR is MERGEABLE');
+ expect(instruction.toLowerCase()).not.toContain('copilot');
+ expect(instruction).not.toContain('request/await');
});
});