@cat-factory/orchestration 0.128.0 → 0.129.1

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.
@@ -0,0 +1,251 @@
1
+ import { resolveAprioriWorkingBranch } from '@cat-factory/contracts';
2
+ import { blueprintPostOp, runRepoOps, specPostOp } from '@cat-factory/agents';
3
+ import { BLUEPRINTS_AGENT_KIND, MERGER_AGENT_KIND, SPEC_WRITER_AGENT_KIND } from './ci.logic.js';
4
+ /**
5
+ * Whether a run delivers a committing kind's artifact through a PULL REQUEST rather than a
6
+ * direct commit — true when the pipeline carries a `merger` step to merge that PR. Threaded to
7
+ * the pre/post-op {@link RepoOpContext} so a delivering kind (e.g. `spike`) follows the chosen
8
+ * pipeline's shape (PR tail ⇒ open a PR; no tail ⇒ commit direct) with no separate per-task flag
9
+ * to drift. Mirrors {@link RunStateMachine.finalizeBlock}'s `hasMerger` distinction.
10
+ */
11
+ function runOpensPr(instance) {
12
+ return instance.steps.some((s) => s.agentKind === MERGER_AGENT_KIND);
13
+ }
14
+ /**
15
+ * Runs a registered / built-in agent kind's deterministic backend repo hooks (`preOps` /
16
+ * `postOps`) over a checkout-free {@link RepoFiles}, resolving the concrete branch each hook
17
+ * reads or writes so it operates on the SAME branch the container agent does. Extracted from
18
+ * {@link RunDispatcher} as a cohesive collaborator (the branch-resolution + hook-execution
19
+ * seam); the dispatcher delegates its pre/post-op call sites here.
20
+ */
21
+ export class RunRepoOpsController {
22
+ blockRepository;
23
+ contextBuilder;
24
+ agentKindRegistry;
25
+ resolveRunRepoContext;
26
+ issueWriteback;
27
+ constructor(deps) {
28
+ this.blockRepository = deps.blockRepository;
29
+ this.contextBuilder = deps.contextBuilder;
30
+ this.agentKindRegistry = deps.agentKindRegistry;
31
+ this.resolveRunRepoContext = deps.resolveRunRepoContext;
32
+ this.issueWriteback = deps.issueWriteback;
33
+ }
34
+ /**
35
+ * Resolve the concrete branch a registered kind's pre/post-op reads or writes, from
36
+ * its declared clone target — mirroring the container executor's mapping so a backend
37
+ * op and the container agent operate on the SAME branch:
38
+ * - `base` → the repo default branch (the ONLY way a committing op targets `main`).
39
+ * - `pr` → the block's PR branch (the coder's branch); when no PR is open, the
40
+ * per-block work branch (created from base if missing) — NOT base, so a
41
+ * committing post-op can't silently land on the default branch.
42
+ * - `work` (default) → the per-block work branch, ENSURED to exist exactly as
43
+ * {@link ContainerAgentExecutor}'s `ensureWorkBranch` does. The old code
44
+ * returned base here whenever no PR was open yet, diverging from the
45
+ * container agent (which clones `cat-factory/<blockId>`) and letting a
46
+ * post-op commit onto the default branch.
47
+ * The work-branch name (`cat-factory/<blockId>`) is the same convention
48
+ * {@link ContainerAgentExecutor} uses.
49
+ */
50
+ async resolveRepoOpBranch(step, block, runRepo) {
51
+ const { repo, baseBranch } = runRepo;
52
+ const prBranch = block.pullRequest?.branch;
53
+ // An apriori WORKING branch overrides the deterministic work branch: the backend op must
54
+ // read/write the SAME branch the container agent builds inside. It is probe-only (a
55
+ // missing branch fails loudly, never a silent create — the mirror of the executor).
56
+ const aprioriWork = this.aprioriWorkBranch(block, baseBranch);
57
+ const workBranch = aprioriWork ?? `cat-factory/${block.id}`;
58
+ switch (step?.clone?.branch) {
59
+ case 'base':
60
+ return baseBranch;
61
+ case 'pr':
62
+ // `pr-or-work` reads/writes the PR branch when one exists (amend in place), else the work
63
+ // branch — the same resolution as `pr`, so it shares this arm.
64
+ case 'pr-or-work':
65
+ return prBranch ?? (await this.ensureWorkBranch(repo, workBranch, baseBranch, aprioriWork));
66
+ default:
67
+ // 'work' (or unspecified): the work branch the container agent operates on. A PR
68
+ // is normally opened on that branch, but even before one exists we ensure it so
69
+ // the backend op and the container agent share the same branch.
70
+ return prBranch && prBranch !== workBranch
71
+ ? prBranch
72
+ : await this.ensureWorkBranch(repo, workBranch, baseBranch, aprioriWork);
73
+ }
74
+ }
75
+ /**
76
+ * The task's apriori WORKING branch (an existing branch it names as the run's starting
77
+ * point), or undefined when none is set. Rejects the degenerate case where it equals the
78
+ * repo base — the run would have nothing to diff / no PR to open — via the same shared
79
+ * `resolveAprioriWorkingBranch` guard the executor uses, so the two rejections can't drift.
80
+ */
81
+ aprioriWorkBranch(block, baseBranch) {
82
+ return resolveAprioriWorkingBranch(block.aprioriBranches, baseBranch);
83
+ }
84
+ /**
85
+ * Ensure the per-block work branch `cat-factory/<blockId>` exists — creating it from the
86
+ * repo default branch's head when absent — and return it. The checkout-free analogue of
87
+ * {@link ContainerAgentExecutor}'s `ensureWorkBranch`, so a backend pre/post-op writes
88
+ * the SAME branch the container agent does instead of the default branch. Falls back to
89
+ * the base branch only when the repo has no default-branch head to fork from (an empty
90
+ * repo), so the caller always gets a real branch.
91
+ *
92
+ * `apriori` (the resolved apriori working branch name, when this run has one) flips the
93
+ * behaviour to PROBE-ONLY: an apriori branch must pre-exist, so a missing one throws
94
+ * loudly rather than being silently created off base (the mirror of the executor's rule).
95
+ */
96
+ async ensureWorkBranch(repo, workBranch, baseBranch, apriori) {
97
+ if (await repo.headSha(workBranch))
98
+ return workBranch;
99
+ if (apriori) {
100
+ throw new Error(`Apriori working branch '${workBranch}' does not exist on the target repo; ` +
101
+ `push it before starting the run (the platform never creates an apriori branch).`);
102
+ }
103
+ const baseSha = await repo.headSha(baseBranch);
104
+ if (!baseSha)
105
+ return baseBranch;
106
+ await repo.createBranch(workBranch, baseSha);
107
+ return workBranch;
108
+ }
109
+ /**
110
+ * Run a registered kind's PRE-op hooks before its agent step dispatches: deterministic
111
+ * backend work (read a baseline artifact into the prompt, etc.) over a checkout-free
112
+ * {@link RepoFiles}. No-op for built-in / unregistered kinds, when the kind declares no
113
+ * pre-ops, or when GitHub isn't wired (no `resolveRunRepoContext`) — so the engine runs
114
+ * unchanged without the feature. A throwing op propagates to fail the step.
115
+ */
116
+ async runRegisteredPreOps(workspaceId, instance, block, step, context) {
117
+ const ops = this.agentKindRegistry.preOps(step.agentKind);
118
+ if (ops.length === 0)
119
+ return;
120
+ const runRepo = await this.resolveRunRepo(workspaceId, block.id);
121
+ if (!runRepo)
122
+ return;
123
+ const branch = await this.resolveRepoOpBranch(this.agentKindRegistry.agentStep(step.agentKind), block, runRepo);
124
+ await runRepoOps(ops, { repo: runRepo.repo, context, branch, opensPr: runOpensPr(instance) });
125
+ }
126
+ /**
127
+ * Resolve a block's run-repo context for its pre/post-op hooks. Returns null only when
128
+ * the resolver is UNWIRED (tests / GitHub not connected) so a deployment without the
129
+ * feature simply skips the hooks. When the resolver IS wired, its result — including a
130
+ * THROW from `resolveRepoTarget` for a block that isn't under a linked service — is
131
+ * propagated as-is: a registered kind with repo hooks run on a misconfigured block fails
132
+ * the run loudly rather than silently committing nothing (or guessing a repo), the same
133
+ * way a container custom kind fails at dispatch.
134
+ */
135
+ async resolveRunRepo(workspaceId, blockId) {
136
+ if (!this.resolveRunRepoContext)
137
+ return null;
138
+ return this.resolveRunRepoContext(workspaceId, blockId);
139
+ }
140
+ /**
141
+ * Run a registered kind's POST-op hooks after its agent step's result is recorded:
142
+ * deterministic backend work that consumes the agent's structured output (coerce its
143
+ * JSON, render artifact files, commit them via {@link RepoFiles}) — the
144
+ * blueprint/spec rendering that used to live in the harness. Same gating + symmetry as
145
+ * {@link runRegisteredPreOps}; the agent's {@link AgentRunResult} is threaded through.
146
+ */
147
+ async runRegisteredPostOps(workspaceId, instance, step, isFinalStep, result) {
148
+ const registered = this.agentKindRegistry.postOps(step.agentKind);
149
+ const builtIn = this.builtInPostOps(step.agentKind);
150
+ if (registered.length === 0 && builtIn.length === 0)
151
+ return;
152
+ const block = await this.blockRepository.get(workspaceId, instance.blockId);
153
+ if (!block)
154
+ return;
155
+ const runRepo = await this.resolveRunRepo(workspaceId, block.id);
156
+ if (!runRepo)
157
+ return;
158
+ const context = await this.contextBuilder.buildContext(workspaceId, instance, step, isFinalStep, block);
159
+ const opensPr = runOpensPr(instance);
160
+ // Registered (custom) kinds resolve their branch from their declared clone target.
161
+ if (registered.length > 0) {
162
+ const branch = await this.resolveRepoOpBranch(this.agentKindRegistry.agentStep(step.agentKind), block, runRepo);
163
+ const opResult = await runRepoOps(registered, {
164
+ repo: runRepo.repo,
165
+ context,
166
+ branch,
167
+ opensPr,
168
+ result,
169
+ });
170
+ // A delivering kind (e.g. `spike` in PR mode) opened a PR for the findings; record it on
171
+ // the block so the downstream conflicts/CI/human-review/merge tail acts on it — the SAME
172
+ // linkage a container-coding step's `result.pullRequest` produces (see recordStepResult).
173
+ if (opResult.pullRequest) {
174
+ await this.recordPostOpPullRequest(workspaceId, block.id, opResult.pullRequest);
175
+ }
176
+ }
177
+ // Built-in (migrated) kinds resolve their branch to MATCH their container dispatch
178
+ // exactly (see {@link builtInRepoOpBranch}), which differs from the generic clone
179
+ // resolution for the no-PR case — so the post-op commits where the agent read.
180
+ if (builtIn.length > 0) {
181
+ const branch = await this.builtInRepoOpBranch(step.agentKind, block, runRepo);
182
+ await runRepoOps(builtIn, { repo: runRepo.repo, context, branch, opensPr, result });
183
+ }
184
+ }
185
+ /**
186
+ * Record a pull request a registered post-op opened onto the block, mirroring the
187
+ * container-coding path in {@link recordStepResult}: set `block.pullRequest`, and (when newly
188
+ * opened) fire the best-effort tracker-issue writeback. Idempotent — re-recording the same PR
189
+ * (a durable-driver replay) writes the same ref and skips the non-idempotent writeback.
190
+ */
191
+ async recordPostOpPullRequest(workspaceId, blockId, pullRequest) {
192
+ const priorBlock = await this.blockRepository.get(workspaceId, blockId);
193
+ if (priorBlock?.pullRequest?.url === pullRequest.url)
194
+ return;
195
+ await this.blockRepository.update(workspaceId, blockId, { pullRequest });
196
+ if (this.issueWriteback && priorBlock) {
197
+ await this.issueWriteback
198
+ .onPullRequestOpened(workspaceId, priorBlock, pullRequest)
199
+ .catch(() => { });
200
+ }
201
+ }
202
+ /**
203
+ * The BUILT-IN (non-registry) post-ops for a migrated built-in kind, keyed by agent
204
+ * kind — the deterministic render + commit lifted out of the executor-harness. Kept
205
+ * OUT of the agent-kind registry on purpose: registering the built-ins would leak them
206
+ * into `customAgentKinds` / the SPA palette. Empty for every other kind.
207
+ */
208
+ builtInPostOps(agentKind) {
209
+ return RunRepoOpsController.BUILT_IN_POST_OPS[agentKind] ?? [];
210
+ }
211
+ /**
212
+ * The built-in (NON-registry) post-ops keyed by kind. A small map rather than an
213
+ * `if`-chain so each migrated built-in is one entry as the strangler converts more
214
+ * kinds; deliberately NOT the agent-kind registry (that would leak the built-ins into
215
+ * `customAgentKinds` / the SPA palette).
216
+ */
217
+ static BUILT_IN_POST_OPS = {
218
+ [BLUEPRINTS_AGENT_KIND]: [blueprintPostOp],
219
+ [SPEC_WRITER_AGENT_KIND]: [specPostOp],
220
+ };
221
+ /**
222
+ * The branch a built-in kind's post-op reads/commits, resolved to MATCH the kind's
223
+ * container dispatch (so the post-op commits onto exactly the branch the explore agent
224
+ * cloned).
225
+ * - blueprints clones the PR branch when one is open, else the repo's default branch —
226
+ * so the initial bootstrap map lands directly on the default branch, mirroring
227
+ * {@link ContainerAgentExecutor}'s `pr`-clone resolution (`prBranch ?? baseBranch`).
228
+ * Deliberately NOT {@link resolveRepoOpBranch}, whose `pr` case ensures a work branch
229
+ * for the no-PR case — correct for a committing CUSTOM kind, wrong for the blueprint.
230
+ * - spec-writer commits onto the per-block WORK branch (`cat-factory/<blockId>`), created
231
+ * from base when absent. It is a WRITER (not read-only), so its container dispatch
232
+ * always ensures + clones that work branch ({@link ContainerAgentExecutor}'s
233
+ * `workBranchReady ? workBranch : …` resolves to the work branch). We mirror that
234
+ * DETERMINISTICALLY here — NOT via {@link resolveRepoOpBranch}'s `work` case, whose
235
+ * PR-preferring branch would commit onto a divergent PR branch (read one tree, write
236
+ * another) if a PR were ever open on a branch other than `cat-factory/<blockId>`.
237
+ */
238
+ async builtInRepoOpBranch(agentKind, block, runRepo) {
239
+ if (agentKind === SPEC_WRITER_AGENT_KIND) {
240
+ // The spec-writer commits onto the run's WORK branch — the apriori working branch when
241
+ // the task names one (probe-only, must pre-exist), else the deterministic per-block
242
+ // branch. Miss this swap and the spec lands on a phantom `cat-factory/<blockId>` while
243
+ // the agent explored the apriori branch.
244
+ const aprioriWork = this.aprioriWorkBranch(block, runRepo.baseBranch);
245
+ const workBranch = aprioriWork ?? `cat-factory/${block.id}`;
246
+ return this.ensureWorkBranch(runRepo.repo, workBranch, runRepo.baseBranch, aprioriWork);
247
+ }
248
+ return block.pullRequest?.branch ?? runRepo.baseBranch;
249
+ }
250
+ }
251
+ //# sourceMappingURL=RunRepoOpsController.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RunRepoOpsController.js","sourceRoot":"","sources":["../../../src/modules/execution/RunRepoOpsController.ts"],"names":[],"mappings":"AAcA,OAAO,EAAuB,2BAA2B,EAAE,MAAM,wBAAwB,CAAA;AACzF,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAE7E,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAGhG;;;;;;GAMG;AACH,SAAS,UAAU,CAAC,QAA2B;IAC7C,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,iBAAiB,CAAC,CAAA;AACtE,CAAC;AAWD;;;;;;GAMG;AACH,MAAM,OAAO,oBAAoB;IACd,eAAe,CAAiB;IAChC,cAAc,CAAqB;IACnC,iBAAiB,CAAmB;IACpC,qBAAqB,CAAwB;IAC7C,cAAc,CAAyB;IAExD,YAAY,IAA8B;QACxC,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAA;QAC3C,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAA;QACzC,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAA;QAC/C,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,qBAAqB,CAAA;QACvD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CA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pB,CAAC;IACH,CAAC;IAED;;;;;OAKG;IACK,cAAc,CAAC,SAAiB;QACtC,OAAO,oBAAoB,CAAC,iBAAiB,CAAC,SAAS,CAAC,IAAI,EAAE,CAAA;IAChE,CAAC;IAED;;;;;OAKG;IACK,MAAM,CAAU,iBAAiB,GAA6B;QACpE,CAAC,qBAAqB,CAAC,EAAE,CAAC,eAAe,CAAC;QAC1C,CAAC,sBAAsB,CAAC,EAAE,CAAC,UAAU,CAAC;KACvC,CAAA;IAED;;;;;;;;;;;;;;;;OAgBG;IACK,KAAK,CAAC,mBAAmB,CAC/B,SAAiB,EACjB,KAAY,EACZ,OAAuB;QAEvB,IAAI,SAAS,KAAK,sBAAsB,EAAE,CAAC;YACzC,uFAAuF;YACvF,oFAAoF;YACpF,uFAAuF;YACvF,yCAAyC;YACzC,MAAM,WAAW,GAAG,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,CAAA;YACrE,MAAM,UAAU,GAAG,WAAW,IAAI,eAAe,KAAK,CAAC,EAAE,EAAE,CAAA;YAC3D,OAAO,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,WAAW,CAAC,CAAA;QACzF,CAAC;QACD,OAAO,KAAK,CAAC,WAAW,EAAE,MAAM,IAAI,OAAO,CAAC,UAAU,CAAA;IACxD,CAAC;CACF"}
@@ -1,4 +1,4 @@
1
- import type { CreateReviewInput, PrReviewAgentOutput, PrReviewFinding, PrReviewSeverity, PrReviewSlice } from '@cat-factory/kernel';
1
+ import type { CreateReviewInput, PrReviewAgentOutput, PrReviewFinding, PrReviewSeverity, PrReviewSlice, PrReviewStepState } from '@cat-factory/kernel';
2
2
  /** The blocker-first rank of a severity (unknown → medium's rank, matching the fallback). */
