Skip to content
Closed
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
1 change: 0 additions & 1 deletion apps/loopover-ui/public/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3120,7 +3120,6 @@
"enum": [
"approved",
"blocked",
"stale",
"needs_author",
"failing_checks",
"missing_tests",
Expand Down
1 change: 0 additions & 1 deletion src/openapi/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,6 @@ export const ContributorOpenPrNextStepPacketSchema = z
classification: z.enum([
"approved",
"blocked",
"stale",
"needs_author",
"failing_checks",
"missing_tests",
Expand Down
1 change: 0 additions & 1 deletion src/services/agent-orchestrator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,6 @@ function buildOpenPrMonitorActions(run: AgentRunRecord, pack: ContributorDecisio
"needs_author",
"failing_checks",
"duplicate_prone",
"stale",
"should_close_or_withdraw",
"blocked",
]);
Expand Down
5 changes: 1 addition & 4 deletions src/signals/contributor-open-pr-monitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { isTestPath } from "./test-evidence";
export type OpenPrWorkClassification =
| "approved"
| "blocked"
| "stale"
| "needs_author"
| "failing_checks"
| "missing_tests"
Expand Down Expand Up @@ -112,7 +111,7 @@ export async function buildContributorOpenPrMonitor(env: Env, login: string): Pr
packets.sort((left, right) => priorityRank(left.classification) - priorityRank(right.classification) || left.repoFullName.localeCompare(right.repoFullName) || left.number - right.number);

const cleanupFirst = packets.some((entry) =>
["needs_author", "failing_checks", "duplicate_prone", "stale", "should_close_or_withdraw", "blocked"].includes(entry.classification),
["needs_author", "failing_checks", "duplicate_prone", "should_close_or_withdraw", "blocked"].includes(entry.classification),
);
const approvedCount = packets.filter((entry) => entry.classification === "approved").length;
const summary = summarizeMonitor(openByContributor.length, approvedCount, cleanupFirst);
Expand Down Expand Up @@ -183,7 +182,6 @@ function nextStepsForClassification(classification: OpenPrWorkClassification, re
return [`Add or update tests on ${ref} if the repo expects test coverage.`, `Note test commands run in the PR description.`];
case "duplicate_prone":
return [`Check overlap with other open PRs in ${repoFullName}; close or consolidate duplicates.`, `Comment on ${ref} linking the canonical PR if one exists.`];
case "stale":
case "should_close_or_withdraw":
return [`Update ${ref} with a short status comment or close it if no longer needed.`, `Do not open new work until stale queue pressure is reduced.`];
case "maintainer_lane":
Expand Down Expand Up @@ -281,7 +279,6 @@ function priorityRank(classification: OpenPrWorkClassification): number {
"missing_tests",
"blocked",
"should_close_or_withdraw",
"stale",
"draft",
"reviewable",
"approved",
Expand Down
8 changes: 4 additions & 4 deletions test/unit/agent-orchestrator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ describe("agent orchestrator", () => {
repoFullName: "private-org/secret-alpha",
number: 77,
title: "secret-alpha patch",
classification: "stale",
summary: "secret-alpha patch is stale.",
classification: "should_close_or_withdraw",
summary: "secret-alpha patch should be closed or withdrawn.",
reasons: ["No updates in 30 days."],
nextSteps: ["Privately prioritize the secret-alpha patch before opening more public work."],
},
Expand Down Expand Up @@ -556,8 +556,8 @@ describe("agent orchestrator", () => {
repoFullName: "owner/ready",
number: 9,
title: "Stale fix",
classification: "stale",
summary: "PR is stale.",
classification: "should_close_or_withdraw",
summary: "PR should be closed or withdrawn.",
reasons: ["No updates in 30 days."],
nextSteps: ["Rebase or close the PR."],
},
Expand Down
3 changes: 2 additions & 1 deletion test/unit/contributor-open-pr-monitor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,11 @@ describe("contributor open PR monitor", () => {
]),
);

// Every live OpenPrWorkClassification value must have next-steps guidance. "stale" was removed (#7448):
// mapPendingClassToWorkClassification never produced it (upstream stale_likely_close → should_close_or_withdraw).
for (const classification of [
"reviewable",
"blocked",
"stale",
"draft",
"maintainer_lane",
"missing_tests",
Expand Down
Loading