@cat-factory/orchestration 0.129.7 → 0.129.10
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/container.d.ts +0 -1
- package/dist/container.d.ts.map +1 -1
- package/dist/container.js +83 -72
- package/dist/container.js.map +1 -1
- package/dist/modules/execution/CompanionController.d.ts +7 -0
- package/dist/modules/execution/CompanionController.d.ts.map +1 -1
- package/dist/modules/execution/CompanionController.js +61 -43
- package/dist/modules/execution/CompanionController.js.map +1 -1
- package/dist/modules/execution/PrReviewController.d.ts.map +1 -1
- package/dist/modules/execution/PrReviewController.js +6 -0
- package/dist/modules/execution/PrReviewController.js.map +1 -1
- package/dist/modules/execution/PrReviewResolutionController.d.ts +69 -0
- package/dist/modules/execution/PrReviewResolutionController.d.ts.map +1 -0
- package/dist/modules/execution/PrReviewResolutionController.js +199 -0
- package/dist/modules/execution/PrReviewResolutionController.js.map +1 -0
- package/dist/modules/execution/RunDispatcher.d.ts +53 -33
- package/dist/modules/execution/RunDispatcher.d.ts.map +1 -1
- package/dist/modules/execution/RunDispatcher.js +188 -258
- package/dist/modules/execution/RunDispatcher.js.map +1 -1
- package/dist/modules/execution/prReview.logic.d.ts +53 -10
- package/dist/modules/execution/prReview.logic.d.ts.map +1 -1
- package/dist/modules/execution/prReview.logic.js +131 -17
- package/dist/modules/execution/prReview.logic.js.map +1 -1
- package/dist/modules/sandbox/SandboxRunService.d.ts.map +1 -1
- package/dist/modules/sandbox/SandboxRunService.js +22 -10
- package/dist/modules/sandbox/SandboxRunService.js.map +1 -1
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrReviewController.js","sourceRoot":"","sources":["../../../src/modules/execution/PrReviewController.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAGtD,OAAO,EAAE,cAA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AAE;YACjB,WAAW,EAAE,QAAQ,CAAC,EAAE;YACxB,KAAK,EAAE,IAAI,KAAK,CAAC,KAAK,OAAO,YAAY,kBAAkB,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,YAAY;YACpG,IAAI,EACF,sFAAsF;gBACtF,0CAA0C;YAC5C,OAAO,EAAE,EAAE,YAAY,EAAE,QAAQ,CAAC,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE;SAC3E,CAAC,CAAA;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { AgentRunContext, AgentRunResult, ExecutionInstance, PipelineStep, ResolveRunRepoContext, RunInitiatorScope } from '@cat-factory/kernel';
|
|
2
|
+
import type { AdvanceResult } from './advance.js';
|
|
3
|
+
import type { RunStateMachine } from './RunStateMachine.js';
|
|
4
|
+
import type { StepHandlerContext } from './step-handler-registry.js';
|
|
5
|
+
/** The dispatcher hooks the PR-review resolution driver needs (mirrors {@link DeployerStepController}'s seam). */
|
|
6
|
+
export interface PrReviewResolutionControllerDeps {
|
|
7
|
+
runStateMachine: RunStateMachine;
|
|
8
|
+
resolveRunRepoContext?: ResolveRunRepoContext;
|
|
9
|
+
runInitiatorScope: RunInitiatorScope;
|
|
10
|
+
recordStepResult: (workspaceId: string, instance: ExecutionInstance, step: PipelineStep, isFinalStep: boolean, result: AgentRunResult) => Promise<AdvanceResult>;
|
|
11
|
+
handleAgentStep: (ctx: StepHandlerContext, dispatchKind?: string, augmentContext?: (context: AgentRunContext) => void) => Promise<AdvanceResult>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The DRIVER-side half of the PR deep-review resolution (the human-facing half is
|
|
15
|
+
* {@link PrReviewController}). After the human resolved a parked review with `fix` or `post`,
|
|
16
|
+
* `PrReviewController.resolve` re-armed the `pr-reviewer` step and woke the durable driver;
|
|
17
|
+
* {@link handle} runs on re-entry. Extracted from {@link RunDispatcher} as a cohesive collaborator
|
|
18
|
+
* (all PR-review-resolution driver logic in one place), constructed like the other step
|
|
19
|
+
* controllers with bound call-backs into the dispatcher's completion / agent-dispatch methods.
|
|
20
|
+
*/
|
|
21
|
+
export declare class PrReviewResolutionController {
|
|
22
|
+
private readonly deps;
|
|
23
|
+
constructor(deps: PrReviewResolutionControllerDeps);
|
|
24
|
+
/**
|
|
25
|
+
* - `fixing`: dispatch the Fixer against the reviewed PR's head branch with the selected
|
|
26
|
+
* findings folded in (parks on the job; its completion marks the review `done`).
|
|
27
|
+
* - `posting`: publish the selected findings as inline PR review comments, then finish the step.
|
|
28
|
+
*/
|
|
29
|
+
handle(ctx: StepHandlerContext): Promise<AdvanceResult>;
|
|
30
|
+
/**
|
|
31
|
+
* Dispatch the Fixer for a PR-review `fix` resolution. A `review` task carries no own work
|
|
32
|
+
* branch — it reviews an EXISTING PR — so resolve the PR's head branch (via the checkout-free
|
|
33
|
+
* `RepoFiles`) and point the Fixer's clone/push at it: fold a synthetic `pullRequest` + an
|
|
34
|
+
* apriori WORKING branch into the dispatch context so the shared `container-coding` +
|
|
35
|
+
* `clone:{branch:'pr'}` fixer body clones + pushes that branch (no new PR), and hand it the
|
|
36
|
+
* selected findings as a prior output (the same injection point the gate helpers use). Fails
|
|
37
|
+
* the run loudly when the PR branch can't be resolved (nothing to push to) rather than pushing
|
|
38
|
+
* blind. On a replay (jobId already set) it re-attaches without re-resolving.
|
|
39
|
+
*/
|
|
40
|
+
private dispatchFixer;
|
|
41
|
+
/**
|
|
42
|
+
* Post a PR-review `post` resolution: publish the human-selected findings on the reviewed PR
|
|
43
|
+
* via the checkout-free `RepoFiles.createReview`, which posts each inline comment INDIVIDUALLY
|
|
44
|
+
* (not one atomic review) so one un-anchorable line can't reject the rest. At-most-once: the
|
|
45
|
+
* `pendingPrReviewPost` marker is consumed (cleared + persisted) BEFORE the side-effecting post
|
|
46
|
+
* so a Workflows retry can't re-run it; findings that already posted on a prior attempt
|
|
47
|
+
* (`postedFindingIds`) are skipped; and the summary/body comment is suppressed once it has
|
|
48
|
+
* landed (`postedBody`), so a human RE-`post` (the retry path) never double-posts an inline
|
|
49
|
+
* comment OR the summary that already landed.
|
|
50
|
+
*
|
|
51
|
+
* Observability + resilience (the point of this handler):
|
|
52
|
+
* - The 422 ROOT CAUSE — a finding anchored to a line outside the PR diff — is pre-empted by
|
|
53
|
+
* {@link computeCommentableLines}: such a finding is folded into the summary comment instead
|
|
54
|
+
* of being sent as an inline comment that GitHub would reject.
|
|
55
|
+
* - The per-comment outcome is reduced to a {@link buildPrReviewPostReport} recorded on
|
|
56
|
+
* `step.prReview.postReport` (how many of how many posted, which failed + why, how many were
|
|
57
|
+
* folded), which the deep-review window renders.
|
|
58
|
+
* - On a FULLY successful post the step finishes `done`. On ANY partial/failed post the run is
|
|
59
|
+
* RE-PARKED at `awaiting_selection` carrying the report — never failed opaquely — so the human
|
|
60
|
+
* sees what happened and can retry ONLY the posting (re-`post`, which skips what already
|
|
61
|
+
* landed) or switch to `fix`/`finish`. This replaces the old "fail the whole run loudly and
|
|
62
|
+
* get stuck on a spinner" behaviour.
|
|
63
|
+
*
|
|
64
|
+
* When no VCS review write is wired (tests / no GitHub) the findings are recorded and the step
|
|
65
|
+
* finishes — the review pipeline never reaches this without GitHub in practice.
|
|
66
|
+
*/
|
|
67
|
+
private post;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=PrReviewResolutionController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrReviewResolutionController.d.ts","sourceRoot":"","sources":["../../../src/modules/execution/PrReviewResolutionController.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EAGd,iBAAiB,EACjB,YAAY,EACZ,qBAAqB,EACrB,iBAAiB,EAClB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAQjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAepE,kHAAkH;AAClH,MAAM,WAAW,gCAAgC;IAC/C,eAAe,EAAE,eAAe,CAAA;IAChC,qBAAqB,CAAC,EAAE,qBAAqB,CAAA;IAC7C,iBAAiB,EAAE,iBAAiB,CAAA;IACpC,gBAAgB,EAAE,CAChB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,iBAAiB,EAC3B,IAAI,EAAE,YAAY,EAClB,WAAW,EAAE,OAAO,EACpB,MAAM,EAAE,cAAc,KACnB,OAAO,CAAC,aAAa,CAAC,CAAA;IAC3B,eAAe,EAAE,CACf,GAAG,EAAE,kBAAkB,EACvB,YAAY,CAAC,EAAE,MAAM,EACrB,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,KAChD,OAAO,CAAC,aAAa,CAAC,CAAA;CAC5B;AAED;;;;;;;GAOG;AACH,qBAAa,4BAA4B;IAC3B,OAAO,CAAC,QAAQ,CAAC,IAAI;IAAjC,YAA6B,IAAI,EAAE,gCAAgC,EAAI;IAEvE;;;;OAIG;IACH,MAAM,CAAC,GAAG,EAAE,kBAAkB,GAAG,OAAO,CAAC,aAAa,CAAC,CAGtD;IAED;;;;;;;;;OASG;YACW,aAAa;IAkD3B;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;YACW,IAAI;CA0FnB"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { FIXER_AGENT_KIND, getErrorMessage } from '@cat-factory/kernel';
|
|
2
|
+
import { buildPrReviewPost, buildPrReviewPostReport, computeCommentableLines, isPrReviewPostComplete, renderPrReviewFixerFeedback, } from './prReview.logic.js';
|
|
3
|
+
/**
|
|
4
|
+
* Resolve a review `Block`'s PR number: an explicit `taskTypeFields.prNumber`, else parsed from
|
|
5
|
+
* the `prUrl` (`…/pull/42` on GitHub, `…/merge_requests/42` on GitLab). Undefined when neither
|
|
6
|
+
* yields one — the PR-review `fix`/`post` resolutions then report the PR unresolvable.
|
|
7
|
+
*/
|
|
8
|
+
function reviewPrNumber(block) {
|
|
9
|
+
const fields = block?.taskTypeFields;
|
|
10
|
+
if (typeof fields?.prNumber === 'number')
|
|
11
|
+
return fields.prNumber;
|
|
12
|
+
const url = fields?.prUrl?.trim();
|
|
13
|
+
const match = url?.match(/\/(?:pull|merge_requests)\/(\d+)/);
|
|
14
|
+
return match ? Number(match[1]) : undefined;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The DRIVER-side half of the PR deep-review resolution (the human-facing half is
|
|
18
|
+
* {@link PrReviewController}). After the human resolved a parked review with `fix` or `post`,
|
|
19
|
+
* `PrReviewController.resolve` re-armed the `pr-reviewer` step and woke the durable driver;
|
|
20
|
+
* {@link handle} runs on re-entry. Extracted from {@link RunDispatcher} as a cohesive collaborator
|
|
21
|
+
* (all PR-review-resolution driver logic in one place), constructed like the other step
|
|
22
|
+
* controllers with bound call-backs into the dispatcher's completion / agent-dispatch methods.
|
|
23
|
+
*/
|
|
24
|
+
export class PrReviewResolutionController {
|
|
25
|
+
deps;
|
|
26
|
+
constructor(deps) {
|
|
27
|
+
this.deps = deps;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* - `fixing`: dispatch the Fixer against the reviewed PR's head branch with the selected
|
|
31
|
+
* findings folded in (parks on the job; its completion marks the review `done`).
|
|
32
|
+
* - `posting`: publish the selected findings as inline PR review comments, then finish the step.
|
|
33
|
+
*/
|
|
34
|
+
handle(ctx) {
|
|
35
|
+
if (ctx.step.prReview?.status === 'posting')
|
|
36
|
+
return this.post(ctx);
|
|
37
|
+
return this.dispatchFixer(ctx);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Dispatch the Fixer for a PR-review `fix` resolution. A `review` task carries no own work
|
|
41
|
+
* branch — it reviews an EXISTING PR — so resolve the PR's head branch (via the checkout-free
|
|
42
|
+
* `RepoFiles`) and point the Fixer's clone/push at it: fold a synthetic `pullRequest` + an
|
|
43
|
+
* apriori WORKING branch into the dispatch context so the shared `container-coding` +
|
|
44
|
+
* `clone:{branch:'pr'}` fixer body clones + pushes that branch (no new PR), and hand it the
|
|
45
|
+
* selected findings as a prior output (the same injection point the gate helpers use). Fails
|
|
46
|
+
* the run loudly when the PR branch can't be resolved (nothing to push to) rather than pushing
|
|
47
|
+
* blind. On a replay (jobId already set) it re-attaches without re-resolving.
|
|
48
|
+
*/
|
|
49
|
+
async dispatchFixer(ctx) {
|
|
50
|
+
const { workspaceId, instance, step, block } = ctx;
|
|
51
|
+
const review = step.prReview;
|
|
52
|
+
const selected = (review.findings ?? []).filter((f) => review.selectedFindingIds?.includes(f.id));
|
|
53
|
+
let headRef = null;
|
|
54
|
+
let prNumber;
|
|
55
|
+
if (!step.jobId) {
|
|
56
|
+
prNumber = reviewPrNumber(block);
|
|
57
|
+
const runRepo = prNumber != null ? await this.deps.resolveRunRepoContext?.(workspaceId, block.id) : null;
|
|
58
|
+
const repo = runRepo?.repo;
|
|
59
|
+
headRef =
|
|
60
|
+
prNumber != null && repo?.pullRequestHeadRef
|
|
61
|
+
? await this.deps.runInitiatorScope(instance.initiatedBy, () => repo.pullRequestHeadRef(prNumber))
|
|
62
|
+
: null;
|
|
63
|
+
if (prNumber == null || !headRef) {
|
|
64
|
+
return {
|
|
65
|
+
kind: 'job_failed',
|
|
66
|
+
failureKind: 'preflight',
|
|
67
|
+
error: "Can't resolve the reviewed pull request's head branch to push fixes to. The " +
|
|
68
|
+
"'fix' resolution needs a same-repo pull request on this service's linked repository " +
|
|
69
|
+
'(a cross-repo or fork PR is not yet supported — post the findings as comments instead).',
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
const resolvedHeadRef = headRef;
|
|
74
|
+
const resolvedPrNumber = prNumber;
|
|
75
|
+
return this.deps.handleAgentStep(ctx, FIXER_AGENT_KIND, (context) => {
|
|
76
|
+
if (resolvedHeadRef && resolvedPrNumber != null) {
|
|
77
|
+
context.block.pullRequest = {
|
|
78
|
+
number: resolvedPrNumber,
|
|
79
|
+
branch: resolvedHeadRef,
|
|
80
|
+
url: review.prUrl ?? '',
|
|
81
|
+
};
|
|
82
|
+
// Build inside the PR head branch (probed, never created) so the work-branch machinery
|
|
83
|
+
// targets it rather than minting a stray `cat-factory/<blockId>` off base.
|
|
84
|
+
context.aprioriBranches = [{ name: resolvedHeadRef, mode: 'working' }];
|
|
85
|
+
}
|
|
86
|
+
context.priorOutputs = [
|
|
87
|
+
...context.priorOutputs,
|
|
88
|
+
{ agentKind: FIXER_AGENT_KIND, output: renderPrReviewFixerFeedback(selected) },
|
|
89
|
+
];
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Post a PR-review `post` resolution: publish the human-selected findings on the reviewed PR
|
|
94
|
+
* via the checkout-free `RepoFiles.createReview`, which posts each inline comment INDIVIDUALLY
|
|
95
|
+
* (not one atomic review) so one un-anchorable line can't reject the rest. At-most-once: the
|
|
96
|
+
* `pendingPrReviewPost` marker is consumed (cleared + persisted) BEFORE the side-effecting post
|
|
97
|
+
* so a Workflows retry can't re-run it; findings that already posted on a prior attempt
|
|
98
|
+
* (`postedFindingIds`) are skipped; and the summary/body comment is suppressed once it has
|
|
99
|
+
* landed (`postedBody`), so a human RE-`post` (the retry path) never double-posts an inline
|
|
100
|
+
* comment OR the summary that already landed.
|
|
101
|
+
*
|
|
102
|
+
* Observability + resilience (the point of this handler):
|
|
103
|
+
* - The 422 ROOT CAUSE — a finding anchored to a line outside the PR diff — is pre-empted by
|
|
104
|
+
* {@link computeCommentableLines}: such a finding is folded into the summary comment instead
|
|
105
|
+
* of being sent as an inline comment that GitHub would reject.
|
|
106
|
+
* - The per-comment outcome is reduced to a {@link buildPrReviewPostReport} recorded on
|
|
107
|
+
* `step.prReview.postReport` (how many of how many posted, which failed + why, how many were
|
|
108
|
+
* folded), which the deep-review window renders.
|
|
109
|
+
* - On a FULLY successful post the step finishes `done`. On ANY partial/failed post the run is
|
|
110
|
+
* RE-PARKED at `awaiting_selection` carrying the report — never failed opaquely — so the human
|
|
111
|
+
* sees what happened and can retry ONLY the posting (re-`post`, which skips what already
|
|
112
|
+
* landed) or switch to `fix`/`finish`. This replaces the old "fail the whole run loudly and
|
|
113
|
+
* get stuck on a spinner" behaviour.
|
|
114
|
+
*
|
|
115
|
+
* When no VCS review write is wired (tests / no GitHub) the findings are recorded and the step
|
|
116
|
+
* finishes — the review pipeline never reaches this without GitHub in practice.
|
|
117
|
+
*/
|
|
118
|
+
async post(ctx) {
|
|
119
|
+
const { workspaceId, instance, step, block, isFinalStep } = ctx;
|
|
120
|
+
const review = step.prReview;
|
|
121
|
+
const alreadyPosted = new Set(review.postedFindingIds ?? []);
|
|
122
|
+
// The findings to post THIS attempt: selected, minus any that already landed on a prior try.
|
|
123
|
+
const selected = (review.findings ?? []).filter((f) => review.selectedFindingIds?.includes(f.id) && !alreadyPosted.has(f.id));
|
|
124
|
+
// A replay after the marker was consumed (no marker) just completes idempotently — the post
|
|
125
|
+
// already ran on the winning attempt; do not re-post.
|
|
126
|
+
if (!step.pendingPrReviewPost) {
|
|
127
|
+
step.prReview = { ...review, status: 'done' };
|
|
128
|
+
return this.deps.recordStepResult(workspaceId, instance, step, isFinalStep, {
|
|
129
|
+
output: `Posted ${alreadyPosted.size} review comment${alreadyPosted.size === 1 ? '' : 's'} to the pull request.`,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
step.pendingPrReviewPost = null;
|
|
133
|
+
await this.deps.runStateMachine.casPersist(workspaceId, instance);
|
|
134
|
+
const prNumber = reviewPrNumber(block);
|
|
135
|
+
const runRepo = prNumber != null ? await this.deps.resolveRunRepoContext?.(workspaceId, block.id) : null;
|
|
136
|
+
const repo = runRepo?.repo;
|
|
137
|
+
if (prNumber == null || !repo?.createReview) {
|
|
138
|
+
// No VCS write wired: record the selection and finish (no real post; tests / no GitHub).
|
|
139
|
+
step.prReview = { ...review, status: 'done', postReport: null };
|
|
140
|
+
return this.deps.recordStepResult(workspaceId, instance, step, isFinalStep, {
|
|
141
|
+
output: `Recorded ${selected.length} selected finding${selected.length === 1 ? '' : 's'}.`,
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
// Pre-filter against the actual PR diff so out-of-diff lines are folded into the summary
|
|
145
|
+
// rather than sent as inline comments GitHub would 422. Best-effort: if the changed-file
|
|
146
|
+
// read fails or isn't wired, we skip the filter and let per-comment posting report failures.
|
|
147
|
+
let commentable;
|
|
148
|
+
try {
|
|
149
|
+
const files = await repo.listChangedFiles?.(prNumber);
|
|
150
|
+
if (files)
|
|
151
|
+
commentable = computeCommentableLines(files);
|
|
152
|
+
}
|
|
153
|
+
catch {
|
|
154
|
+
commentable = undefined;
|
|
155
|
+
}
|
|
156
|
+
const built = buildPrReviewPost(selected, review.summary, commentable);
|
|
157
|
+
// The summary/body comment is posted AT MOST ONCE. If it already landed on a prior attempt,
|
|
158
|
+
// suppress it here so retrying the un-anchored inline comments doesn't duplicate the summary
|
|
159
|
+
// conversation comment (the body's analogue of `postedFindingIds`). A body that FAILED before
|
|
160
|
+
// keeps `postedBody` false, so it is still retried.
|
|
161
|
+
const bodyAlreadyPosted = review.postedBody === true;
|
|
162
|
+
const input = bodyAlreadyPosted ? { ...built.input, body: '' } : built.input;
|
|
163
|
+
let result;
|
|
164
|
+
try {
|
|
165
|
+
result = await this.deps.runInitiatorScope(instance.initiatedBy, () => repo.createReview(prNumber, input));
|
|
166
|
+
}
|
|
167
|
+
catch (error) {
|
|
168
|
+
// createReview reports per-comment failures rather than throwing; an actual throw means it
|
|
169
|
+
// couldn't even begin. Treat every comment as failed so the outcome is still reported (and
|
|
170
|
+
// retryable) instead of failing the whole run.
|
|
171
|
+
const reason = getErrorMessage(error);
|
|
172
|
+
result = {
|
|
173
|
+
comments: input.comments.map(() => ({ posted: false, error: reason })),
|
|
174
|
+
bodyPosted: input.body ? false : null,
|
|
175
|
+
bodyError: input.body ? reason : undefined,
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
const { report, newlyPostedFindingIds } = buildPrReviewPostReport(built, selected, result);
|
|
179
|
+
const postedFindingIds = [...alreadyPosted, ...newlyPostedFindingIds];
|
|
180
|
+
// Sticky: once the summary lands it stays posted, so a further retry keeps suppressing it.
|
|
181
|
+
const postedBody = bodyAlreadyPosted || result.bodyPosted === true;
|
|
182
|
+
step.prReview = { ...review, postReport: report, postedFindingIds, postedBody };
|
|
183
|
+
if (isPrReviewPostComplete(report)) {
|
|
184
|
+
step.prReview = { ...step.prReview, status: 'done' };
|
|
185
|
+
const total = postedFindingIds.length;
|
|
186
|
+
const foldedNote = report.folded > 0
|
|
187
|
+
? ` (${report.folded} finding${report.folded === 1 ? '' : 's'} added to the summary — no in-diff line to anchor to)`
|
|
188
|
+
: '';
|
|
189
|
+
return this.deps.recordStepResult(workspaceId, instance, step, isFinalStep, {
|
|
190
|
+
output: `Posted ${total} review comment${total === 1 ? '' : 's'} to the pull request${foldedNote}.`,
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
// Partial or failed: re-park at `awaiting_selection` carrying the report so the window shows
|
|
194
|
+
// what posted / what failed and the human can retry only the posting (re-`post`).
|
|
195
|
+
step.prReview = { ...step.prReview, status: 'awaiting_selection', resolution: null };
|
|
196
|
+
return this.deps.runStateMachine.parkStepOnDecision(workspaceId, instance, step);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
//# sourceMappingURL=PrReviewResolutionController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrReviewResolutionController.js","sourceRoot":"","sources":["../../../src/modules/execution/PrReviewResolutionController.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAEvE,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,2BAA2B,GAC5B,MAAM,qBA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F"}
|
|
@@ -161,6 +161,8 @@ export declare class RunDispatcher {
|
|
|
161
161
|
*/
|
|
162
162
|
private readonly deployer;
|
|
163
163
|
private readonly repoOps;
|
|
164
|
+
/** Driver-side PR deep-review resolution (`fix` / `post`), extracted as a cohesive collaborator. */
|
|
165
|
+
private readonly prReviewResolution;
|
|
164
166
|
/**
|
|
165
167
|
* The Follow-up companion gate (the future-looking Coder's streamed items, the
|
|
166
168
|
* park-until-decided gate, and the human-action API), extracted to
|
|
@@ -265,6 +267,25 @@ export declare class RunDispatcher {
|
|
|
265
267
|
*/
|
|
266
268
|
pollAgentJob(workspaceId: string, executionId: string): Promise<AdvanceResult>;
|
|
267
269
|
private pollAgentJobInner;
|
|
270
|
+
/**
|
|
271
|
+
* Handle a `running` poll: a successful poll proves the container is up, so surface live subtask
|
|
272
|
+
* progress (e.g. 3/8 todos) without advancing the step. Only persist + emit when something
|
|
273
|
+
* actually changed so an idle poll doesn't churn storage or the event stream. Folds the poll's
|
|
274
|
+
* delta via {@link applyRunningFold} — a cheap pre-check against the loaded snapshot, then the
|
|
275
|
+
* authoritative re-apply on fresh state under CAS (idempotent for the set-to-latest folds and
|
|
276
|
+
* correct for the drain-on-read follow-up append). Split from {@link pollAgentJobInner} to stay
|
|
277
|
+
* under the statement ceiling.
|
|
278
|
+
*/
|
|
279
|
+
private handleRunningPoll;
|
|
280
|
+
/**
|
|
281
|
+
* A gate whose helper INVESTIGATES instead of fixing (post-release-health → on-call) declares a
|
|
282
|
+
* `resolveHelperCompletion` hook. When such a helper's job settles — done OR failed — call the
|
|
283
|
+
* hook INSTEAD of re-probing the precheck (re-probing an investigate-don't-fix helper would just
|
|
284
|
+
* regress again and burn the budget) and finish the gate step with the output it returns. Returns
|
|
285
|
+
* the resulting {@link AdvanceResult}, or `null` when this branch doesn't apply (the caller falls
|
|
286
|
+
* through to the re-probe / other completion paths).
|
|
287
|
+
*/
|
|
288
|
+
private resolveInvestigateHelperCompletion;
|
|
268
289
|
/**
|
|
269
290
|
* Fold a running poll's container signals into `step.container`: a successful poll
|
|
270
291
|
* proves the container is `up`, and the harness's live phase (clone / agent / push)
|
|
@@ -357,6 +378,34 @@ export declare class RunDispatcher {
|
|
|
357
378
|
* Shared by the inline path and the async-job poll path.
|
|
358
379
|
*/
|
|
359
380
|
private recordStepResult;
|
|
381
|
+
/**
|
|
382
|
+
* Park a step on the durable decision-wait: pause it for input, flip the run + block to
|
|
383
|
+
* `blocked`, persist under CAS, emit, and report `awaiting_decision` keyed by `decisionId`.
|
|
384
|
+
* Shared by the raised-decision and human-approval branches of {@link recordStepResult}.
|
|
385
|
+
*/
|
|
386
|
+
private parkStepAwaitingInput;
|
|
387
|
+
/**
|
|
388
|
+
* Record any PR(s) the step opened onto the block (its own-service PR + any peer-service PRs),
|
|
389
|
+
* and best-effort write back to the task's linked tracker issue(s) when the own-service PR is
|
|
390
|
+
* NEWLY opened (a retry that re-reports the same PR must not re-comment). Split from
|
|
391
|
+
* {@link recordStepResult} to keep it under the statement ceiling; a no-op when no PR was opened.
|
|
392
|
+
*/
|
|
393
|
+
private recordOpenedPullRequests;
|
|
394
|
+
/**
|
|
395
|
+
* Run any POST-COMPLETION resolver registered for this step kind (blueprint/spec ingestion,
|
|
396
|
+
* task-estimate persistence). It reshapes the agent's structured result into domain state and may
|
|
397
|
+
* replace `step.output`. A no-op when no post-completion resolver applies. See
|
|
398
|
+
* {@link buildStepResolverRegistry} and {@link StepCompletionResolver.phase}.
|
|
399
|
+
*/
|
|
400
|
+
private applyPostCompletionResolver;
|
|
401
|
+
/**
|
|
402
|
+
* Run any DETERMINISTIC terminal-phase resolver for this step kind (e.g. the merger performs the
|
|
403
|
+
* real GitHub merge with backend-held credentials), mutating `step.output` when it reshapes it.
|
|
404
|
+
* Position-independent: it fires whenever the step finishes, not only when it's last. Returns
|
|
405
|
+
* whether the resolver OWNS the block's terminal status (the merger sets `done`/`pr_ready`), so
|
|
406
|
+
* the advance/finalize path leaves that status alone rather than clobbering it to `in_progress`.
|
|
407
|
+
*/
|
|
408
|
+
private applyTerminalStepResolver;
|
|
360
409
|
/**
|
|
361
410
|
* File a tracking issue/ticket for a `tracker` step from the preceding `analysis`
|
|
362
411
|
* output. Non-LLM and best-effort: when no provider is wired or none is configured
|
|
@@ -479,41 +528,12 @@ export declare class RunDispatcher {
|
|
|
479
528
|
*/
|
|
480
529
|
private handleForkDecisionPhase;
|
|
481
530
|
/**
|
|
482
|
-
* Drive a re-armed PR-review step's RESOLUTION
|
|
483
|
-
* `
|
|
484
|
-
*
|
|
485
|
-
*
|
|
486
|
-
* - `posting`: publish the selected findings as inline PR review comments, then finish the step.
|
|
531
|
+
* Drive a re-armed PR-review step's RESOLUTION. The human resolved a parked review with `fix` or
|
|
532
|
+
* `post`; {@link PrReviewController.resolve} re-armed this step and woke the driver. Delegated to
|
|
533
|
+
* {@link PrReviewResolutionController} (the cohesive driver-side seam); see it for the `fix` /
|
|
534
|
+
* `post` mechanics.
|
|
487
535
|
*/
|
|
488
536
|
private handlePrReviewResolution;
|
|
489
|
-
/**
|
|
490
|
-
* Dispatch the Fixer for a PR-review `fix` resolution. A `review` task carries no own work
|
|
491
|
-
* branch — it reviews an EXISTING PR — so resolve the PR's head branch (via the checkout-free
|
|
492
|
-
* `RepoFiles`) and point the Fixer's clone/push at it: fold a synthetic `pullRequest` + an
|
|
493
|
-
* apriori WORKING branch into the dispatch context so the shared `container-coding` +
|
|
494
|
-
* `clone:{branch:'pr'}` fixer body clones + pushes that branch (no new PR), and hand it the
|
|
495
|
-
* selected findings as a prior output (the same injection point the gate helpers use). Fails
|
|
496
|
-
* the run loudly when the PR branch can't be resolved (nothing to push to) rather than pushing
|
|
497
|
-
* blind. On a replay (jobId already set) it re-attaches without re-resolving.
|
|
498
|
-
*/
|
|
499
|
-
private dispatchPrReviewFixer;
|
|
500
|
-
/**
|
|
501
|
-
* Post a PR-review `post` resolution: publish the human-selected findings as a single advisory
|
|
502
|
-
* (`COMMENT`) inline review on the reviewed PR via the checkout-free `RepoFiles.createReview`,
|
|
503
|
-
* then finish the step. At-most-once: the `pendingPrReviewPost` marker is consumed (cleared +
|
|
504
|
-
* persisted) BEFORE the (side-effecting) post so a Workflows retry can't submit it twice. When
|
|
505
|
-
* no VCS review write is wired (tests / no GitHub) the findings are still recorded and the step
|
|
506
|
-
* finishes — the review pipeline never reaches this without GitHub in practice.
|
|
507
|
-
*
|
|
508
|
-
* If `createReview` itself throws (GitHub rejects the batched review — e.g. a finding anchored
|
|
509
|
-
* to a line outside the PR diff 422s the WHOLE review — or a transient network/5xx error), the
|
|
510
|
-
* marker is already consumed, so a driver retry would NOT re-post. Rather than silently
|
|
511
|
-
* completing the step as `done` with nothing actually posted (the human would believe the
|
|
512
|
-
* comments landed), fail the step LOUDLY so the failure surfaces on the board — mirroring the
|
|
513
|
-
* `fix` resolution's loud preflight failure. `post` is a fallback resolution, so a hard failure
|
|
514
|
-
* is visible and the human can re-run or choose `fix`/`finish` instead.
|
|
515
|
-
*/
|
|
516
|
-
private postPrReview;
|
|
517
537
|
/** Read a run's active implementation-fork decision state, or null. */
|
|
518
538
|
getForkDecision(workspaceId: string, executionId: string): Promise<ForkDecisionStepState | null>;
|
|
519
539
|
/** Resolve the human's implementation-fork choice, re-running the Coder with it folded in. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RunDispatcher.d.ts","sourceRoot":"","sources":["../../../src/modules/execution/RunDispatcher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EAGb,eAAe,EACf,cAAc,EACd,KAAK,EACL,eAAe,EAEf,iBAAiB,EACjB,aAAa,EACb,KAAK,EAEL,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EAEpB,cAAc,EACd,YAAY,EACZ,oBAAoB,EACpB,gBAAgB,EAEhB,WAAW,EACX,sBAAsB,EACtB,YAAY,EACZ,oBAAoB,EACpB,uBAAuB,EACvB,UAAU,EACV,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EAEjB,qBAAqB,EACrB,UAAU,EACX,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"RunDispatcher.d.ts","sourceRoot":"","sources":["../../../src/modules/execution/RunDispatcher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EAGb,eAAe,EACf,cAAc,EACd,KAAK,EACL,eAAe,EAEf,iBAAiB,EACjB,aAAa,EACb,KAAK,EAEL,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EAEpB,cAAc,EACd,YAAY,EACZ,oBAAoB,EACpB,gBAAgB,EAEhB,WAAW,EACX,sBAAsB,EACtB,YAAY,EACZ,oBAAoB,EACpB,uBAAuB,EACvB,UAAU,EACV,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EAEjB,qBAAqB,EACrB,UAAU,EACX,MAAM,qBAAqB,CAAA;AAe5B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAE5D,OAAO,KAAK,EAEV,gBAAgB,EAChB,8BAA8B,EAC/B,MAAM,2BAA2B,CAAA;AAclC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAI9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,oBAAoB,EAAE,KAAK,UAAU,EAAE,MAAM,2BAA2B,CAAA;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAQ5D,OAAO,KA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