ralph-hero-mcp-server 2.5.171 → 2.5.183
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/lib/directions.js
CHANGED
|
@@ -575,8 +575,14 @@ export function rankDirections(items, openPRs, config) {
|
|
|
575
575
|
const merged = [];
|
|
576
576
|
for (const c of candidates)
|
|
577
577
|
merged.push({ kind: "issueRow", payload: c });
|
|
578
|
-
|
|
578
|
+
// Filter unlinkable PRs (no linked issue) so they don't appear in next_actions.
|
|
579
|
+
// These are handled by the pr-drain Routine (out of band of Director).
|
|
580
|
+
// See: thoughts/shared/research/2026-05-22-pr-drain-routine-design.md
|
|
581
|
+
for (const p of prScored) {
|
|
582
|
+
if (p.linkedIssueNumber === null)
|
|
583
|
+
continue;
|
|
579
584
|
merged.push({ kind: "prRow", payload: p });
|
|
585
|
+
}
|
|
580
586
|
merged.sort((a, b) => {
|
|
581
587
|
const scoreA = a.kind === "issueRow" ? a.payload.score : a.payload.score;
|
|
582
588
|
const scoreB = b.kind === "issueRow" ? b.payload.score : b.payload.score;
|
|
@@ -151,14 +151,22 @@ async function buildUnblockSignalMap(client, items, now) {
|
|
|
151
151
|
/**
|
|
152
152
|
* Derive the unique `owner/repo` set from the project items so the PR search
|
|
153
153
|
* mirrors the project's repo scope. Items lacking a `repository` field (e.g.
|
|
154
|
-
* draft items) are skipped.
|
|
155
|
-
*
|
|
154
|
+
* draft items) are skipped. Closed items (GitHub `closedAt` set, or workflow
|
|
155
|
+
* state Done/Canceled) also do NOT expand the radius — a stale closed
|
|
156
|
+
* cross-repo item on the board would otherwise pull every open PR from that
|
|
157
|
+
* foreign repo into `next_actions` (see GH-1399). Returns deterministic order
|
|
158
|
+
* (sorted) so the downstream search query is stable.
|
|
156
159
|
*/
|
|
157
160
|
function uniqueRepos(items) {
|
|
158
161
|
const seen = new Set();
|
|
159
162
|
for (const item of items) {
|
|
160
|
-
if (item.repository)
|
|
161
|
-
|
|
163
|
+
if (!item.repository)
|
|
164
|
+
continue;
|
|
165
|
+
if (item.closedAt !== null)
|
|
166
|
+
continue;
|
|
167
|
+
if (item.workflowState === "Done" || item.workflowState === "Canceled")
|
|
168
|
+
continue;
|
|
169
|
+
seen.add(item.repository);
|
|
162
170
|
}
|
|
163
171
|
return Array.from(seen).sort();
|
|
164
172
|
}
|