@mycompbox/compbox-cli 1.21.6 → 1.21.8
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/.tsbuildinfo +1 -1
- package/commands/run.d.ts +39 -0
- package/commands/run.d.ts.map +1 -1
- package/commands/run.js +121 -12
- package/commands/run.js.map +1 -1
- package/commands/workspace.d.ts.map +1 -1
- package/commands/workspace.js +35 -1
- package/commands/workspace.js.map +1 -1
- package/index.js +447 -48
- package/package.json +1 -1
- package/utils/agent-invoker.d.ts +20 -0
- package/utils/agent-invoker.d.ts.map +1 -1
- package/utils/agent-invoker.js +112 -8
- package/utils/agent-invoker.js.map +1 -1
- package/utils/mailbox-client.d.ts +27 -1
- package/utils/mailbox-client.d.ts.map +1 -1
- package/utils/mailbox-client.js +28 -3
- package/utils/mailbox-client.js.map +1 -1
- package/utils/package-manager-shims.d.ts +38 -0
- package/utils/package-manager-shims.d.ts.map +1 -0
- package/utils/package-manager-shims.js +76 -0
- package/utils/package-manager-shims.js.map +1 -0
- package/utils/process-group.d.ts +42 -0
- package/utils/process-group.d.ts.map +1 -0
- package/utils/process-group.js +127 -0
- package/utils/process-group.js.map +1 -0
- package/utils/run-workspace.d.ts +10 -0
- package/utils/run-workspace.d.ts.map +1 -1
- package/utils/run-workspace.js +28 -2
- package/utils/run-workspace.js.map +1 -1
package/package.json
CHANGED
package/utils/agent-invoker.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ import { type PxpipeRouting, type InterviewSeedPayload, extractCompletionJson, l
|
|
|
22
22
|
export { extractCompletionJson, looksLikeCompletionAttempt, meetsComplianceTarget, buildAuditFeedback, COMPLETION_REPAIR_INSTRUCTION, };
|
|
23
23
|
export type { ComplianceSummary, EpicRequestDraft };
|
|
24
24
|
import { type KeyRun } from './key-run.js';
|
|
25
|
+
import { type ProcessGroupDeps } from './process-group.js';
|
|
25
26
|
import type { FinishResult, RunWorkspaceManager } from './run-workspace.js';
|
|
26
27
|
import type { MailboxAttachment, MailboxClient, MailboxJob, MailboxJobTurn } from './mailbox-client.js';
|
|
27
28
|
/**
|
|
@@ -259,6 +260,11 @@ export interface StartExecutionPlanCtx {
|
|
|
259
260
|
projectDir: string | undefined;
|
|
260
261
|
/** Run on the person's saved API key instead of this computer's Claude sign-in. */
|
|
261
262
|
keyRun?: KeyRun;
|
|
263
|
+
/**
|
|
264
|
+
* Aborted when the person cancels the job from the website (ENG-300): the
|
|
265
|
+
* agent's whole process group is terminated and the run reports cancelled.
|
|
266
|
+
*/
|
|
267
|
+
signal?: AbortSignal;
|
|
262
268
|
}
|
|
263
269
|
export interface StartExecutionPlanDeps {
|
|
264
270
|
/** Injectable child spawner (defaults to node's `spawn`) — tests never spawn a real `claude`. */
|
|
@@ -273,6 +279,8 @@ export interface StartExecutionPlanDeps {
|
|
|
273
279
|
heartbeat?: () => void | Promise<void>;
|
|
274
280
|
heartbeatIntervalMs?: number;
|
|
275
281
|
timeoutMs?: number;
|
|
282
|
+
/** Injectable process-group killer (tests never signal real processes). */
|
|
283
|
+
processGroup?: ProcessGroupDeps;
|
|
276
284
|
}
|
|
277
285
|
/**
|
|
278
286
|
* Run the planner headless for a `start_execution`/`plan` job (ENG-164).
|
|
@@ -314,6 +322,11 @@ export interface StartExecutionRefineCtx {
|
|
|
314
322
|
notes?: string | undefined;
|
|
315
323
|
projectDir: string | undefined;
|
|
316
324
|
keyRun?: KeyRun;
|
|
325
|
+
/**
|
|
326
|
+
* Aborted when the person cancels the job from the website (ENG-300): the
|
|
327
|
+
* agent's whole process group is terminated and the run reports cancelled.
|
|
328
|
+
*/
|
|
329
|
+
signal?: AbortSignal;
|
|
317
330
|
}
|
|
318
331
|
export type StartExecutionRefineDeps = StartExecutionPlanDeps;
|
|
319
332
|
/** One-line final mailbox turn for a refine run. */
|
|
@@ -399,6 +412,11 @@ export interface StartExecutionOrchestrateCtx {
|
|
|
399
412
|
* on the open pull request's branch instead of executing the epic's plan.
|
|
400
413
|
*/
|
|
401
414
|
fix?: StartExecutionFix;
|
|
415
|
+
/**
|
|
416
|
+
* Aborted when the person cancels the job from the website (ENG-300): the
|
|
417
|
+
* agent's whole process group is terminated and the run reports cancelled.
|
|
418
|
+
*/
|
|
419
|
+
signal?: AbortSignal;
|
|
402
420
|
}
|
|
403
421
|
export interface StartExecutionOrchestrateDeps {
|
|
404
422
|
/** Injectable child spawner (defaults to node's `spawn`) — tests never spawn a real `claude`. */
|
|
@@ -415,6 +433,8 @@ export interface StartExecutionOrchestrateDeps {
|
|
|
415
433
|
heartbeat?: () => void | Promise<void>;
|
|
416
434
|
heartbeatIntervalMs?: number;
|
|
417
435
|
timeoutMs?: number;
|
|
436
|
+
/** Injectable process-group killer (tests never signal real processes). */
|
|
437
|
+
processGroup?: ProcessGroupDeps;
|
|
418
438
|
/**
|
|
419
439
|
* Runs the orchestrator on its own new branch in a separate git worktree and
|
|
420
440
|
* finishes with a pushed branch + pull request (see run-workspace.ts). The
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-invoker.d.ts","sourceRoot":"","sources":["../../src/utils/agent-invoker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAa,MAAM,oBAAoB,CAAC;AAItD,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,qBAAqB,EACrB,0BAA0B,EAC1B,qBAAqB,EACrB,kBAAkB,EAClB,6BAA6B,EAI7B,KAAK,iBAAiB,EAEtB,KAAK,gBAAgB,EAErB,KAAK,iBAAiB,EACvB,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,qBAAqB,EACrB,kBAAkB,EAClB,6BAA6B,GAC9B,CAAC;AACF,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;AAOpD,OAAO,EAAgD,KAAK,MAAM,EAAE,MAAM,cA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6D;AAC7D,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAY9D;AAQD;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAC1C,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAkBzB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,+BAA+B,CACnD,GAAG,EAAE,4BAA4B,EACjC,IAAI,GAAE,6BAAkC,GACvC,OAAO,CAAC,YAAY,CAAC,CAiTvB"}
|
package/utils/agent-invoker.js
CHANGED
|
@@ -28,6 +28,7 @@ export { extractCompletionJson, looksLikeCompletionAttempt, meetsComplianceTarge
|
|
|
28
28
|
import { claudeChildEnvPath, claudeNotFoundMessage, resolveClaudeBinary, } from './claude-runtime.js';
|
|
29
29
|
import { isGitRepoDir } from './config-store.js';
|
|
30
30
|
import { keyRunArgs, keyRunEnv, parseClaudeJsonResult } from './key-run.js';
|
|
31
|
+
import { CANCEL_GRACE_MS, cancelledRunResult, groupSpawnOptions, killGroupOnAbort, killProcessGroupNow, } from './process-group.js';
|
|
31
32
|
// Fable is the model CompBox agents run on (ENG-E26): it is pxpipe's 100/100
|
|
32
33
|
// image reader, so routing it through the proxy cuts input tokens without
|
|
33
34
|
// quality loss. Opus/Sonnet are deliberately NOT used here — pxpipe passes
|
|
@@ -466,19 +467,34 @@ async function takeConversationStep(job, ctx) {
|
|
|
466
467
|
const outcome = await runConversationStep({ turns, saved }, {
|
|
467
468
|
reply: async (system, messages) => {
|
|
468
469
|
if (anthropic) {
|
|
469
|
-
const response = await anthropic.messages.create({
|
|
470
|
+
const response = await anthropic.messages.create({
|
|
471
|
+
model: ANTHROPIC_MODEL,
|
|
472
|
+
max_tokens: 4096,
|
|
473
|
+
system,
|
|
474
|
+
messages,
|
|
475
|
+
});
|
|
470
476
|
const text = response.content.find((b) => b.type === 'text');
|
|
471
477
|
return text?.type === 'text' ? text.text : '';
|
|
472
478
|
}
|
|
473
479
|
const prompt = renderConversationPrompt(messages);
|
|
474
480
|
try {
|
|
475
|
-
return (await runClaudeCliTurn(prompt, {
|
|
481
|
+
return (await runClaudeCliTurn(prompt, {
|
|
482
|
+
systemPrompt: system,
|
|
483
|
+
resumeSessionId: undefined,
|
|
484
|
+
routing,
|
|
485
|
+
model: cliModel,
|
|
486
|
+
})).text;
|
|
476
487
|
}
|
|
477
488
|
catch (error) {
|
|
478
489
|
if (cliModel === null || !needsDefaultModel(error))
|
|
479
490
|
throw error;
|
|
480
491
|
cliModel = null;
|
|
481
|
-
return (await runClaudeCliTurn(prompt, {
|
|
492
|
+
return (await runClaudeCliTurn(prompt, {
|
|
493
|
+
systemPrompt: system,
|
|
494
|
+
resumeSessionId: undefined,
|
|
495
|
+
routing,
|
|
496
|
+
model: null,
|
|
497
|
+
})).text;
|
|
482
498
|
}
|
|
483
499
|
},
|
|
484
500
|
save: async (existingId, draft) => {
|
|
@@ -804,6 +820,9 @@ export function buildPlannerFinalTurn(outcome) {
|
|
|
804
820
|
* non-zero exit, fail with a result the web failure banner can display.
|
|
805
821
|
*/
|
|
806
822
|
export async function invokeStartExecutionPlan(ctx, deps = {}) {
|
|
823
|
+
// ENG-300: cancelled before it started — don't spawn at all.
|
|
824
|
+
if (ctx.signal?.aborted)
|
|
825
|
+
return cancelledRunResult('planner');
|
|
807
826
|
const spawnImpl = deps.spawnImpl ?? spawn;
|
|
808
827
|
const fetchImpl = deps.fetchImpl ?? fetch;
|
|
809
828
|
const isGitRepo = deps.isGitRepo ?? isGitRepoDir;
|
|
@@ -852,7 +871,18 @@ export async function invokeStartExecutionPlan(ctx, deps = {}) {
|
|
|
852
871
|
cwd: ctx.projectDir,
|
|
853
872
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
854
873
|
env: childEnv,
|
|
874
|
+
// ENG-300: lead its own process group so a cancel can stop everything it started.
|
|
875
|
+
...groupSpawnOptions(deps.processGroup?.platform),
|
|
855
876
|
});
|
|
877
|
+
// ENG-300: a cancel from the website terminates the whole group; the run is
|
|
878
|
+
// reported once the child has actually exited (or after a grace backstop).
|
|
879
|
+
let cancelled = false;
|
|
880
|
+
const disposeAbort = killGroupOnAbort(ctx.signal, child, () => {
|
|
881
|
+
cancelled = true;
|
|
882
|
+
setTimeout(() => {
|
|
883
|
+
finish(cancelledRunResult('planner'));
|
|
884
|
+
}, (deps.processGroup?.graceMs ?? CANCEL_GRACE_MS) + 5_000).unref();
|
|
885
|
+
}, deps.processGroup);
|
|
856
886
|
// H4: independent keep-alive so the machine stays online during the long run.
|
|
857
887
|
const heartbeatTimer = deps.heartbeat
|
|
858
888
|
? setInterval(() => {
|
|
@@ -868,10 +898,11 @@ export async function invokeStartExecutionPlan(ctx, deps = {}) {
|
|
|
868
898
|
if (heartbeatTimer)
|
|
869
899
|
clearInterval(heartbeatTimer);
|
|
870
900
|
clearTimeout(timer);
|
|
901
|
+
disposeAbort();
|
|
871
902
|
resolve(result);
|
|
872
903
|
};
|
|
873
904
|
const timer = setTimeout(() => {
|
|
874
|
-
child.
|
|
905
|
+
killProcessGroupNow(child, deps.processGroup);
|
|
875
906
|
finish({
|
|
876
907
|
status: 'failed',
|
|
877
908
|
result: {
|
|
@@ -886,6 +917,10 @@ export async function invokeStartExecutionPlan(ctx, deps = {}) {
|
|
|
886
917
|
stderr += chunk.toString('utf-8');
|
|
887
918
|
});
|
|
888
919
|
child.on('error', (error) => {
|
|
920
|
+
if (cancelled) {
|
|
921
|
+
finish(cancelledRunResult('planner'));
|
|
922
|
+
return;
|
|
923
|
+
}
|
|
889
924
|
finish({
|
|
890
925
|
status: 'failed',
|
|
891
926
|
result: {
|
|
@@ -899,6 +934,10 @@ export async function invokeStartExecutionPlan(ctx, deps = {}) {
|
|
|
899
934
|
void (async () => {
|
|
900
935
|
if (ctx.keyRun)
|
|
901
936
|
stdout = await settleKeyRun(ctx, ctx.keyRun, stdout);
|
|
937
|
+
if (cancelled) {
|
|
938
|
+
finish(cancelledRunResult('planner'));
|
|
939
|
+
return;
|
|
940
|
+
}
|
|
902
941
|
const combined = `${stdout}\n${stderr}`;
|
|
903
942
|
// A needs-review outcome wins regardless of exit code: the planner may
|
|
904
943
|
// exit 0 after emitting the marker. Surface it to the web (not silent).
|
|
@@ -1032,6 +1071,9 @@ export function buildRefineFinalTurn(outcome) {
|
|
|
1032
1071
|
* regardless of exit code.
|
|
1033
1072
|
*/
|
|
1034
1073
|
export async function invokeStartExecutionRefine(ctx, deps = {}) {
|
|
1074
|
+
// ENG-300: cancelled before it started — don't spawn at all.
|
|
1075
|
+
if (ctx.signal?.aborted)
|
|
1076
|
+
return cancelledRunResult('planner');
|
|
1035
1077
|
const spawnImpl = deps.spawnImpl ?? spawn;
|
|
1036
1078
|
const fetchImpl = deps.fetchImpl ?? fetch;
|
|
1037
1079
|
const isGitRepo = deps.isGitRepo ?? isGitRepoDir;
|
|
@@ -1063,7 +1105,18 @@ export async function invokeStartExecutionRefine(ctx, deps = {}) {
|
|
|
1063
1105
|
cwd: ctx.projectDir,
|
|
1064
1106
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
1065
1107
|
env: childEnv,
|
|
1108
|
+
// ENG-300: lead its own process group so a cancel can stop everything it started.
|
|
1109
|
+
...groupSpawnOptions(deps.processGroup?.platform),
|
|
1066
1110
|
});
|
|
1111
|
+
// ENG-300: a cancel from the website terminates the whole group; the run is
|
|
1112
|
+
// reported once the child has actually exited (or after a grace backstop).
|
|
1113
|
+
let cancelled = false;
|
|
1114
|
+
const disposeAbort = killGroupOnAbort(ctx.signal, child, () => {
|
|
1115
|
+
cancelled = true;
|
|
1116
|
+
setTimeout(() => {
|
|
1117
|
+
finish(cancelledRunResult('planner'));
|
|
1118
|
+
}, (deps.processGroup?.graceMs ?? CANCEL_GRACE_MS) + 5_000).unref();
|
|
1119
|
+
}, deps.processGroup);
|
|
1067
1120
|
const heartbeatTimer = deps.heartbeat
|
|
1068
1121
|
? setInterval(() => {
|
|
1069
1122
|
void Promise.resolve(deps.heartbeat?.()).catch(() => {
|
|
@@ -1078,10 +1131,11 @@ export async function invokeStartExecutionRefine(ctx, deps = {}) {
|
|
|
1078
1131
|
if (heartbeatTimer)
|
|
1079
1132
|
clearInterval(heartbeatTimer);
|
|
1080
1133
|
clearTimeout(timer);
|
|
1134
|
+
disposeAbort();
|
|
1081
1135
|
resolve(result);
|
|
1082
1136
|
};
|
|
1083
1137
|
const timer = setTimeout(() => {
|
|
1084
|
-
child.
|
|
1138
|
+
killProcessGroupNow(child, deps.processGroup);
|
|
1085
1139
|
finish({
|
|
1086
1140
|
status: 'failed',
|
|
1087
1141
|
result: {
|
|
@@ -1096,6 +1150,10 @@ export async function invokeStartExecutionRefine(ctx, deps = {}) {
|
|
|
1096
1150
|
stderr += chunk.toString('utf-8');
|
|
1097
1151
|
});
|
|
1098
1152
|
child.on('error', (error) => {
|
|
1153
|
+
if (cancelled) {
|
|
1154
|
+
finish(cancelledRunResult('planner'));
|
|
1155
|
+
return;
|
|
1156
|
+
}
|
|
1099
1157
|
finish({
|
|
1100
1158
|
status: 'failed',
|
|
1101
1159
|
result: {
|
|
@@ -1109,6 +1167,10 @@ export async function invokeStartExecutionRefine(ctx, deps = {}) {
|
|
|
1109
1167
|
void (async () => {
|
|
1110
1168
|
if (ctx.keyRun)
|
|
1111
1169
|
stdout = await settleKeyRun(ctx, ctx.keyRun, stdout);
|
|
1170
|
+
if (cancelled) {
|
|
1171
|
+
finish(cancelledRunResult('planner'));
|
|
1172
|
+
return;
|
|
1173
|
+
}
|
|
1112
1174
|
const combined = `${stdout}\n${stderr}`;
|
|
1113
1175
|
const review = detectNeedsHumanReview(combined);
|
|
1114
1176
|
if (review.needsReview) {
|
|
@@ -1338,6 +1400,9 @@ export function buildIncompleteRunResult(epicId, progress) {
|
|
|
1338
1400
|
}
|
|
1339
1401
|
/** Plain-language summary of where a run's code ended up. */
|
|
1340
1402
|
export function describeRunBranch(finish) {
|
|
1403
|
+
if (finish.cancelled) {
|
|
1404
|
+
return `Cancelled: nothing was pushed. The work is kept in ${finish.keptWorktree ?? 'its run folder'} on branch ${finish.branch}.`;
|
|
1405
|
+
}
|
|
1341
1406
|
if (finish.needsAttention) {
|
|
1342
1407
|
return `Needs attention: the run's work was kept in ${finish.keptWorktree ?? 'its run folder'} (branch ${finish.branch}) because it couldn't all be committed.`;
|
|
1343
1408
|
}
|
|
@@ -1396,6 +1461,9 @@ export function buildOrchestrateNeedsReviewResult(epicId, marker) {
|
|
|
1396
1461
|
* complete `{ epicId }`. Never hangs.
|
|
1397
1462
|
*/
|
|
1398
1463
|
export async function invokeStartExecutionOrchestrate(ctx, deps = {}) {
|
|
1464
|
+
// ENG-300: cancelled before it started — don't spawn at all.
|
|
1465
|
+
if (ctx.signal?.aborted)
|
|
1466
|
+
return cancelledRunResult('orchestrator');
|
|
1399
1467
|
const spawnImpl = deps.spawnImpl ?? spawn;
|
|
1400
1468
|
const isGitRepo = deps.isGitRepo ?? isGitRepoDir;
|
|
1401
1469
|
const worktreeCapable = deps.worktreeCapable ?? defaultWorktreeCapable;
|
|
@@ -1479,7 +1547,18 @@ export async function invokeStartExecutionOrchestrate(ctx, deps = {}) {
|
|
|
1479
1547
|
cwd: runDir,
|
|
1480
1548
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
1481
1549
|
env: childEnv,
|
|
1550
|
+
// ENG-300: lead its own process group so a cancel can stop everything it started.
|
|
1551
|
+
...groupSpawnOptions(deps.processGroup?.platform),
|
|
1482
1552
|
});
|
|
1553
|
+
// ENG-300: a cancel from the website terminates the whole group; the run is
|
|
1554
|
+
// reported once the child has actually exited (or after a grace backstop).
|
|
1555
|
+
let cancelled = false;
|
|
1556
|
+
const disposeAbort = killGroupOnAbort(ctx.signal, child, () => {
|
|
1557
|
+
cancelled = true;
|
|
1558
|
+
setTimeout(() => {
|
|
1559
|
+
finish(cancelledRunResult('orchestrator'));
|
|
1560
|
+
}, (deps.processGroup?.graceMs ?? CANCEL_GRACE_MS) + 5_000).unref();
|
|
1561
|
+
}, deps.processGroup);
|
|
1483
1562
|
// H4: independent keep-alive so the machine stays online during the long run
|
|
1484
1563
|
// and other jobs are not blocked — the poll loop's own heartbeat is blocked
|
|
1485
1564
|
// for the whole duration of this job.
|
|
@@ -1497,10 +1576,11 @@ export async function invokeStartExecutionOrchestrate(ctx, deps = {}) {
|
|
|
1497
1576
|
if (heartbeatTimer)
|
|
1498
1577
|
clearInterval(heartbeatTimer);
|
|
1499
1578
|
clearTimeout(timer);
|
|
1579
|
+
disposeAbort();
|
|
1500
1580
|
resolve(result);
|
|
1501
1581
|
};
|
|
1502
1582
|
const timer = setTimeout(() => {
|
|
1503
|
-
child.
|
|
1583
|
+
killProcessGroupNow(child, deps.processGroup);
|
|
1504
1584
|
finish({
|
|
1505
1585
|
status: 'failed',
|
|
1506
1586
|
result: {
|
|
@@ -1515,6 +1595,10 @@ export async function invokeStartExecutionOrchestrate(ctx, deps = {}) {
|
|
|
1515
1595
|
stderr += chunk.toString('utf-8');
|
|
1516
1596
|
});
|
|
1517
1597
|
child.on('error', (error) => {
|
|
1598
|
+
if (cancelled) {
|
|
1599
|
+
finish(cancelledRunResult('orchestrator'));
|
|
1600
|
+
return;
|
|
1601
|
+
}
|
|
1518
1602
|
finish({
|
|
1519
1603
|
status: 'failed',
|
|
1520
1604
|
result: {
|
|
@@ -1528,6 +1612,10 @@ export async function invokeStartExecutionOrchestrate(ctx, deps = {}) {
|
|
|
1528
1612
|
// Usage is reported in the background; the run's outcome doesn't wait on it.
|
|
1529
1613
|
if (ctx.keyRun)
|
|
1530
1614
|
stdout = takeKeyRunResult(ctx, ctx.keyRun, stdout).text;
|
|
1615
|
+
if (cancelled) {
|
|
1616
|
+
finish(cancelledRunResult('orchestrator'));
|
|
1617
|
+
return;
|
|
1618
|
+
}
|
|
1531
1619
|
const combined = `${stdout}\n${stderr}`;
|
|
1532
1620
|
// ENG-165-3: a HARD-gate needs-review outcome wins regardless of exit code
|
|
1533
1621
|
// — the orchestrator emits the marker and STOPs, and may exit 0. Surface
|
|
@@ -1555,7 +1643,12 @@ export async function invokeStartExecutionOrchestrate(ctx, deps = {}) {
|
|
|
1555
1643
|
finish({
|
|
1556
1644
|
status: 'done',
|
|
1557
1645
|
result: ctx.fix
|
|
1558
|
-
? {
|
|
1646
|
+
? {
|
|
1647
|
+
epicId: ctx.epicId,
|
|
1648
|
+
fix: true,
|
|
1649
|
+
branch: ctx.fix.branch,
|
|
1650
|
+
...(ctx.fix.pullRequestUrl && { prUrl: ctx.fix.pullRequestUrl }),
|
|
1651
|
+
}
|
|
1559
1652
|
: { epicId: ctx.epicId },
|
|
1560
1653
|
});
|
|
1561
1654
|
});
|
|
@@ -1597,6 +1690,8 @@ export async function invokeStartExecutionOrchestrate(ctx, deps = {}) {
|
|
|
1597
1690
|
jobId: ctx.jobId,
|
|
1598
1691
|
completed: outcome.status === 'done',
|
|
1599
1692
|
...(stopReason ? { stopReason } : {}),
|
|
1693
|
+
// ENG-300: a cancelled run keeps its branch and worktree locally — no push, no PR.
|
|
1694
|
+
...(ctx.signal ? { signal: ctx.signal } : {}),
|
|
1600
1695
|
});
|
|
1601
1696
|
branchLine = describeRunBranch(finished);
|
|
1602
1697
|
outcome.result = {
|
|
@@ -1609,9 +1704,14 @@ export async function invokeStartExecutionOrchestrate(ctx, deps = {}) {
|
|
|
1609
1704
|
...(finished.notes.length > 0 ? { branchNotes: finished.notes } : {}),
|
|
1610
1705
|
...(finished.keptWorktree ? { keptWorktree: finished.keptWorktree } : {}),
|
|
1611
1706
|
};
|
|
1707
|
+
// ENG-300: a cancel wins over any other outcome — the job is reported cancelled.
|
|
1708
|
+
if (finished.cancelled) {
|
|
1709
|
+
outcome.status = 'failed';
|
|
1710
|
+
outcome.result = { ...outcome.result, cancelled: true };
|
|
1711
|
+
}
|
|
1612
1712
|
// Work that isn't safely on a branch is never "done": the worktree was kept
|
|
1613
1713
|
// and the person needs to look at it.
|
|
1614
|
-
if (finished.needsAttention) {
|
|
1714
|
+
if (finished.needsAttention && !finished.cancelled) {
|
|
1615
1715
|
outcome.status = 'failed';
|
|
1616
1716
|
outcome.result = {
|
|
1617
1717
|
...outcome.result,
|
|
@@ -1689,6 +1789,8 @@ async function createPersonalEpicRequest(apiBaseUrl, userApiToken, draft) {
|
|
|
1689
1789
|
...(draft.alternatives ? { alternatives: draft.alternatives } : {}),
|
|
1690
1790
|
...(draft.dependencies ? { dependencies: draft.dependencies } : {}),
|
|
1691
1791
|
...(draft.estimatedEffort ? { estimatedEffort: draft.estimatedEffort } : {}),
|
|
1792
|
+
...(draft.databaseChoice ? { databaseChoice: draft.databaseChoice } : {}),
|
|
1793
|
+
...(draft.databaseNote ? { databaseNote: draft.databaseNote } : {}),
|
|
1692
1794
|
},
|
|
1693
1795
|
}),
|
|
1694
1796
|
});
|
|
@@ -1735,6 +1837,8 @@ async function updatePersonalEpicRequest(apiBaseUrl, userApiToken, epicRequestId
|
|
|
1735
1837
|
...(draft.alternatives ? { alternatives: draft.alternatives } : {}),
|
|
1736
1838
|
...(draft.dependencies ? { dependencies: draft.dependencies } : {}),
|
|
1737
1839
|
...(draft.estimatedEffort ? { estimatedEffort: draft.estimatedEffort } : {}),
|
|
1840
|
+
...(draft.databaseChoice ? { databaseChoice: draft.databaseChoice } : {}),
|
|
1841
|
+
...(draft.databaseNote ? { databaseNote: draft.databaseNote } : {}),
|
|
1738
1842
|
},
|
|
1739
1843
|
}),
|
|
1740
1844
|
});
|