Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/signals/local-branch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,10 @@ function linkedIssueHygieneLines(branchEligibility: BranchEligibilityResult): st
}

function publicSafeRerunCondition(condition: string): string {
return /eligibility|multiplier|scoreability|score/i.test(condition) ? "Refresh linked issue and base branch metadata before submission." : condition;
if (/account\/queue maturity|pending PRs merge\/close|open PR count|projected score|threshold|eligibility|multiplier|scoreability|score/i.test(condition)) {
return "Rerun after any branch, base, or PR state changes before opening/submitting.";
}
return condition;
}

function branchFreshnessLines(freshness: LocalBranchAnalysis["baseFreshness"]): string[] {
Expand Down
9 changes: 9 additions & 0 deletions test/unit/local-branch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1259,6 +1259,15 @@ describe("local branch analysis", () => {
expect(analysis.workspaceIntelligence.blockers.branchQuality).toEqual([]);
expect(analysis.workspaceIntelligence.blockers.accountState.length).toBeGreaterThan(0);
expect(analysis.recommendedRerunCondition).toBe("Rerun after account/queue maturity blockers clear.");
expect(analysis.prPacket.markdown).not.toMatch(/account\/queue maturity|account-state|score|credibility|Open PR count/i);
expect(analysis.prPacket.bodySections).toEqual(
expect.arrayContaining([
expect.objectContaining({
heading: "Next Steps",
lines: expect.arrayContaining(["- Rerun after any branch, base, or PR state changes before opening/submitting."]),
}),
]),
);
expect(analysis.nextActions[0]?.actionKind).not.toBe("land_existing_prs");
});

Expand Down
Loading