jonah-fleet 1.31.2 → 1.31.4
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/CHANGELOG.md +17 -0
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/index.js +232 -25
- package/dist/lib/daemon.d.ts.map +1 -1
- package/dist/lib/loop-guard.d.ts +4 -0
- package/dist/lib/loop-guard.d.ts.map +1 -1
- package/dist/lib/runner.d.ts +3 -0
- package/dist/lib/runner.d.ts.map +1 -1
- package/dist/lib/terminal-card.d.ts +21 -0
- package/dist/lib/terminal-card.d.ts.map +1 -1
- package/package.json +1 -1
- package/templates/prompts/autowork.md +2 -1
- package/templates/scripts/run-with-loop-guard.js +33 -17
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,20 @@ All notable changes to `jonah-fleet` will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.31.4](https://github.com/Jonah-Projects/jonah-fleet/compare/v1.31.3...v1.31.4) (2026-10-02)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **terminal-card,daemon:** clarify peer-review outcome states in terminal card and watchdog logs ([#585](https://github.com/Jonah-Projects/jonah-fleet/issues/585)) ([745c9a8](https://github.com/Jonah-Projects/jonah-fleet/commit/745c9a8a0450b7d80689b2f1e3e8c1b8cd4fb723))
|
|
14
|
+
|
|
15
|
+
## [1.31.3](https://github.com/Jonah-Projects/jonah-fleet/compare/v1.31.2...v1.31.3) (2026-10-02)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **loop-guard,prompts:** exempt read-only status polling from loop guard and streamline local autowork handoff ([#580](https://github.com/Jonah-Projects/jonah-fleet/issues/580)) ([ff38bdb](https://github.com/Jonah-Projects/jonah-fleet/commit/ff38bdb6bc3ffccde890df958a2feda0db1effd6))
|
|
21
|
+
|
|
8
22
|
## [1.31.2](https://github.com/Jonah-Projects/jonah-fleet/compare/v1.31.1...v1.31.2) (2026-10-02)
|
|
9
23
|
|
|
10
24
|
|
|
@@ -18,6 +32,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
18
32
|
|
|
19
33
|
* **runner:** introduce `detectTransientServiceError` and add startup retry loop (up to 2 retries with backoff) when `agy` encounters transient 503 UNAVAILABLE or handshake EOF during initialization
|
|
20
34
|
* **daemon:** exempt transient service errors (503 UNAVAILABLE) from PR failure cooldowns to avoid penalizing PR review schedules on momentary upstream cloud blips
|
|
35
|
+
* **loop-guard:** exempt read-only CLI status polling commands (`gh run view`, `gh run watch`, `gh pr view`, `gh pr checks`, `git status`) from repetition and ping-pong loop circuit breakers
|
|
36
|
+
* **prompts:** clarify fast autonomous handoff in autowork Step 15 for local daemon runs so completed PRs hand off cleanly to peer-review without 12-minute polling wait
|
|
37
|
+
* **terminal-card,daemon:** clarify peer-review outcome in terminal cards and watchdog completion logs with explicit states (`merged into main`, `bounced to draft`, `approved (deferred merge pending CI)`, `escalated to human`) and eliminate duplicate adjacent card divider lines
|
|
21
38
|
|
|
22
39
|
## [1.31.1](https://github.com/Jonah-Projects/jonah-fleet/compare/v1.31.0...v1.31.1) (2026-10-01)
|
|
23
40
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CA2EvG"}
|
package/dist/index.js
CHANGED
|
@@ -1569,6 +1569,10 @@ function extractExecutionSummary(output) {
|
|
|
1569
1569
|
let summary = match[1].trim();
|
|
1570
1570
|
const trailingSeparators = [
|
|
1571
1571
|
"\u2713 Local peer-review completed",
|
|
1572
|
+
"\u2713 Local peer-review on",
|
|
1573
|
+
"\u26A0\uFE0F Local peer-review on",
|
|
1574
|
+
"\u2713 Targeted peer-review on",
|
|
1575
|
+
"\u26A0\uFE0F Targeted peer-review on",
|
|
1572
1576
|
"\u2713 Local autowork completed",
|
|
1573
1577
|
"\u2713 Local agent session",
|
|
1574
1578
|
"Peer Review Watchdog:",
|
|
@@ -2025,6 +2029,91 @@ function formatEvaluatingDescription(toolName, params, output) {
|
|
|
2025
2029
|
}
|
|
2026
2030
|
return `Evaluating ${name} output...`;
|
|
2027
2031
|
}
|
|
2032
|
+
function detectPeerReviewOutcome(options) {
|
|
2033
|
+
const { output, logContent, prNumber, repoRoot } = options;
|
|
2034
|
+
const contentToCheck = [logContent, output].filter(Boolean).join("\n");
|
|
2035
|
+
if (contentToCheck) {
|
|
2036
|
+
const tableDecisionMatch = contentToCheck.match(/\|\s*Decision\s*\|\s*`?([A-Z_]+)`?\s*\|/i);
|
|
2037
|
+
if (tableDecisionMatch) {
|
|
2038
|
+
const d = tableDecisionMatch[1].toUpperCase();
|
|
2039
|
+
if (d === "MERGE" || d === "MERGED") return "merged";
|
|
2040
|
+
if (d === "BOUNCE" || d === "BOUNCED" || d === "DRAFT") return "bounced";
|
|
2041
|
+
if (d === "DEFER_CI" || d === "DEFERRED_CI" || d === "DEFERRED") return "deferred_ci";
|
|
2042
|
+
if (d === "ESCALATE" || d === "ESCALATED") return "escalated";
|
|
2043
|
+
if (d === "NO_PRS") return "no_prs";
|
|
2044
|
+
}
|
|
2045
|
+
const milestoneMatch = contentToCheck.match(
|
|
2046
|
+
/Review completed with decision\s+`?<?(MERGE|BOUNCE|ESCALATE|DEFER_CI)>?`?/i
|
|
2047
|
+
);
|
|
2048
|
+
if (milestoneMatch) {
|
|
2049
|
+
const d = milestoneMatch[1].toUpperCase();
|
|
2050
|
+
if (d === "MERGE") return "merged";
|
|
2051
|
+
if (d === "BOUNCE") return "bounced";
|
|
2052
|
+
if (d === "DEFER_CI") return "deferred_ci";
|
|
2053
|
+
if (d === "ESCALATE") return "escalated";
|
|
2054
|
+
}
|
|
2055
|
+
const finalActionMatch = contentToCheck.match(/\*\*Final Action\*\*:\s*([^\n]+)/i);
|
|
2056
|
+
if (finalActionMatch) {
|
|
2057
|
+
const fa = finalActionMatch[1];
|
|
2058
|
+
if (/merge/i.test(fa)) return "merged";
|
|
2059
|
+
if (/bounce|draft/i.test(fa)) return "bounced";
|
|
2060
|
+
if (/defer|ci/i.test(fa)) return "deferred_ci";
|
|
2061
|
+
if (/escalat/i.test(fa)) return "escalated";
|
|
2062
|
+
}
|
|
2063
|
+
const hasMergeCommand = /gh\s+pr\s+merge\s+\d+/i.test(contentToCheck) || /gh\s+pr\s+merge[^\n]*--squash/i.test(contentToCheck) || /(?:Squash-merged|Merged)\s+PR\s*#?\d+/i.test(contentToCheck) || /Closed via PR\s*#?\d+\s*\(merged into main\)/i.test(contentToCheck);
|
|
2064
|
+
const hasBounceCommand = /gh\s+pr\s+ready\s+\d+\s+--undo/i.test(contentToCheck) || /gh\s+pr\s+ready\s+--undo/i.test(contentToCheck) || /(?:converted|bounced)\s+PR\s*#?\d+\s+(?:back\s+)?to draft/i.test(contentToCheck) || /converted\s+(?:the\s+)?PR\s+to draft/i.test(contentToCheck) || /bounced\s+(?:the\s+)?PR\s+back to draft/i.test(contentToCheck);
|
|
2065
|
+
const hasDeferredCI = /Waiting for in-progress remote CI checks/i.test(contentToCheck) || /awaiting completion of in-progress remote CI checks/i.test(contentToCheck);
|
|
2066
|
+
const hasEscalate = /needs-human/i.test(contentToCheck) || /🛑 Escalation: Human Decision Required/i.test(contentToCheck);
|
|
2067
|
+
const hasNoPRs = /No PRs to review/i.test(contentToCheck) || /0 ready PRs found/i.test(contentToCheck);
|
|
2068
|
+
if (hasMergeCommand && !hasBounceCommand) return "merged";
|
|
2069
|
+
if (hasBounceCommand && !hasMergeCommand) return "bounced";
|
|
2070
|
+
if (hasDeferredCI && !hasBounceCommand) return "deferred_ci";
|
|
2071
|
+
if (hasEscalate) return "escalated";
|
|
2072
|
+
if (hasNoPRs) return "no_prs";
|
|
2073
|
+
}
|
|
2074
|
+
if (repoRoot && prNumber) {
|
|
2075
|
+
try {
|
|
2076
|
+
const cleanPr = String(prNumber).replace(/\D/g, "");
|
|
2077
|
+
if (cleanPr) {
|
|
2078
|
+
const stdout = execFileSync("gh", ["pr", "view", cleanPr, "--json", "state,isDraft"], {
|
|
2079
|
+
cwd: repoRoot,
|
|
2080
|
+
encoding: "utf8",
|
|
2081
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
2082
|
+
timeout: 2500
|
|
2083
|
+
});
|
|
2084
|
+
const data = JSON.parse(stdout);
|
|
2085
|
+
if (data.state === "MERGED") return "merged";
|
|
2086
|
+
if (data.isDraft === true) return "bounced";
|
|
2087
|
+
if (data.state === "OPEN" && data.isDraft === false) return "deferred_ci";
|
|
2088
|
+
}
|
|
2089
|
+
} catch {
|
|
2090
|
+
}
|
|
2091
|
+
}
|
|
2092
|
+
return "unknown";
|
|
2093
|
+
}
|
|
2094
|
+
function formatPeerReviewOutcomeMessage(targetLabel, outcome, prefix = "Local") {
|
|
2095
|
+
switch (outcome) {
|
|
2096
|
+
case "merged":
|
|
2097
|
+
return pc.green(`\u2713 ${prefix} peer-review on ${targetLabel}: merged into main.
|
|
2098
|
+
`);
|
|
2099
|
+
case "bounced":
|
|
2100
|
+
return pc.yellow(`\u26A0\uFE0F ${prefix} peer-review on ${targetLabel}: bounced to draft.
|
|
2101
|
+
`);
|
|
2102
|
+
case "deferred_ci":
|
|
2103
|
+
return pc.cyan(`\u23F3 ${prefix} peer-review on ${targetLabel}: approved (deferred merge pending CI).
|
|
2104
|
+
`);
|
|
2105
|
+
case "escalated":
|
|
2106
|
+
return pc.red(`\u{1F6A8} ${prefix} peer-review on ${targetLabel}: escalated to human.
|
|
2107
|
+
`);
|
|
2108
|
+
case "no_prs":
|
|
2109
|
+
return pc.dim(`\u2713 ${prefix} peer-review: no PRs to review.
|
|
2110
|
+
`);
|
|
2111
|
+
case "unknown":
|
|
2112
|
+
default:
|
|
2113
|
+
return pc.green(`\u2713 ${prefix} peer-review on ${targetLabel} completed successfully.
|
|
2114
|
+
`);
|
|
2115
|
+
}
|
|
2116
|
+
}
|
|
2028
2117
|
function renderSummaryCard(options) {
|
|
2029
2118
|
const width = Math.min(Math.max((process.stdout.columns || 80) - 4, 64), 90);
|
|
2030
2119
|
const horizontal = "\u2500".repeat(width - 2);
|
|
@@ -2069,6 +2158,29 @@ function renderSummaryCard(options) {
|
|
|
2069
2158
|
const decisionMatch = rawSummary.match(/\*\*Final Action\*\*:\s*([^\n]+)/i);
|
|
2070
2159
|
if (decisionMatch) decision = decisionMatch[1].replace(/[`*]/g, "").trim();
|
|
2071
2160
|
}
|
|
2161
|
+
if (options.routine === "peer-review") {
|
|
2162
|
+
const prMatch = target.match(/PR\s*#?(\d+)/i);
|
|
2163
|
+
const cleanPrNum = options.pr || (prMatch ? prMatch[1] : void 0);
|
|
2164
|
+
const detectedOutcome = detectPeerReviewOutcome({
|
|
2165
|
+
output: options.output,
|
|
2166
|
+
prNumber: cleanPrNum,
|
|
2167
|
+
repoRoot: options.repoRoot
|
|
2168
|
+
});
|
|
2169
|
+
if (!decision) {
|
|
2170
|
+
if (detectedOutcome === "merged") decision = "Merged into main";
|
|
2171
|
+
else if (detectedOutcome === "bounced") decision = "Bounced to draft";
|
|
2172
|
+
else if (detectedOutcome === "deferred_ci") decision = "Approved (deferred merge pending CI)";
|
|
2173
|
+
else if (detectedOutcome === "escalated") decision = "Escalated to human";
|
|
2174
|
+
else if (detectedOutcome === "no_prs") decision = "No PRs to review";
|
|
2175
|
+
} else {
|
|
2176
|
+
const dUpper = decision.toUpperCase();
|
|
2177
|
+
if (dUpper === "MERGE" || dUpper === "MERGED") decision = "Merged into main";
|
|
2178
|
+
else if (dUpper === "BOUNCE" || dUpper === "BOUNCED") decision = "Bounced to draft";
|
|
2179
|
+
else if (dUpper === "DEFER_CI" || dUpper === "DEFERRED_CI") decision = "Approved (deferred merge pending CI)";
|
|
2180
|
+
else if (dUpper === "ESCALATE" || dUpper === "ESCALATED") decision = "Escalated to human";
|
|
2181
|
+
else if (dUpper === "NO_PRS") decision = "No PRs to review";
|
|
2182
|
+
}
|
|
2183
|
+
}
|
|
2072
2184
|
const durationStr = options.durationMs ? `${Math.round(options.durationMs / 1e3)}s` : parsedFromLog?.duration || "";
|
|
2073
2185
|
const border = (s) => pc.dim(pc.gray(s));
|
|
2074
2186
|
const lines = [];
|
|
@@ -2097,15 +2209,19 @@ function renderSummaryCard(options) {
|
|
|
2097
2209
|
let decisionBadge = pc.green(`\u2714 ${decision}`);
|
|
2098
2210
|
if (/bounce|draft|reject|fail/i.test(decision)) {
|
|
2099
2211
|
decisionBadge = pc.yellow(`\u26A0\uFE0F ${decision}`);
|
|
2212
|
+
} else if (/defer|pending|wait/i.test(decision)) {
|
|
2213
|
+
decisionBadge = pc.cyan(`\u23F3 ${decision}`);
|
|
2100
2214
|
} else if (/escalat/i.test(decision)) {
|
|
2101
2215
|
decisionBadge = pc.red(`\u{1F6A8} ${decision}`);
|
|
2216
|
+
} else if (/no prs/i.test(decision)) {
|
|
2217
|
+
decisionBadge = pc.dim(decision);
|
|
2102
2218
|
}
|
|
2103
2219
|
const decisionPlain = ` Action: ${decision}`;
|
|
2104
2220
|
lines.push(
|
|
2105
2221
|
border("\u2502") + ` Action: ${decisionBadge}` + " ".repeat(Math.max(1, width - 3 - decisionPlain.length)) + border("\u2502")
|
|
2106
2222
|
);
|
|
2107
2223
|
}
|
|
2108
|
-
|
|
2224
|
+
const bodyLines = [];
|
|
2109
2225
|
if (rawSummary) {
|
|
2110
2226
|
const summaryLines = rawSummary.split("\n");
|
|
2111
2227
|
for (const rawLine of summaryLines) {
|
|
@@ -2118,7 +2234,7 @@ function renderSummaryCard(options) {
|
|
|
2118
2234
|
}
|
|
2119
2235
|
if (line.startsWith("### ")) {
|
|
2120
2236
|
const heading = line.replace("### ", "").trim();
|
|
2121
|
-
|
|
2237
|
+
bodyLines.push(
|
|
2122
2238
|
border("\u2502") + ` ${pc.bold(pc.cyan(heading))}` + " ".repeat(Math.max(1, width - 3 - heading.length)) + border("\u2502")
|
|
2123
2239
|
);
|
|
2124
2240
|
} else if (line.startsWith("- ") || line.startsWith("* ")) {
|
|
@@ -2129,11 +2245,11 @@ function renderSummaryCard(options) {
|
|
|
2129
2245
|
const wLine = wrapped[i];
|
|
2130
2246
|
const wPlain = stripAnsi(wLine);
|
|
2131
2247
|
if (i === 0) {
|
|
2132
|
-
|
|
2248
|
+
bodyLines.push(
|
|
2133
2249
|
border("\u2502") + ` \u2022 ${wLine}` + " ".repeat(Math.max(1, width - 5 - wPlain.length)) + border("\u2502")
|
|
2134
2250
|
);
|
|
2135
2251
|
} else {
|
|
2136
|
-
|
|
2252
|
+
bodyLines.push(
|
|
2137
2253
|
border("\u2502") + ` ${wLine}` + " ".repeat(Math.max(1, width - 5 - wPlain.length)) + border("\u2502")
|
|
2138
2254
|
);
|
|
2139
2255
|
}
|
|
@@ -2146,11 +2262,11 @@ function renderSummaryCard(options) {
|
|
|
2146
2262
|
const wLine = wrapped[i];
|
|
2147
2263
|
const wPlain = stripAnsi(wLine);
|
|
2148
2264
|
if (i === 0) {
|
|
2149
|
-
|
|
2265
|
+
bodyLines.push(
|
|
2150
2266
|
border("\u2502") + ` \u2714 ${wLine}` + " ".repeat(Math.max(1, width - 5 - wPlain.length)) + border("\u2502")
|
|
2151
2267
|
);
|
|
2152
2268
|
} else {
|
|
2153
|
-
|
|
2269
|
+
bodyLines.push(
|
|
2154
2270
|
border("\u2502") + ` ${wLine}` + " ".repeat(Math.max(1, width - 5 - wPlain.length)) + border("\u2502")
|
|
2155
2271
|
);
|
|
2156
2272
|
}
|
|
@@ -2158,7 +2274,7 @@ function renderSummaryCard(options) {
|
|
|
2158
2274
|
}
|
|
2159
2275
|
}
|
|
2160
2276
|
} else if (parsedFromLog && parsedFromLog.passes && parsedFromLog.passes.length > 0) {
|
|
2161
|
-
|
|
2277
|
+
bodyLines.push(border("\u2502") + ` ${pc.bold("Verification Passes:")}` + " ".repeat(Math.max(1, width - 23)) + border("\u2502"));
|
|
2162
2278
|
for (const pass of parsedFromLog.passes.slice(0, 6)) {
|
|
2163
2279
|
const icon = pass.status === "pass" ? pc.green("\u2714") : pc.red("\u2716");
|
|
2164
2280
|
let criterionName = pass.name;
|
|
@@ -2172,35 +2288,68 @@ function renderSummaryCard(options) {
|
|
|
2172
2288
|
const wLine = wrapped[i];
|
|
2173
2289
|
const wPlain = stripAnsi(wLine);
|
|
2174
2290
|
if (i === 0) {
|
|
2175
|
-
|
|
2291
|
+
bodyLines.push(
|
|
2176
2292
|
border("\u2502") + ` ${icon} ${wLine}` + " ".repeat(Math.max(1, width - 5 - wPlain.length)) + border("\u2502")
|
|
2177
2293
|
);
|
|
2178
2294
|
} else {
|
|
2179
|
-
|
|
2295
|
+
bodyLines.push(
|
|
2180
2296
|
border("\u2502") + ` ${pc.dim(wLine)}` + " ".repeat(Math.max(1, width - 5 - wPlain.length)) + border("\u2502")
|
|
2181
2297
|
);
|
|
2182
2298
|
}
|
|
2183
2299
|
}
|
|
2184
2300
|
}
|
|
2185
2301
|
if (parsedFromLog.actions && parsedFromLog.actions.length > 0) {
|
|
2186
|
-
|
|
2302
|
+
bodyLines.push(border("\u2502") + ` ${pc.bold("Actions Taken:")}` + " ".repeat(Math.max(1, width - 16)) + border("\u2502"));
|
|
2187
2303
|
for (const action of parsedFromLog.actions.slice(0, 4)) {
|
|
2188
2304
|
const wrapped = wrapText(action, width - 8);
|
|
2189
2305
|
for (let i = 0; i < wrapped.length; i++) {
|
|
2190
2306
|
const wLine = wrapped[i];
|
|
2191
2307
|
const wPlain = stripAnsi(wLine);
|
|
2192
2308
|
if (i === 0) {
|
|
2193
|
-
|
|
2309
|
+
bodyLines.push(
|
|
2194
2310
|
border("\u2502") + ` \u2022 ${wLine}` + " ".repeat(Math.max(1, width - 5 - wPlain.length)) + border("\u2502")
|
|
2195
2311
|
);
|
|
2196
2312
|
} else {
|
|
2197
|
-
|
|
2313
|
+
bodyLines.push(
|
|
2198
2314
|
border("\u2502") + ` ${wLine}` + " ".repeat(Math.max(1, width - 5 - wPlain.length)) + border("\u2502")
|
|
2199
2315
|
);
|
|
2200
2316
|
}
|
|
2201
2317
|
}
|
|
2202
2318
|
}
|
|
2203
2319
|
}
|
|
2320
|
+
} else if (options.routine === "peer-review" && decision) {
|
|
2321
|
+
let detail = "";
|
|
2322
|
+
if (/merged/i.test(decision)) {
|
|
2323
|
+
detail = "PR approved and squash-merged into main.";
|
|
2324
|
+
} else if (/bounce|draft/i.test(decision)) {
|
|
2325
|
+
detail = "PR converted to draft for author/autowork fixes.";
|
|
2326
|
+
} else if (/defer|ci/i.test(decision)) {
|
|
2327
|
+
detail = "Clean review; awaiting in-progress remote CI checks before merge.";
|
|
2328
|
+
} else if (/escalat/i.test(decision)) {
|
|
2329
|
+
detail = "Escalated to human review (needs-human).";
|
|
2330
|
+
}
|
|
2331
|
+
if (detail) {
|
|
2332
|
+
const wrapped = wrapText(detail, width - 8);
|
|
2333
|
+
for (let i = 0; i < wrapped.length; i++) {
|
|
2334
|
+
const wLine = wrapped[i];
|
|
2335
|
+
const wPlain = stripAnsi(wLine);
|
|
2336
|
+
const icon = /merged/i.test(decision) ? pc.green(" \u2714 ") : pc.yellow(" \u26A0\uFE0F ");
|
|
2337
|
+
const iconPlain = " \u2714 ";
|
|
2338
|
+
if (i === 0) {
|
|
2339
|
+
bodyLines.push(
|
|
2340
|
+
border("\u2502") + `${icon}${wLine}` + " ".repeat(Math.max(1, width - 1 - iconPlain.length - wPlain.length)) + border("\u2502")
|
|
2341
|
+
);
|
|
2342
|
+
} else {
|
|
2343
|
+
bodyLines.push(
|
|
2344
|
+
border("\u2502") + ` ${wLine}` + " ".repeat(Math.max(1, width - 7 - wPlain.length)) + border("\u2502")
|
|
2345
|
+
);
|
|
2346
|
+
}
|
|
2347
|
+
}
|
|
2348
|
+
}
|
|
2349
|
+
}
|
|
2350
|
+
if (bodyLines.length > 0) {
|
|
2351
|
+
lines.push(border(`\u251C${horizontal}\u2524`));
|
|
2352
|
+
lines.push(...bodyLines);
|
|
2204
2353
|
}
|
|
2205
2354
|
if (parsedFromLog?.logPath) {
|
|
2206
2355
|
lines.push(border(`\u251C${horizontal}\u2524`));
|
|
@@ -3992,6 +4141,20 @@ function computeActionHash(toolName, args) {
|
|
|
3992
4141
|
const canonicalArgs = canonicalStringify(args);
|
|
3993
4142
|
return crypto.createHash("sha256").update(`${toolName}:${canonicalArgs}`).digest("hex");
|
|
3994
4143
|
}
|
|
4144
|
+
function isStatusPollingAction(toolName, args) {
|
|
4145
|
+
if (toolName === "manage_task" && (args?.Action === "status" || args?.action === "status" || args?.Action === "list" || args?.action === "list")) {
|
|
4146
|
+
return true;
|
|
4147
|
+
}
|
|
4148
|
+
if (toolName === "manage_subagents" && (args?.Action === "list" || args?.action === "list")) {
|
|
4149
|
+
return true;
|
|
4150
|
+
}
|
|
4151
|
+
if (toolName === "run_command" && typeof (args?.CommandLine || args?.command) === "string" && /^\s*(?:gh\s+(?:run\s+(?:view|watch|list)|pr\s+(?:view|checks|status|list))|git\s+(?:status|log))\b/i.test(
|
|
4152
|
+
args?.CommandLine || args?.command || ""
|
|
4153
|
+
)) {
|
|
4154
|
+
return true;
|
|
4155
|
+
}
|
|
4156
|
+
return false;
|
|
4157
|
+
}
|
|
3995
4158
|
var LoopGuard = class {
|
|
3996
4159
|
routine;
|
|
3997
4160
|
repetitionThreshold;
|
|
@@ -4036,7 +4199,7 @@ var LoopGuard = class {
|
|
|
4036
4199
|
if (this.trippedResult) {
|
|
4037
4200
|
return this.trippedResult;
|
|
4038
4201
|
}
|
|
4039
|
-
const isStatusPolling =
|
|
4202
|
+
const isStatusPolling = isStatusPollingAction(toolName, args);
|
|
4040
4203
|
const isAnalyticsRoutine = this.routine === "analytics-review";
|
|
4041
4204
|
const isExemptFromRepetition = isStatusPolling || isAnalyticsRoutine || toolName === "view_file" || toolName === "read_file" || toolName === "replace_file_content" || toolName === "write_to_file";
|
|
4042
4205
|
const hash = computeActionHash(toolName, args);
|
|
@@ -4093,7 +4256,7 @@ var LoopGuard = class {
|
|
|
4093
4256
|
if (this.history.length >= requiredPingPongLength) {
|
|
4094
4257
|
const pingPongSlice = this.history.slice(-requiredPingPongLength);
|
|
4095
4258
|
const hasExemptPingPongAction = isAnalyticsRoutine || pingPongSlice.some(
|
|
4096
|
-
(item) =>
|
|
4259
|
+
(item) => isStatusPollingAction(item.toolName, item.args) || item.toolName === "replace_file_content" || item.toolName === "write_to_file"
|
|
4097
4260
|
);
|
|
4098
4261
|
if (!hasExemptPingPongAction) {
|
|
4099
4262
|
const hashA = pingPongSlice[0].hash;
|
|
@@ -4345,7 +4508,7 @@ function buildRoutinePrompt(targetDir, routine, options = {}) {
|
|
|
4345
4508
|
const promptFile = `.github/prompts/${routine}.md`;
|
|
4346
4509
|
const repoContext = `Working repository is located at ${targetDir}. All git, gh, and workspace commands must execute strictly within this repository.`;
|
|
4347
4510
|
const logPrompt = options.routineIssueNumber ? ` Tracking run log issue: #${options.routineIssueNumber}.` : "";
|
|
4348
|
-
const headlessGuardrail = ` Execution Guardrail: You are executing in a headless autonomous session. You MUST NEVER call schedule or yield your turn with plain text to wait on background tasks or verification checks. If a verification command (tests, type-check, lint) runs in the background, inspect its completion with manage_task(Action='status') or manage_subagents(Action='list') (status polling with these tools is explicitly exempted from loop guard circuit breakers), or execute commands with sufficient WaitMsBeforeAsync (up to 10000 ms). DO NOT busy-wait by repeatedly calling read tools (such as view_file) on unchanged files to pass time while waiting, as calling non-polling tools with identical parameters will trip the loop circuit breaker. Never stop calling tools or yield your turn until the routine's terminal Definition of Done is fully reached.`;
|
|
4511
|
+
const headlessGuardrail = ` Execution Guardrail: You are executing in a headless autonomous session. You MUST NEVER call schedule or yield your turn with plain text to wait on background tasks or verification checks. If a verification command (tests, type-check, lint) runs in the background, inspect its completion with manage_task(Action='status') or manage_subagents(Action='list') (status polling with these tools is explicitly exempted from loop guard circuit breakers), or execute commands with sufficient WaitMsBeforeAsync (up to 10000 ms). DO NOT busy-wait by repeatedly calling read tools (such as view_file) on unchanged files to pass time while waiting, as calling non-polling tools with identical parameters will trip the loop circuit breaker. Read-only status commands (gh run view, gh pr view, gh pr checks, git status) are also exempted from loop guard repetition limits. Never stop calling tools or yield your turn until the routine's terminal Definition of Done is fully reached.`;
|
|
4349
4512
|
if (routine === "autowork") {
|
|
4350
4513
|
if (options.issue) {
|
|
4351
4514
|
return `You are the Autowork routine for this repository. ${repoContext} Read and follow the instructions in ${promptFile} exactly. ${skillsPrompt}Your target is issue #${options.issue}. You are in Targeted mode: work issue #${options.issue} directly, ahead of Phase 1 convergence and priority scan.${logPrompt}${headlessGuardrail}`;
|
|
@@ -4701,6 +4864,25 @@ function formatFallbackRunReport(options) {
|
|
|
4701
4864
|
| Target | \`${options.targetLabel}\` |
|
|
4702
4865
|
| Duration | \`${options.durationSec}s\` |
|
|
4703
4866
|
`;
|
|
4867
|
+
if (options.routine === "peer-review" && options.exitCode === 0) {
|
|
4868
|
+
const outcome = detectPeerReviewOutcome({ output: options.output });
|
|
4869
|
+
const decisionMap = {
|
|
4870
|
+
merged: "MERGE",
|
|
4871
|
+
bounced: "BOUNCE",
|
|
4872
|
+
deferred_ci: "DEFER_CI",
|
|
4873
|
+
escalated: "ESCALATE",
|
|
4874
|
+
no_prs: "NO_PRS"
|
|
4875
|
+
};
|
|
4876
|
+
if (decisionMap[outcome]) {
|
|
4877
|
+
reportContent = reportContent.replace(
|
|
4878
|
+
`| Duration | \`${options.durationSec}s\` |
|
|
4879
|
+
`,
|
|
4880
|
+
`| Duration | \`${options.durationSec}s\` |
|
|
4881
|
+
| Decision | \`${decisionMap[outcome]}\` |
|
|
4882
|
+
`
|
|
4883
|
+
);
|
|
4884
|
+
}
|
|
4885
|
+
}
|
|
4704
4886
|
if (options.exitCode !== 0) {
|
|
4705
4887
|
const errorChunks = [options.output?.trim(), options.stderr?.trim()].filter(Boolean);
|
|
4706
4888
|
const combinedError = errorChunks.join("\n");
|
|
@@ -5188,11 +5370,11 @@ Timeout: ${printTimeout}`,
|
|
|
5188
5370
|
if (routineIssueNumber) {
|
|
5189
5371
|
tryReconcileLocalRunIssue(targetDir, routineIssueNumber, reportContent, exitCode, hostname, routine, quotaInfo);
|
|
5190
5372
|
}
|
|
5373
|
+
const prMatch = targetLabel.match(/PR\s*#?(\d+)/i);
|
|
5374
|
+
const issueMatch = targetLabel.match(/Issue\s*#?(\d+)/i);
|
|
5375
|
+
const effectiveIssue = options.issue || (issueMatch ? issueMatch[1] : void 0);
|
|
5376
|
+
const effectivePR = options.pr || (prMatch ? prMatch[1] : void 0);
|
|
5191
5377
|
if (options.showCard !== false && !options.verbose) {
|
|
5192
|
-
const prMatch = targetLabel.match(/PR\s*#?(\d+)/i);
|
|
5193
|
-
const issueMatch = targetLabel.match(/Issue\s*#?(\d+)/i);
|
|
5194
|
-
const effectiveIssue = options.issue || (issueMatch ? issueMatch[1] : void 0);
|
|
5195
|
-
const effectivePR = options.pr || (prMatch ? prMatch[1] : void 0);
|
|
5196
5378
|
if (exitCode === 0) {
|
|
5197
5379
|
console.log(
|
|
5198
5380
|
"\n" + renderSummaryCard({
|
|
@@ -5229,7 +5411,13 @@ Timeout: ${printTimeout}`,
|
|
|
5229
5411
|
issueNumber: routineIssueNumber,
|
|
5230
5412
|
quotaPaused: quotaInfo.isQuota,
|
|
5231
5413
|
quotaResetInfo: quotaInfo.resetInfo,
|
|
5232
|
-
transientServiceError
|
|
5414
|
+
transientServiceError,
|
|
5415
|
+
durationMs,
|
|
5416
|
+
outcome: routine === "peer-review" && exitCode === 0 ? detectPeerReviewOutcome({
|
|
5417
|
+
output,
|
|
5418
|
+
prNumber: effectivePR,
|
|
5419
|
+
repoRoot: targetDir
|
|
5420
|
+
}) : void 0
|
|
5233
5421
|
};
|
|
5234
5422
|
}
|
|
5235
5423
|
|
|
@@ -5284,8 +5472,18 @@ async function runRoutineCommand(routine, options = {}) {
|
|
|
5284
5472
|
return;
|
|
5285
5473
|
}
|
|
5286
5474
|
if (result.success) {
|
|
5287
|
-
|
|
5475
|
+
if (routine === "peer-review") {
|
|
5476
|
+
const targetStr = options.pr ? `PR #${options.pr}` : "PR";
|
|
5477
|
+
const outcome = result.outcome || detectPeerReviewOutcome({
|
|
5478
|
+
output: result.output,
|
|
5479
|
+
prNumber: options.pr,
|
|
5480
|
+
repoRoot: cwd
|
|
5481
|
+
});
|
|
5482
|
+
console.log("\n" + formatPeerReviewOutcomeMessage(targetStr, outcome, "Local").trimEnd());
|
|
5483
|
+
} else {
|
|
5484
|
+
console.log(pc12.green(`
|
|
5288
5485
|
\u2713 Local agent session for '${routine}' completed successfully.`));
|
|
5486
|
+
}
|
|
5289
5487
|
} else {
|
|
5290
5488
|
console.error(pc12.red(`
|
|
5291
5489
|
\u2717 Local agent session for '${routine}' failed with exit code ${result.exitCode}.`));
|
|
@@ -6206,8 +6404,12 @@ async function drainReviewQueue(drainOptions) {
|
|
|
6206
6404
|
break;
|
|
6207
6405
|
}
|
|
6208
6406
|
if (result.success) {
|
|
6209
|
-
|
|
6210
|
-
|
|
6407
|
+
const outcome = result.outcome || detectPeerReviewOutcome({
|
|
6408
|
+
output: result.output,
|
|
6409
|
+
prNumber: prNum,
|
|
6410
|
+
repoRoot
|
|
6411
|
+
});
|
|
6412
|
+
console.log(formatPeerReviewOutcomeMessage(targetLabel, outcome, "Local"));
|
|
6211
6413
|
if (typeof prNum === "number") {
|
|
6212
6414
|
failureCooldowns?.delete(prNum);
|
|
6213
6415
|
}
|
|
@@ -6625,8 +6827,12 @@ Stopping local agent daemon...`));
|
|
|
6625
6827
|
}
|
|
6626
6828
|
});
|
|
6627
6829
|
if (result.success) {
|
|
6628
|
-
|
|
6629
|
-
|
|
6830
|
+
const outcome = result.outcome || detectPeerReviewOutcome({
|
|
6831
|
+
output: result.output,
|
|
6832
|
+
prNumber,
|
|
6833
|
+
repoRoot
|
|
6834
|
+
});
|
|
6835
|
+
console.log(formatPeerReviewOutcomeMessage(`PR #${prNumber}`, outcome, "Targeted"));
|
|
6630
6836
|
} else {
|
|
6631
6837
|
console.warn(pc14.yellow(`\u26A0\uFE0F Targeted peer-review on PR #${prNumber} completed with code ${result.exitCode}.
|
|
6632
6838
|
`));
|
|
@@ -7310,5 +7516,6 @@ export {
|
|
|
7310
7516
|
formatLoopGuardReport,
|
|
7311
7517
|
getFleetFooter,
|
|
7312
7518
|
getFleetRunBadge,
|
|
7519
|
+
isStatusPollingAction,
|
|
7313
7520
|
renderFleetBanner
|
|
7314
7521
|
};
|
package/dist/lib/daemon.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daemon.d.ts","sourceRoot":"","sources":["../../src/lib/daemon.ts"],"names":[],"mappings":"AA0BA,OAAO,
|
|
1
|
+
{"version":3,"file":"daemon.d.ts","sourceRoot":"","sources":["../../src/lib/daemon.ts"],"names":[],"mappings":"AA0BA,OAAO,EAML,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAC;AAI5B,MAAM,MAAM,YAAY,GAAG,gBAAgB,CAAC;AAC5C,YAAY,EAAE,mBAAmB,EAAE,CAAC;AAEpC,M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;IACH,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,gBAAgB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAChD,gBAAgB,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACjD;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,WAAW,EAAE,0BAA0B,GACtC,OAAO,CAAC;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAiIjD;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CA4pBhG"}
|
package/dist/lib/loop-guard.d.ts
CHANGED
|
@@ -30,6 +30,10 @@ export declare function canonicalStringify(value: any): string;
|
|
|
30
30
|
* Computes a deterministic SHA-256 action hash: SHA-256(tool_name + canonicalString(args))
|
|
31
31
|
*/
|
|
32
32
|
export declare function computeActionHash(toolName: string, args: any): string;
|
|
33
|
+
/**
|
|
34
|
+
* Checks whether an action is a read-only status or task polling action exempt from repetition / ping-pong loops.
|
|
35
|
+
*/
|
|
36
|
+
export declare function isStatusPollingAction(toolName: string, args: any): boolean;
|
|
33
37
|
/**
|
|
34
38
|
* Deterministic Loop Guard & Circuit Breaker monitoring tool calls and execution events.
|
|
35
39
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loop-guard.d.ts","sourceRoot":"","sources":["../../src/lib/loop-guard.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,mBAAmB,GAAG,YAAY,GAAG,WAAW,GAAG,oBAAoB,CAAC;AAEpF,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,mBAAmB,CAAC;I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2B;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,2BAA2B,GAAG,MAAM,CA0BvF;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,aAAa,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,sBAAsB,GAAG,MAAM,CAmC7E"}
|
package/dist/lib/runner.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type PeerReviewOutcome } from './terminal-card.js';
|
|
1
2
|
export interface RunLocalRoutineOptions {
|
|
2
3
|
targetDir: string;
|
|
3
4
|
routine: string;
|
|
@@ -26,6 +27,8 @@ export interface RunLocalRoutineResult {
|
|
|
26
27
|
quotaPaused?: boolean;
|
|
27
28
|
quotaResetInfo?: string;
|
|
28
29
|
transientServiceError?: boolean;
|
|
30
|
+
durationMs?: number;
|
|
31
|
+
outcome?: PeerReviewOutcome;
|
|
29
32
|
}
|
|
30
33
|
export interface StreamJsonEvent {
|
|
31
34
|
event?: string;
|
package/dist/lib/runner.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/lib/runner.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/lib/runner.ts"],"names":[],"mappings":"AAQA,OAAO,EAgBL,KAAK,iBAAiB,EACvB,MAAM,oBAAoB,CAAC;AAS5B,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,C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CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,OAAO,GAAG,MAAM,GAAG,IAAI,GAAG,MAAM,CAEnG;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAsDzF;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,qBAAqB,GAAG,MAAM,CA+B9E;AAED;;;GAGG;AACH,wBAAsB,uBAAuB,CAC3C,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC;IAAE,SAAS,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAkBzE;AAED;;GAEG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAskBrG"}
|
|
@@ -114,6 +114,27 @@ export declare function formatSubagentsProgress(outputOrSubagents: any): string
|
|
|
114
114
|
* Formats granular description when a tool finishes and the agent evaluates its results.
|
|
115
115
|
*/
|
|
116
116
|
export declare function formatEvaluatingDescription(toolName: string, params?: Record<string, any>, output?: string): string;
|
|
117
|
+
export type PeerReviewOutcome = 'merged' | 'bounced' | 'deferred_ci' | 'escalated' | 'no_prs' | 'unknown';
|
|
118
|
+
export interface DetectPeerReviewOutcomeOptions {
|
|
119
|
+
output?: string;
|
|
120
|
+
logContent?: string;
|
|
121
|
+
prNumber?: number | string;
|
|
122
|
+
repoRoot?: string;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Detects the specific outcome of a peer-review routine run:
|
|
126
|
+
* - 'merged': PR was approved and squash-merged into main
|
|
127
|
+
* - 'bounced': PR had blocking findings and was converted back to draft
|
|
128
|
+
* - 'deferred_ci': PR is clean but merge is deferred awaiting in-progress remote CI checks
|
|
129
|
+
* - 'escalated': PR reached round cap or stalled and was escalated to human with needs-human
|
|
130
|
+
* - 'no_prs': Scan mode found 0 eligible PRs to review
|
|
131
|
+
* - 'unknown': No decisive outcome detected
|
|
132
|
+
*/
|
|
133
|
+
export declare function detectPeerReviewOutcome(options: DetectPeerReviewOutcomeOptions): PeerReviewOutcome;
|
|
134
|
+
/**
|
|
135
|
+
* Formats a clear, informative peer-review completion line for terminal output.
|
|
136
|
+
*/
|
|
137
|
+
export declare function formatPeerReviewOutcomeMessage(targetLabel: string, outcome: PeerReviewOutcome, prefix?: 'Local' | 'Targeted'): string;
|
|
117
138
|
/**
|
|
118
139
|
* Renders a styled Unicode summary card.
|
|
119
140
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"terminal-card.d.ts","sourceRoot":"","sources":["../../src/lib/terminal-card.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,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MAAM,CAAA;KAAE,CAAC,CAAC;IACjC,SAAS,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACrC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,WAAW,EAAE,gBAAgB,EAAE,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,mBAAmB,EAC3B,OAAO,CAAC,EAAE,kBAAkB,GAC3B,MAAM,CAgLR"}
|
package/package.json
CHANGED
|
@@ -306,7 +306,8 @@ _Generated by [Antigravity](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/ru
|
|
|
306
306
|
```
|
|
307
307
|
14. If run aborts before opening PR, release claim (unassign).
|
|
308
308
|
15. **In-Session Peer Review Wait & Immediate Convergence (Warm Context):**
|
|
309
|
-
-
|
|
309
|
+
- **Local Daemon Environment**: If running locally under `jonah-fleet daemon` or with local runner (`runner:local`): Do NOT busy-wait or poll PR status. Autonomous handoff is complete. Proceed immediately to Step 16 / Logging, unassign yourself from the PR (`gh pr edit <PR> --remove-assignee <login>`), record terminal SUCCESS, and exit cleanly so the daemon's Peer Review Watchdog can review the PR without delay.
|
|
310
|
+
- **Cloud CI Environment**: Poll PR status for up to 10–12 minutes using read-only status checks (`gh pr view`, `gh pr checks`, `gh run view`).
|
|
310
311
|
- If merged: unassign yourself, resolve and close any open past failed routine run issues for `#<TARGET_ISSUE>`, record terminal SUCCESS and exit cleanly:
|
|
311
312
|
```bash
|
|
312
313
|
PAST_FAILURES=$(gh issue list --label routine-log --search "Issue #<TARGET_ISSUE>" --state open --json number --jq '.[].number' || true)
|
|
@@ -38,6 +38,37 @@ export function computeActionHash(toolName, args) {
|
|
|
38
38
|
return crypto.createHash('sha256').update(`${toolName}:${canonicalArgs}`).digest('hex');
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
export function isStatusPollingAction(toolName, args) {
|
|
42
|
+
if (
|
|
43
|
+
toolName === 'manage_task' &&
|
|
44
|
+
(args?.Action === 'status' ||
|
|
45
|
+
args?.action === 'status' ||
|
|
46
|
+
args?.Action === 'list' ||
|
|
47
|
+
args?.action === 'list')
|
|
48
|
+
) {
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (
|
|
53
|
+
toolName === 'manage_subagents' &&
|
|
54
|
+
(args?.Action === 'list' || args?.action === 'list')
|
|
55
|
+
) {
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (
|
|
60
|
+
toolName === 'run_command' &&
|
|
61
|
+
typeof (args?.CommandLine || args?.command) === 'string' &&
|
|
62
|
+
/^\s*(?:gh\s+(?:run\s+(?:view|watch|list)|pr\s+(?:view|checks|status|list))|git\s+(?:status|log))\b/i.test(
|
|
63
|
+
args?.CommandLine || args?.command || ''
|
|
64
|
+
)
|
|
65
|
+
) {
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
|
|
41
72
|
export class LoopGuard {
|
|
42
73
|
constructor(options = {}) {
|
|
43
74
|
this.routine = options.routine;
|
|
@@ -64,15 +95,7 @@ export class LoopGuard {
|
|
|
64
95
|
recordAction(toolName, args, isError = false) {
|
|
65
96
|
if (this.trippedResult) return this.trippedResult;
|
|
66
97
|
|
|
67
|
-
const isStatusPolling =
|
|
68
|
-
(toolName === 'manage_task' &&
|
|
69
|
-
(args?.Action === 'status' ||
|
|
70
|
-
args?.action === 'status' ||
|
|
71
|
-
args?.Action === 'list' ||
|
|
72
|
-
args?.action === 'list')) ||
|
|
73
|
-
(toolName === 'manage_subagents' &&
|
|
74
|
-
(args?.Action === 'list' ||
|
|
75
|
-
args?.action === 'list'));
|
|
98
|
+
const isStatusPolling = isStatusPollingAction(toolName, args);
|
|
76
99
|
|
|
77
100
|
const isAnalyticsRoutine = this.routine === 'analytics-review';
|
|
78
101
|
|
|
@@ -151,14 +174,7 @@ export class LoopGuard {
|
|
|
151
174
|
isAnalyticsRoutine ||
|
|
152
175
|
pingPongSlice.some(
|
|
153
176
|
(item) =>
|
|
154
|
-
(item.toolName
|
|
155
|
-
(item.args?.Action === 'status' ||
|
|
156
|
-
item.args?.action === 'status' ||
|
|
157
|
-
item.args?.Action === 'list' ||
|
|
158
|
-
item.args?.action === 'list')) ||
|
|
159
|
-
(item.toolName === 'manage_subagents' &&
|
|
160
|
-
(item.args?.Action === 'list' ||
|
|
161
|
-
item.args?.action === 'list')) ||
|
|
177
|
+
isStatusPollingAction(item.toolName, item.args) ||
|
|
162
178
|
item.toolName === 'replace_file_content' ||
|
|
163
179
|
item.toolName === 'write_to_file'
|
|
164
180
|
);
|