3
3
  export declare function severityRank(severity: PrReviewSeverity): number;
4
4
  /** The coerced, id-stamped review the engine records onto `step.prReview`. */
@@ -7,6 +7,16 @@ export interface CoercedPrReview {
7
7
  slices: PrReviewSlice[];
8
8
  findings: PrReviewFinding[];
9
9
  }
10
+ /**
11
+ * The in-flight review state seeded onto a `pr-reviewer` step the moment its container job is
12
+ * dispatched, so a review run surfaces a real `reviewing` phase in the deep-review window — the
13
+ * reviewed PR, the model, and (via the step's live todo subtasks) the slices-reviewed-so-far
14
+ * progress — instead of an empty panel until the findings land. It is superseded by
15
+ * {@link coercePrReview}'s result when the reviewer returns (`awaiting_selection`/`done`); the
16
+ * `recordFindings` interceptor treats this `reviewing` status as "not yet recorded" and coerces
17
+ * over it, while any later status short-circuits as already-settled.
18
+ */
19
+ export declare function initialPrReviewState(prUrl: string | null, model: string | null): PrReviewStepState;
10
20
  /**
11
21
  * Coerce the reviewer's lenient output into the persisted review shape: mint stable ids for
12
22
  * every slice + finding, anchor each finding to the slice that lists its path (first match
@@ -1 +1 @@
1
- {"version":3,"file":"prReview.logic.d.ts","sourceRoot":"","sources":["../../../src/modules/execution/prReview.logic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,aAAa,EACd,MAAM,qBAAqB,CAAA;AAiB5B,6FAA6F;AAC7F,wBAAgB,YAAY,CAAC,QAAQ,EAAE,gBAAgB,GAAG,MAAM,CAE/D;AAED,8EAA8E;AAC9E,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,MAAM,EAAE,aAAa,EAAE,CAAA;IACvB,QAAQ,EAAE,eAAe,EAAE,CAAA;CAC5B;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,mBAAmB,GAAG,SAAS,EACvC,WAAW,EAAE,MAAM,MAAM,EACzB,aAAa,EAAE,MAAM,MAAM,GAC1B,eAAe,CAoDjB;AAmBD;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,eAAe,EAAE,GAAG,MAAM,CAgB/E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,eAAe,EAAE,EAC3B,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACjC,iBAAiB,CAmCnB"}
1
+ {"version":3,"file":"prReview.logic.d.ts","sourceRoot":"","sources":["../../../src/modules/execution/prReview.logic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EAClB,MAAM,qBAAqB,CAAA;AAiB5B,6FAA6F;AAC7F,wBAAgB,YAAY,CAAC,QAAQ,EAAE,gBAAgB,GAAG,MAAM,CAE/D;AAED,8EAA8E;AAC9E,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,MAAM,EAAE,aAAa,EAAE,CAAA;IACvB,QAAQ,EAAE,eAAe,EAAE,CAAA;CAC5B;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,KAAK,EAAE,MAAM,GAAG,IAAI,GACnB,iBAAiB,CAWnB;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,mBAAmB,GAAG,SAAS,EACvC,WAAW,EAAE,MAAM,MAAM,EACzB,aAAa,EAAE,MAAM,MAAM,GAC1B,eAAe,CAoDjB;AAmBD;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,eAAe,EAAE,GAAG,MAAM,CAgB/E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,eAAe,EAAE,EAC3B,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACjC,iBAAiB,CAmCnB"}
@@ -15,6 +15,27 @@ const SEVERITY_RANK = {
15
15
  export function severityRank(severity) {
16
16
  return SEVERITY_RANK[severity] ?? SEVERITY_RANK.medium;
17
17
  }
18
+ /**
19
+ * The in-flight review state seeded onto a `pr-reviewer` step the moment its container job is
20
+ * dispatched, so a review run surfaces a real `reviewing` phase in the deep-review window — the
21
+ * reviewed PR, the model, and (via the step's live todo subtasks) the slices-reviewed-so-far
22
+ * progress — instead of an empty panel until the findings land. It is superseded by
23
+ * {@link coercePrReview}'s result when the reviewer returns (`awaiting_selection`/`done`); the
24
+ * `recordFindings` interceptor treats this `reviewing` status as "not yet recorded" and coerces
25
+ * over it, while any later status short-circuits as already-settled.
26
+ */
27
+ export function initialPrReviewState(prUrl, model) {
28
+ return {
29
+ status: 'reviewing',
30
+ summary: null,
31
+ slices: [],
32
+ findings: [],
33
+ selectedFindingIds: [],
34
+ resolution: null,
35
+ prUrl,
36
+ model,
37
+ };
38
+ }
18
39
  /**
19
40
  * Coerce the reviewer's lenient output into the persisted review shape: mint stable ids for
20
41
  * every slice + finding, anchor each finding to the slice that lists its path (first match
@@ -1 +1 @@
1
- {"version":3,"file":"prReview.logic.js","sourceRoot":"","sources":["../../../src/modules/execution/prReview.logic.ts"],"names":[],"mappings":"AASA,8EAA8E;AAC9E,sFAAsF;AACtF,yFAAyF;AACzF,yEAAyE;AACzE,8EAA8E;AAE9E,6EAA6E;AAC7E,MAAM,aAAa,GAAqC;IACtD,OAAO,EAAE,CAAC;IACV,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,CAAC;IACT,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,CAAC;CACP,CAAA;AAED,6FAA6F;AAC7F,MAAM,UAAU,YAAY,CAAC,QAA0B;IACrD,OAAO,aAAa,CAAC,QAAQ,CAAC,IAAI,aAAa,CAAC,MAAM,CAAA;AACxD,CAAC;AASD;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAC5B,MAAuC,EACvC,WAAyB,EACzB,aAA2B;IAE3B,MAAM,MAAM,GAAoB,CAAC,MAAM,EAAE,MAAM,IAAI,EAAE,CAAC;SACnD,GAAG,CAAC,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,CAAA;IACH,CAAC;IACD,4FAA4F;IAC5F,qFAAqF;IACrF,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3B,SAAS,CAAC,IAAI,CACZ,gBAAgB,QAAQ,CAAC,MAAM,kBAAkB,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,CACrF,CAAA;IACH,CAAC;IACD,OAAO;QACL,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;QAC5B,QAAQ;KACT,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"prReview.logic.js","sourceRoot":"","sources":["../../../src/modules/execution/prReview.logic.ts"],"names":[],"mappings":"AAUA,8EAA8E;AAC9E,sFAAsF;AACtF,yFAAyF;AACzF,yEAAyE;AACzE,8EAA8E;AAE9E,6EAA6E;AAC7E,MAAM,aAAa,GAAqC;IACtD,OAAO,EAAE,CAAC;IACV,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,CAAC;IACT,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,CAAC;CACP,CAAA;AAED,6FAA6F;AAC7F,MAAM,UAAU,YAAY,CAAC,QAA0B;IACrD,OAAO,aAAa,CAAC,QAAQ,CAAC,IAAI,aAAa,CAAC,MAAM,CAAA;AACxD,CAAC;AASD;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAClC,KAAoB,EACpB,KAAoB;IAEpB,OAAO;QACL,MAAM,EAAE,WAAW;QACnB,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,EAAE;QACZ,kBAAkB,EAAE,EAAE;QACtB,UAAU,EAAE,IAAI;QAChB,KAAK;QACL,KAAK;KACN,CAAA;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAC5B,MAAuC,EACvC,WAAyB,EACzB,aAA2B;IAE3B,MAAM,MAAM,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B,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAChE,CAAA;IACH,CAAC;IACD,4FAA4F;IAC5F,qFAAqF;IACrF,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3B,SAAS,CAAC,IAAI,CACZ,gBAAgB,QAAQ,CAAC,MAAM,kBAAkB,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,CACrF,CAAA;IACH,CAAC;IACD,OAAO;QACL,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;QAC5B,QAAQ;KACT,CAAA;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cat-factory/orchestration",
3
- "version": "0.128.0",
3
+ "version": "0.129.1",
4
4
  "description": "Delivery-workflow engine for the Agent Architecture Board (execution, bootstrap, pipelines, board, boardScan, requirements, and composition root).",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,20 +25,20 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "ai": "^6.0.230",
28
- "@cat-factory/agents": "0.65.3",
29
- "@cat-factory/caching": "0.10.16",
30
- "@cat-factory/contracts": "0.152.0",
31
- "@cat-factory/integrations": "0.88.4",
32
- "@cat-factory/kernel": "0.145.1",
33
- "@cat-factory/prompt-fragments": "0.13.43",
34
- "@cat-factory/sandbox": "0.9.112",
35
- "@cat-factory/spend": "0.12.60",
36
- "@cat-factory/workspaces": "0.17.3"
28
+ "@cat-factory/agents": "0.65.5",
29
+ "@cat-factory/caching": "0.10.17",
30
+ "@cat-factory/contracts": "0.152.1",
31
+ "@cat-factory/integrations": "0.88.5",
32
+ "@cat-factory/kernel": "0.146.0",
33
+ "@cat-factory/prompt-fragments": "0.13.44",
34
+ "@cat-factory/sandbox": "0.9.114",
35
+ "@cat-factory/spend": "0.12.61",
36
+ "@cat-factory/workspaces": "0.17.4"
37
37
  },
38
38
  "devDependencies": {
39
39
  "typescript": "7.0.2",
40
40
  "vitest": "^4.1.10",
41
- "@cat-factory/sandbox-fixtures": "0.7.178"
41
+ "@cat-factory/sandbox-fixtures": "0.7.179"
42
42
  },
43
43
  "scripts": {
44
44
  "build": "tsc -b tsconfig.build.json",