@patronage/factory-ci 1.0.0-alpha.4 → 1.0.0-alpha.40
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/README.md +712 -10
- package/dist/.build-fingerprint.json +3 -0
- package/dist/alchemy/index.d.ts +1174 -0
- package/dist/alchemy/index.js +2142 -0
- package/dist/bundle-alchemy-entry-CT5hCphA.js +112 -0
- package/dist/execute-alchemy-entry-B397GSk5.d.ts +134 -0
- package/dist/execute-alchemy-entry-CZ7Knz4q.js +160 -0
- package/dist/index.d.ts +1205 -87
- package/dist/index.js +2752 -317
- package/package.json +28 -10
- package/src/actions.ts +13 -0
- package/src/alchemy/child-diagnostics.ts +148 -0
- package/src/alchemy/credential-preflight.ts +428 -0
- package/src/alchemy/destroy-postcondition.ts +103 -0
- package/src/alchemy/evaluate-stack.ts +153 -0
- package/src/alchemy/first-deploy-authorization.ts +194 -0
- package/src/alchemy/index.ts +144 -0
- package/src/alchemy/lifecycle-failure.ts +174 -0
- package/src/alchemy/lifecycle.ts +1330 -0
- package/src/alchemy/local-emulation.ts +89 -0
- package/src/alchemy/plan-effects.ts +510 -0
- package/src/alchemy/retained-identity.ts +248 -0
- package/src/alchemy/secret-name-policy.ts +96 -0
- package/src/alchemy/stage-policy.ts +269 -0
- package/src/alchemy/state-tree.ts +168 -0
- package/src/alchemy/url-implies-auth.ts +264 -0
- package/src/alchemy-baseline.ts +75 -0
- package/src/bundle-alchemy-entry.ts +5 -0
- package/src/candidate-impact-workflow.ts +110 -0
- package/src/candidate-lifecycle.ts +29 -0
- package/src/cursor-oidc.ts +33 -0
- package/src/execute-alchemy-entry.ts +128 -8
- package/src/factory-workflow.ts +83 -40
- package/src/github-app-token.ts +92 -18
- package/src/github-transport.ts +186 -0
- package/src/impact-demand-condition.ts +67 -0
- package/src/index.ts +174 -0
- package/src/lifecycle-contract-lane.ts +113 -0
- package/src/merge-freeze-job.ts +253 -0
- package/src/pinned-action.ts +30 -0
- package/src/pr-status-hud-workflow.ts +96 -0
- package/src/preview-cleanup-topology.ts +115 -0
- package/src/preview-proof-inventory.ts +1092 -0
- package/src/preview-proof-lifecycle.ts +328 -0
- package/src/preview-receipt-workflow.ts +83 -0
- package/src/production-impact-workflow.ts +181 -0
- package/src/proof-reuse-gate.ts +223 -48
- package/src/proof-reuse-presentation.ts +131 -0
- package/src/push-identity-workflow.ts +463 -0
- package/src/runnable-cli.ts +27 -0
- package/src/verify-runner-policy.ts +290 -0
- package/src/vitest-profile-reader.test.ts +208 -0
- package/src/vitest-profile-reader.ts +225 -0
- package/src/vitest-profile.ts +631 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,49 @@
|
|
|
1
|
+
import { a as BundleAlchemyEntryOptions, i as executeAlchemyEntry, n as ExecuteAlchemyEntryOptions, o as bundleAlchemyEntry, r as ExecuteAlchemyEntryResult, t as EXECUTE_ALCHEMY_ENTRY_MAX_BUFFER } from "./execute-alchemy-entry-B397GSk5.js";
|
|
2
|
+
import { StdioOptions } from "node:child_process";
|
|
3
|
+
|
|
4
|
+
//#region src/alchemy-baseline.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* The Alchemy fleet baseline (#985, #993). Every factory project that
|
|
7
|
+
* imports `@patronage/factory-ci/alchemy` pins `alchemy` and `effect` to
|
|
8
|
+
* these exact versions. The pair moves together, in the same lockstep
|
|
9
|
+
* release that bumps this constant.
|
|
10
|
+
*
|
|
11
|
+
* This module is a plain constant: it imports neither `alchemy` nor
|
|
12
|
+
* `effect`, so it ships from the root entry, not the `./alchemy` subpath.
|
|
13
|
+
*/
|
|
14
|
+
declare const ALCHEMY_BASELINE: {
|
|
15
|
+
readonly alchemy: "2.0.0-beta.77";
|
|
16
|
+
readonly effect: "4.0.0-rc.112";
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* The slice of a consumer's `package.json` that carries the pins this
|
|
20
|
+
* baseline checks. Only `dependencies` and `devDependencies` are read —
|
|
21
|
+
* `peerDependencies` is deliberately a range, not a pin (ADR 0031), so it is
|
|
22
|
+
* never compared against the exact baseline.
|
|
23
|
+
*/
|
|
24
|
+
interface AlchemyBaselinePackageJson {
|
|
25
|
+
readonly dependencies?: Record<string, string>;
|
|
26
|
+
readonly devDependencies?: Record<string, string>;
|
|
27
|
+
}
|
|
28
|
+
interface AssertAlchemyBaselineInput {
|
|
29
|
+
readonly packageJson: AlchemyBaselinePackageJson;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Fails when the consumer's `alchemy` or `effect` pin differs from
|
|
33
|
+
* {@link ALCHEMY_BASELINE}, or when only one of the pair is present.
|
|
34
|
+
* Alchemy peers on Effect, so an unpinned auto-installed Effect can drift
|
|
35
|
+
* outside the baseline while a lone `alchemy` pin would otherwise pass.
|
|
36
|
+
* Both packages remaining absent is not drift — they are optional peers of
|
|
37
|
+
* the `./alchemy` subpath, so a consumer that never touches it carries
|
|
38
|
+
* neither.
|
|
39
|
+
*
|
|
40
|
+
* Reads only the `packageJson` object it is handed; it never walks the
|
|
41
|
+
* filesystem.
|
|
42
|
+
*/
|
|
43
|
+
declare const assertAlchemyBaseline: ({
|
|
44
|
+
packageJson
|
|
45
|
+
}: AssertAlchemyBaselineInput) => void;
|
|
46
|
+
//#endregion
|
|
1
47
|
//#region src/actions.d.ts
|
|
2
48
|
/**
|
|
3
49
|
* The GitHub Actions this family's workflow generators use, pinned to full
|
|
@@ -51,56 +97,33 @@ declare const NODE_PNPM_ACTION_FAMILY_NODE24: {
|
|
|
51
97
|
readonly uses: "pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271";
|
|
52
98
|
};
|
|
53
99
|
};
|
|
100
|
+
/**
|
|
101
|
+
* The one `actions/upload-artifact` pin every workflow generator shares
|
|
102
|
+
* (#887). Two callers pinned two different commits of the same tag family;
|
|
103
|
+
* naming the pin here makes that drift impossible the same way the Node/pnpm
|
|
104
|
+
* family does. A caller passes this through `factoryWorkflow`'s
|
|
105
|
+
* `additionalActions.uploadArtifact` explicitly — the catalog names the pin,
|
|
106
|
+
* it does not inject the upload step.
|
|
107
|
+
*/
|
|
108
|
+
declare const UPLOAD_ARTIFACT: {
|
|
109
|
+
readonly tag: "v4.6.2";
|
|
110
|
+
readonly uses: "actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02";
|
|
111
|
+
};
|
|
54
112
|
//#endregion
|
|
55
|
-
//#region src/
|
|
56
|
-
interface BundleAlchemyEntryOptions {
|
|
57
|
-
/** The Alchemy entry to bundle, e.g. `alchemy.run.ts`. */
|
|
58
|
-
readonly entry: string;
|
|
59
|
-
/** Where to write the bundled ESM file, e.g. `.alchemy/deploy-entry.mjs`. */
|
|
60
|
-
readonly outfile: string;
|
|
61
|
-
/** esbuild's working directory; also the base for relative paths. */
|
|
62
|
-
readonly absWorkingDir?: string;
|
|
63
|
-
/**
|
|
64
|
-
* Import specifiers to rewrite before resolution, passed straight to
|
|
65
|
-
* esbuild's `alias`. Substitution happens before the `packages` and
|
|
66
|
-
* `external` decisions, so an aliased bare specifier is inlined even under
|
|
67
|
-
* `packages: "external"`. Values are resolved the way esbuild resolves any
|
|
68
|
-
* import, so give absolute paths or package names — which aliases a repo
|
|
69
|
-
* needs is the consumer's policy and this package bakes in none. A key on
|
|
70
|
-
* `alchemy`, `effect`, or a subpath of either is rejected outright, and the
|
|
71
|
-
* finished bundle is checked for files from those packages however they were
|
|
72
|
-
* reached.
|
|
73
|
-
*/
|
|
74
|
-
readonly alias?: Readonly<Record<string, string>>;
|
|
75
|
-
/**
|
|
76
|
-
* `"external"` (default) leaves every bare import outside the entry's own
|
|
77
|
-
* source graph to Node's resolver at run time — the entry's TypeScript is
|
|
78
|
-
* still inlined, which is the whole point. `"bundle"` inlines dependencies
|
|
79
|
-
* too, minus the Alchemy/Effect externals, for a runner without the
|
|
80
|
-
* consumer's node_modules.
|
|
81
|
-
*/
|
|
82
|
-
readonly packages?: "bundle" | "external";
|
|
83
|
-
/** Emit a sourcemap next to the outfile. Default `false`. */
|
|
84
|
-
readonly sourcemap?: boolean;
|
|
85
|
-
/** esbuild target. Default `node24`. */
|
|
86
|
-
readonly target?: string;
|
|
87
|
-
/** tsconfig to apply to the entry's sources. */
|
|
88
|
-
readonly tsconfig?: string;
|
|
89
|
-
}
|
|
113
|
+
//#region src/candidate-lifecycle.d.ts
|
|
90
114
|
/**
|
|
91
|
-
*
|
|
92
|
-
* `effect` external (#268).
|
|
115
|
+
* Pull-request events that can create or refresh a Factory candidate run.
|
|
93
116
|
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
* matters. Firedup additionally resolved esbuild *through vite* because it had
|
|
98
|
-
* no direct dependency on it; here esbuild is a plain dependency of this
|
|
99
|
-
* package and that hack can be deleted.
|
|
100
|
-
*
|
|
101
|
-
* Returns the absolute path of the file written.
|
|
117
|
+
* GitHub's draft boolean remains the lifecycle authority: these triggers make
|
|
118
|
+
* a run visible, while `factoryCandidateOrPushCondition` keeps substantive
|
|
119
|
+
* jobs idle until the pull request is a candidate.
|
|
102
120
|
*/
|
|
103
|
-
declare const
|
|
121
|
+
declare const FACTORY_CANDIDATE_PULL_REQUEST_TYPES: readonly ["opened", "synchronize", "reopened", "ready_for_review"];
|
|
122
|
+
/**
|
|
123
|
+
* Build a GitHub Actions job condition for candidate PRs and merge-target
|
|
124
|
+
* pushes. The caller owns triggers, jobs, runners, permissions, and topology.
|
|
125
|
+
*/
|
|
126
|
+
declare const factoryCandidateOrPushCondition: (candidateCondition?: string) => string;
|
|
104
127
|
//#endregion
|
|
105
128
|
//#region src/disposable-stage.d.ts
|
|
106
129
|
declare const localPreviewStageBrand: unique symbol;
|
|
@@ -144,14 +167,260 @@ interface LocalPreviewStageOptions {
|
|
|
144
167
|
*/
|
|
145
168
|
declare const localPreviewStage: (options: LocalPreviewStageOptions) => LocalPreviewStage;
|
|
146
169
|
//#endregion
|
|
170
|
+
//#region src/preview-proof-lifecycle.d.ts
|
|
171
|
+
/**
|
|
172
|
+
* Preview-proof lifecycle: admit a disposable preview, register envelope-bound
|
|
173
|
+
* proof at head, and record cleanup. One `transition` path owns those state
|
|
174
|
+
* changes. Recovery (#766) re-enters cleanup through the same event. Hosted
|
|
175
|
+
* inventory listing and cleanup-outcome persistence live in
|
|
176
|
+
* `previewProofInventory`, which sits on the registration read model `resolve`
|
|
177
|
+
* already returns.
|
|
178
|
+
*
|
|
179
|
+
* Proof sits entirely on one side of GitHub's draft/ready boundary
|
|
180
|
+
* (paitronage#1089): a draft candidate cannot begin or register. Machine
|
|
181
|
+
* evidence is the envelope at head (#355), never a PR comment. The SHA and
|
|
182
|
+
* repository bind that proof (#1312): a detached HEAD or a branch name that
|
|
183
|
+
* differs from the PR head is the same commit, and the registration records
|
|
184
|
+
* `branch: "(detached)"`.
|
|
185
|
+
*/
|
|
186
|
+
type PreviewProofCleanupStatus = "failed" | "passed" | "pending";
|
|
187
|
+
interface PreviewProofCandidate {
|
|
188
|
+
readonly branch: string;
|
|
189
|
+
readonly dirty: boolean;
|
|
190
|
+
readonly headSha: string;
|
|
191
|
+
readonly isDraft: boolean;
|
|
192
|
+
readonly pr: number;
|
|
193
|
+
readonly prHeadRef: string;
|
|
194
|
+
readonly prHeadSha: string;
|
|
195
|
+
readonly prRepository: string;
|
|
196
|
+
readonly prState: "CLOSED" | "MERGED" | "OPEN";
|
|
197
|
+
readonly repository: string;
|
|
198
|
+
}
|
|
199
|
+
interface PreviewProofEnvelopeEvidence {
|
|
200
|
+
readonly check: string;
|
|
201
|
+
readonly headSha: string;
|
|
202
|
+
readonly mergeBaseSha: string;
|
|
203
|
+
readonly outcome: "fail" | "pass";
|
|
204
|
+
readonly patchId: string;
|
|
205
|
+
}
|
|
206
|
+
interface PreviewProofCleanupOutcome {
|
|
207
|
+
readonly evidence: readonly string[];
|
|
208
|
+
readonly outcome: Exclude<PreviewProofCleanupStatus, "pending">;
|
|
209
|
+
readonly runUrl?: string;
|
|
210
|
+
}
|
|
211
|
+
interface PreviewProofRegistration {
|
|
212
|
+
/**
|
|
213
|
+
* Present only when the checkout is detached or its branch name is not the
|
|
214
|
+
* PR head. The `(detached)` sentinel is on the lifecycle registration
|
|
215
|
+
* `transition` returns, and `previewProofInventory` does not persist it.
|
|
216
|
+
* It is not a branch to check out.
|
|
217
|
+
*/
|
|
218
|
+
readonly branch?: "(detached)";
|
|
219
|
+
readonly cleanup: {
|
|
220
|
+
readonly evidence: readonly string[];
|
|
221
|
+
readonly outcome: PreviewProofCleanupStatus;
|
|
222
|
+
readonly runUrl?: string;
|
|
223
|
+
};
|
|
224
|
+
readonly convergence: {
|
|
225
|
+
readonly detail: string;
|
|
226
|
+
readonly status: "passed";
|
|
227
|
+
};
|
|
228
|
+
readonly headSha: string;
|
|
229
|
+
readonly pr: number;
|
|
230
|
+
readonly proof: {
|
|
231
|
+
readonly check: string;
|
|
232
|
+
readonly headSha: string;
|
|
233
|
+
readonly mergeBaseSha: string;
|
|
234
|
+
readonly patchId: string;
|
|
235
|
+
};
|
|
236
|
+
readonly smoke: {
|
|
237
|
+
readonly detail: string;
|
|
238
|
+
readonly outcome: "passed";
|
|
239
|
+
};
|
|
240
|
+
readonly source: "local-self-certified";
|
|
241
|
+
readonly stack: string;
|
|
242
|
+
readonly stage: LocalPreviewStage;
|
|
243
|
+
readonly url: string;
|
|
244
|
+
}
|
|
245
|
+
interface PreviewProofLifecycleState {
|
|
246
|
+
readonly registrations: readonly PreviewProofRegistration[];
|
|
247
|
+
}
|
|
248
|
+
type PreviewProofLifecycleEvent = {
|
|
249
|
+
readonly candidate: PreviewProofCandidate;
|
|
250
|
+
readonly stage: string;
|
|
251
|
+
readonly type: "begin";
|
|
252
|
+
} | {
|
|
253
|
+
readonly candidate: PreviewProofCandidate;
|
|
254
|
+
readonly convergence: {
|
|
255
|
+
readonly detail: string;
|
|
256
|
+
readonly status: "failed" | "passed";
|
|
257
|
+
};
|
|
258
|
+
readonly evidence: PreviewProofEnvelopeEvidence;
|
|
259
|
+
readonly smoke: {
|
|
260
|
+
readonly detail: string;
|
|
261
|
+
readonly outcome: "failed" | "passed";
|
|
262
|
+
};
|
|
263
|
+
readonly stack: string;
|
|
264
|
+
readonly stage: string;
|
|
265
|
+
readonly type: "register";
|
|
266
|
+
readonly url: string;
|
|
267
|
+
} | {
|
|
268
|
+
readonly evidence: readonly string[];
|
|
269
|
+
readonly outcome: Exclude<PreviewProofCleanupStatus, "pending">;
|
|
270
|
+
readonly pr: number;
|
|
271
|
+
readonly runUrl?: string;
|
|
272
|
+
readonly stack: string;
|
|
273
|
+
readonly stage: string;
|
|
274
|
+
readonly type: "cleanup";
|
|
275
|
+
};
|
|
276
|
+
interface PreviewProofResolveQuery {
|
|
277
|
+
readonly pr?: number;
|
|
278
|
+
readonly stack?: string;
|
|
279
|
+
readonly stage?: string;
|
|
280
|
+
}
|
|
281
|
+
declare const previewProofLifecycle: {
|
|
282
|
+
readonly empty: () => PreviewProofLifecycleState;
|
|
283
|
+
readonly recover: (state: PreviewProofLifecycleState, event: Extract<PreviewProofLifecycleEvent, {
|
|
284
|
+
type: "cleanup";
|
|
285
|
+
}>) => PreviewProofLifecycleState;
|
|
286
|
+
readonly resolve: (state: PreviewProofLifecycleState, query?: PreviewProofResolveQuery) => readonly PreviewProofRegistration[];
|
|
287
|
+
readonly transition: (state: PreviewProofLifecycleState, event: PreviewProofLifecycleEvent) => PreviewProofLifecycleState;
|
|
288
|
+
};
|
|
289
|
+
//#endregion
|
|
290
|
+
//#region src/preview-proof-inventory.d.ts
|
|
291
|
+
/**
|
|
292
|
+
* Hosted preview-proof inventory (#639): persist and list Factory-App
|
|
293
|
+
* registrations, and record cleanup outcomes, without PR comments.
|
|
294
|
+
*
|
|
295
|
+
* `list` is a read over App-owned commit check-runs and works with a workflow
|
|
296
|
+
* `GITHUB_TOKEN`. `persist` and `recordCleanup` write those check-runs, which
|
|
297
|
+
* GitHub only allows the producing App to update. Pass an installation token
|
|
298
|
+
* the caller minted; this package does not read operator config or hold
|
|
299
|
+
* secrets. Cleanup writes go through `previewProofLifecycle.transition` with
|
|
300
|
+
* `{ type: "cleanup" }`. Outcomes are never inferred from whether a stage
|
|
301
|
+
* still exists.
|
|
302
|
+
*
|
|
303
|
+
* Transient transport failures are retried with bounded backoff and then
|
|
304
|
+
* surface as `PreviewProofTransportError` (#830). A failure from `persist` or
|
|
305
|
+
* `recordCleanup` is an evidence-registration failure, never a failed
|
|
306
|
+
* deployment: the caller retains the healthy disposable stage, records its own
|
|
307
|
+
* proof BLOCKED (never PASS), and re-runs registration at the same head —
|
|
308
|
+
* writes are keyed by stack and stage, so resuming needs no redeploy.
|
|
309
|
+
* Admission stays fail-closed on its own: an unregistered proof never
|
|
310
|
+
* satisfies the preview demand.
|
|
311
|
+
*/
|
|
312
|
+
/** Check-run name that carries one registration JSON payload. Not a gate. */
|
|
313
|
+
declare const PREVIEW_PROOF_INVENTORY_CHECK_NAME = "patronage-factory/preview-proof";
|
|
314
|
+
/**
|
|
315
|
+
* Least privilege for a job whose `GITHUB_TOKEN` calls `list`. A
|
|
316
|
+
* `permissions` block zeroes every unlisted scope, and `list` reads five
|
|
317
|
+
* endpoints: `pulls/{pr}`, `pulls/{pr}/commits`, and the GraphQL force-push
|
|
318
|
+
* timeline (`pull-requests`), `compare` (`contents`), and
|
|
319
|
+
* `commits/{sha}/check-runs` (`checks`). A job
|
|
320
|
+
* that omits `pull-requests: read` fails with 403 on a same-repository PR
|
|
321
|
+
* and skips every destroy matrix (#859). Give the discovery job this object.
|
|
322
|
+
*/
|
|
323
|
+
declare const PREVIEW_PROOF_INVENTORY_LIST_PERMISSIONS: Readonly<{
|
|
324
|
+
readonly checks: "read";
|
|
325
|
+
readonly contents: "read";
|
|
326
|
+
readonly "pull-requests": "read";
|
|
327
|
+
}>;
|
|
328
|
+
interface PreviewProofInventoryStore {
|
|
329
|
+
list: (input: {
|
|
330
|
+
owner: string;
|
|
331
|
+
pr: number;
|
|
332
|
+
repo: string;
|
|
333
|
+
}) => Promise<readonly PreviewProofRegistration[]>;
|
|
334
|
+
put: (input: {
|
|
335
|
+
owner: string;
|
|
336
|
+
registration: PreviewProofRegistration;
|
|
337
|
+
repo: string;
|
|
338
|
+
}) => Promise<void>;
|
|
339
|
+
}
|
|
340
|
+
interface PreviewProofInventoryTransport {
|
|
341
|
+
/** Injectable `fetch` (tests, or a caller with its own instrumented one). */
|
|
342
|
+
fetch?: typeof fetch;
|
|
343
|
+
/** Per-request timeout; defaults to five seconds. */
|
|
344
|
+
timeoutMs?: number;
|
|
345
|
+
/**
|
|
346
|
+
* Bearer token. `list` accepts a workflow `GITHUB_TOKEN` (read) and needs
|
|
347
|
+
* commit (contents) read for the force-push timeline; the contents-less
|
|
348
|
+
* Factory App token cannot serve it (#825). `persist` and `recordCleanup`
|
|
349
|
+
* must use a Factory App installation token: GitHub refuses GITHUB_TOKEN
|
|
350
|
+
* writes to App-owned check-runs.
|
|
351
|
+
*/
|
|
352
|
+
token: string;
|
|
353
|
+
}
|
|
354
|
+
interface PreviewProofInventoryAccess {
|
|
355
|
+
fetch?: typeof fetch;
|
|
356
|
+
store?: PreviewProofInventoryStore;
|
|
357
|
+
timeoutMs?: number;
|
|
358
|
+
token?: string;
|
|
359
|
+
}
|
|
360
|
+
interface PreviewProofInventoryListInput {
|
|
361
|
+
owner: string;
|
|
362
|
+
pr: number;
|
|
363
|
+
repo: string;
|
|
364
|
+
stack?: string;
|
|
365
|
+
stage?: string;
|
|
366
|
+
}
|
|
367
|
+
interface PreviewProofInventoryPersistInput {
|
|
368
|
+
owner: string;
|
|
369
|
+
registration: PreviewProofRegistration;
|
|
370
|
+
repo: string;
|
|
371
|
+
}
|
|
372
|
+
interface PreviewProofInventoryCleanupInput {
|
|
373
|
+
evidence: readonly string[];
|
|
374
|
+
headSha?: string;
|
|
375
|
+
outcome: Exclude<PreviewProofCleanupStatus, "pending">;
|
|
376
|
+
owner: string;
|
|
377
|
+
pr: number;
|
|
378
|
+
repo: string;
|
|
379
|
+
runUrl?: string;
|
|
380
|
+
stack: string;
|
|
381
|
+
stage: string;
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* The transport gave out — a network-level rejection (EPIPE, DNS, an aborted
|
|
385
|
+
* or timed-out request) or a transient HTTP status — and bounded retries did
|
|
386
|
+
* not recover it. GitHub never judged the content, so this is never a
|
|
387
|
+
* validation verdict and never a deployment failure. Only a bounded reason
|
|
388
|
+
* string is retained: the raw transport error can hold the request and its
|
|
389
|
+
* `Authorization` header, so it is deliberately discarded.
|
|
390
|
+
*/
|
|
391
|
+
declare class PreviewProofTransportError extends Error {
|
|
392
|
+
/** How many transport attempts were made before giving up. */
|
|
393
|
+
readonly attempts: number;
|
|
394
|
+
/** The last transient HTTP status, when the server answered at all. */
|
|
395
|
+
readonly status?: number;
|
|
396
|
+
constructor(reason: string, attempts: number, status?: number);
|
|
397
|
+
}
|
|
398
|
+
declare const previewProofInventory: {
|
|
399
|
+
readonly githubStore: (transport: PreviewProofInventoryTransport) => PreviewProofInventoryStore;
|
|
400
|
+
readonly list: (input: PreviewProofInventoryListInput, access: PreviewProofInventoryAccess) => Promise<readonly PreviewProofRegistration[]>;
|
|
401
|
+
readonly listPermissions: Readonly<{
|
|
402
|
+
readonly checks: "read";
|
|
403
|
+
readonly contents: "read";
|
|
404
|
+
readonly "pull-requests": "read";
|
|
405
|
+
}>;
|
|
406
|
+
readonly memoryStore: () => PreviewProofInventoryStore;
|
|
407
|
+
readonly persist: (input: PreviewProofInventoryPersistInput, access: PreviewProofInventoryAccess) => Promise<void>;
|
|
408
|
+
readonly recordCleanup: (input: PreviewProofInventoryCleanupInput, access: PreviewProofInventoryAccess) => Promise<PreviewProofRegistration>;
|
|
409
|
+
};
|
|
410
|
+
//#endregion
|
|
147
411
|
//#region src/factory-workflow.d.ts
|
|
148
412
|
interface WorkflowStep {
|
|
413
|
+
readonly continueOnError?: boolean;
|
|
414
|
+
readonly env?: Readonly<Record<string, string>>;
|
|
415
|
+
readonly id?: string;
|
|
416
|
+
readonly if?: string;
|
|
149
417
|
readonly name: string;
|
|
150
418
|
readonly uses?: string;
|
|
151
419
|
readonly with?: Readonly<Record<string, string>>;
|
|
152
420
|
readonly run?: string;
|
|
153
421
|
}
|
|
154
422
|
interface CheckoutStepOptions {
|
|
423
|
+
readonly fetchDepth?: number;
|
|
155
424
|
readonly name?: string;
|
|
156
425
|
readonly ref?: string;
|
|
157
426
|
}
|
|
@@ -168,6 +437,14 @@ interface FactoryWorkflowSetupOptions {
|
|
|
168
437
|
readonly install?: InstallStepOptions;
|
|
169
438
|
readonly setupNode?: SetupNodeStepOptions;
|
|
170
439
|
}
|
|
440
|
+
/**
|
|
441
|
+
* Stable identifiers for the setup steps a generated workflow always emits,
|
|
442
|
+
* in emission order. A consumer selects steps by role instead of locating
|
|
443
|
+
* them by display name or by array position/length, so renaming a step or
|
|
444
|
+
* adding a new supported role never breaks role-based composition (#1076).
|
|
445
|
+
*/
|
|
446
|
+
declare const SETUP_STEP_ROLES: readonly ["checkout", "setupPnpm", "setupNode", "install"];
|
|
447
|
+
type SetupStepRole = (typeof SETUP_STEP_ROLES)[number];
|
|
171
448
|
interface FactoryWorkflowOptions<Additional extends Readonly<Record<string, PinnedAction>>> {
|
|
172
449
|
/**
|
|
173
450
|
* Required complete family. There is no default, so adopting this package
|
|
@@ -188,6 +465,13 @@ interface FactoryWorkflowArtifact<Additional extends Readonly<Record<string, Pin
|
|
|
188
465
|
readonly actions: Readonly<FamilyActions & Additional>;
|
|
189
466
|
/** Checkout → pnpm → Node → install, customized by named role. */
|
|
190
467
|
readonly setupSteps: readonly WorkflowStep[];
|
|
468
|
+
/**
|
|
469
|
+
* The same steps as `setupSteps`, keyed by stable role instead of position.
|
|
470
|
+
* A consumer that needs a subset or a differently-ordered composition (for
|
|
471
|
+
* example, a custom checkout followed by the shared install steps) selects
|
|
472
|
+
* by role here and never destructures `setupSteps` by array shape.
|
|
473
|
+
*/
|
|
474
|
+
readonly setupStepsByRole: Readonly<Record<SetupStepRole, WorkflowStep>>;
|
|
191
475
|
/**
|
|
192
476
|
* Structurally accepted by gagen's `writeOrLint`; this package deliberately
|
|
193
477
|
* has no gagen dependency.
|
|
@@ -197,6 +481,18 @@ interface FactoryWorkflowArtifact<Additional extends Readonly<Record<string, Pin
|
|
|
197
481
|
readonly pinDeps: false;
|
|
198
482
|
};
|
|
199
483
|
}
|
|
484
|
+
/**
|
|
485
|
+
* Select setup steps by stable role, in the order the roles are given.
|
|
486
|
+
*
|
|
487
|
+
* This is the supported alternative to destructuring `setupSteps` by array
|
|
488
|
+
* position or asserting its length: a caller names exactly the roles it
|
|
489
|
+
* needs (for example, every role but `checkout`, to follow its own
|
|
490
|
+
* head-pinned checkout with the shared pnpm/Node/install sequence), and that
|
|
491
|
+
* selection survives a renamed step or an added role.
|
|
492
|
+
*/
|
|
493
|
+
declare const setupStepsForRoles: (artifact: {
|
|
494
|
+
readonly setupStepsByRole: Readonly<Record<SetupStepRole, WorkflowStep>>;
|
|
495
|
+
}, roles: readonly SetupStepRole[]) => readonly WorkflowStep[];
|
|
200
496
|
/**
|
|
201
497
|
* Own one generated workflow source's action pins, setup block, provenance
|
|
202
498
|
* banner, and gagen pinning policy as a single artifact.
|
|
@@ -206,6 +502,49 @@ interface FactoryWorkflowArtifact<Additional extends Readonly<Record<string, Pin
|
|
|
206
502
|
*/
|
|
207
503
|
declare const factoryWorkflow: <const Additional extends Readonly<Record<string, PinnedAction>> = Record<never, never>>(options: FactoryWorkflowOptions<Additional>) => FactoryWorkflowArtifact<Additional>;
|
|
208
504
|
//#endregion
|
|
505
|
+
//#region src/cursor-oidc.d.ts
|
|
506
|
+
/**
|
|
507
|
+
* Pinned Cursor OIDC trust predicates for the Factory App broker (#949).
|
|
508
|
+
*
|
|
509
|
+
* The broker verifies a Cursor-managed Cloud Agent JWT and mints a
|
|
510
|
+
* repo-scoped Factory App installation token. Audience, issuer, and JWKS are
|
|
511
|
+
* not consumer settings: a knob that pointed them elsewhere would be the
|
|
512
|
+
* whole mechanism undone, the same reason {@link FACTORY_PROOF_GATE_APP_ID}
|
|
513
|
+
* is pinned.
|
|
514
|
+
*/
|
|
515
|
+
/** Cursor's OIDC issuer. Tokens minted on the agent VM carry this `iss`. */
|
|
516
|
+
declare const FACTORY_CURSOR_OIDC_ISSUER = "https://api.cursor.com";
|
|
517
|
+
/** JWKS the broker uses to verify RS256 signatures. */
|
|
518
|
+
declare const FACTORY_CURSOR_OIDC_JWKS_URL = "https://api.cursor.com/keys";
|
|
519
|
+
/**
|
|
520
|
+
* Audience a Cursor-managed VM must mint with. The CLI and the broker share
|
|
521
|
+
* this string; Cursor does not allowlist audiences.
|
|
522
|
+
*/
|
|
523
|
+
declare const FACTORY_CURSOR_OIDC_AUDIENCE = "Factory";
|
|
524
|
+
/**
|
|
525
|
+
* Runtime claim a Cursor-managed Cloud Agent VM always presents. Self-hosted
|
|
526
|
+
* workers are not this broker's callers.
|
|
527
|
+
*/
|
|
528
|
+
declare const FACTORY_CURSOR_OIDC_MANAGED_RUNTIME = "managed";
|
|
529
|
+
/** HQ route that exchanges a verified Cursor OIDC JWT for an App token. */
|
|
530
|
+
declare const FACTORY_APP_BROKER_PATH = "/api/factory-app/installation-token";
|
|
531
|
+
/** Production broker origin. The CLI pins this; it is not profile-declared. */
|
|
532
|
+
declare const FACTORY_APP_BROKER_ORIGIN = "https://hq.patronage.com";
|
|
533
|
+
//#endregion
|
|
534
|
+
//#region src/github-transport.d.ts
|
|
535
|
+
/**
|
|
536
|
+
* Bounded transport retries could not reach the GitHub App endpoint (#923).
|
|
537
|
+
* The reason is credential-free, so it is safe to log. Re-exported from
|
|
538
|
+
* `github-app-token.ts`, which owns the mint surface.
|
|
539
|
+
*/
|
|
540
|
+
declare class GitHubAppTokenTransportError extends Error {
|
|
541
|
+
/** How many transport attempts were made before giving up. */
|
|
542
|
+
readonly attempts: number;
|
|
543
|
+
/** The last transient HTTP status, when the server answered at all. */
|
|
544
|
+
readonly status?: number;
|
|
545
|
+
constructor(reason: string, attempts: number, status?: number);
|
|
546
|
+
}
|
|
547
|
+
//#endregion
|
|
209
548
|
//#region src/github-app-token.d.ts
|
|
210
549
|
/**
|
|
211
550
|
* What a consumer must know to mint: the app id, where the private key is, and
|
|
@@ -226,6 +565,18 @@ declare class GitHubApiError extends Error {
|
|
|
226
565
|
readonly status: number;
|
|
227
566
|
constructor(status: number, statusText: string);
|
|
228
567
|
}
|
|
568
|
+
/**
|
|
569
|
+
* Installation-token permission subset. GitHub only grants permissions the
|
|
570
|
+
* App already has; a caller that wants least privilege names the subset here
|
|
571
|
+
* rather than taking the App's full installation grant (#949).
|
|
572
|
+
*/
|
|
573
|
+
interface GithubAppInstallationPermissions {
|
|
574
|
+
checks?: "read" | "write";
|
|
575
|
+
}
|
|
576
|
+
/** The Factory App broker's token: repo-scoped Checks write, nothing else. */
|
|
577
|
+
declare const FACTORY_APP_BROKER_TOKEN_PERMISSIONS: {
|
|
578
|
+
readonly checks: "write";
|
|
579
|
+
};
|
|
229
580
|
interface GithubAppTokenOptions {
|
|
230
581
|
/** Injectable `fetch` (tests, or a caller with its own instrumented one). */
|
|
231
582
|
fetch?: typeof fetch;
|
|
@@ -235,6 +586,15 @@ interface GithubAppTokenOptions {
|
|
|
235
586
|
readPrivateKey?: (privateKeyPath: string) => Buffer | string;
|
|
236
587
|
/** Per-request timeout; defaults to five seconds. */
|
|
237
588
|
timeoutMs?: number;
|
|
589
|
+
/**
|
|
590
|
+
* Total transport attempts per request, the first one included. Defaults to
|
|
591
|
+
* three: a mint that must survive a stale keep-alive socket (#923). A caller
|
|
592
|
+
* whose mint is best-effort and already has a fallback passes 1, because
|
|
593
|
+
* retrying against a deliberately short timeout only delays that fallback
|
|
594
|
+
* (#938). The backoff between attempts is fixed and does not scale with
|
|
595
|
+
* `timeoutMs`; the two dials are unrelated.
|
|
596
|
+
*/
|
|
597
|
+
transportAttempts?: number;
|
|
238
598
|
}
|
|
239
599
|
/**
|
|
240
600
|
* The signed app JWT GitHub accepts as `Authorization: Bearer` for the App
|
|
@@ -256,39 +616,20 @@ declare const githubAppJwt: (credentials: GithubAppCredentials, options?: Pick<G
|
|
|
256
616
|
declare const mintInstallationToken: (input: {
|
|
257
617
|
credentials: GithubAppCredentials;
|
|
258
618
|
owner: string;
|
|
259
|
-
repo: string;
|
|
260
|
-
}, options?: GithubAppTokenOptions) => Promise<string>;
|
|
261
|
-
//#endregion
|
|
262
|
-
//#region src/execute-alchemy-entry.d.ts
|
|
263
|
-
interface ExecuteAlchemyEntryOptions {
|
|
264
619
|
/**
|
|
265
|
-
*
|
|
266
|
-
*
|
|
620
|
+
* Installation permission subset. Omitted, GitHub grants the App's full
|
|
621
|
+
* installation permissions. The Factory App broker passes
|
|
622
|
+
* {@link FACTORY_APP_BROKER_TOKEN_PERMISSIONS}.
|
|
623
|
+
*/
|
|
624
|
+
permissions?: GithubAppInstallationPermissions;
|
|
625
|
+
/**
|
|
626
|
+
* Repository names (not `owner/repo`) to bind the token to. Omitted, the
|
|
627
|
+
* token covers every repository the installation can reach. The broker
|
|
628
|
+
* always names the one repository the Cursor OIDC claim authenticated.
|
|
267
629
|
*/
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
readonly cwd?: string;
|
|
272
|
-
/** Child environment. Defaults to process.env. */
|
|
273
|
-
readonly env?: NodeJS.ProcessEnv;
|
|
274
|
-
/** Consumer module context; normally the caller's import.meta.url. */
|
|
275
|
-
readonly from: string | URL;
|
|
276
|
-
/** Child stdio. Default "inherit". */
|
|
277
|
-
readonly stdio?: "inherit" | "pipe";
|
|
278
|
-
}
|
|
279
|
-
interface ExecuteAlchemyEntryResult {
|
|
280
|
-
readonly bundledEntry: string;
|
|
281
|
-
readonly stderr: string | null;
|
|
282
|
-
readonly stdout: string | null;
|
|
283
|
-
}
|
|
284
|
-
/**
|
|
285
|
-
* Bundle a consumer-owned Alchemy entry, resolve that consumer's Alchemy CLI,
|
|
286
|
-
* run it under the current Node binary, and return only on a successful exit.
|
|
287
|
-
*
|
|
288
|
-
* Deploy/destroy/plan selection, stage admission, credentials, and every
|
|
289
|
-
* convergence or destructive-change policy remain the caller's responsibility.
|
|
290
|
-
*/
|
|
291
|
-
declare const executeAlchemyEntry: (options: ExecuteAlchemyEntryOptions) => Promise<ExecuteAlchemyEntryResult>;
|
|
630
|
+
repositories?: readonly string[];
|
|
631
|
+
repo: string;
|
|
632
|
+
}, options?: GithubAppTokenOptions) => Promise<string>;
|
|
292
633
|
//#endregion
|
|
293
634
|
//#region src/proof-reuse-gate.d.ts
|
|
294
635
|
/**
|
|
@@ -296,7 +637,9 @@ declare const executeAlchemyEntry: (options: ExecuteAlchemyEntryOptions) => Prom
|
|
|
296
637
|
*
|
|
297
638
|
* It answers one question, before checkout and before install: may this job
|
|
298
639
|
* reuse the local verification the factory already published for *this exact
|
|
299
|
-
* head*?
|
|
640
|
+
* head*? It asks that only on a pull request, so every default-branch push
|
|
641
|
+
* executes the full hosted suite (#863). Refusing runs hosted CI; it never
|
|
642
|
+
* fails the candidate. Three
|
|
300
643
|
* repositories had independently grown their own answer to that question and
|
|
301
644
|
* had already drifted apart, so the answer lives here once, with the App
|
|
302
645
|
* identity, check name, step identity, output names, guard, and every trust
|
|
@@ -322,6 +665,13 @@ declare const FACTORY_PROOF_GATE_CHECK_NAME = "patronage-factory/pr-verify";
|
|
|
322
665
|
declare const FACTORY_PROOF_GATE_APP_ID = "4314840";
|
|
323
666
|
/** Step id the guard condition refers to. */
|
|
324
667
|
declare const FACTORY_PROOF_GATE_STEP_ID = "factory-proof";
|
|
668
|
+
/**
|
|
669
|
+
* Human-visible name of the gate step as the Actions jobs API serves it. A
|
|
670
|
+
* read-only run analyzer (`psf ci:analyze`, #647) matches on this name to
|
|
671
|
+
* classify a run as proof-reuse versus full fallback, so it is exported from
|
|
672
|
+
* exactly the module that writes it — matching on a re-typed copy would drift.
|
|
673
|
+
*/
|
|
674
|
+
declare const FACTORY_PROOF_GATE_STEP_NAME = "Check for factory proof of this head";
|
|
325
675
|
/**
|
|
326
676
|
* The shell the gate runs under, and it is a correctness requirement rather
|
|
327
677
|
* than a preference.
|
|
@@ -359,27 +709,40 @@ declare const FACTORY_PROOF_GATE_REASON_OUTPUT = "reason";
|
|
|
359
709
|
* proof that executed every command the surface requires is reusable.
|
|
360
710
|
*/
|
|
361
711
|
declare const FACTORY_PROOF_GATE_MODE_OUTPUT = "mode";
|
|
712
|
+
/** Exact Checks API URL of the proof generation selected by the gate. */
|
|
713
|
+
declare const FACTORY_PROOF_GATE_SOURCE_URL_OUTPUT = "source-check-url";
|
|
362
714
|
/**
|
|
363
715
|
* Guard for every step the gate protects. Deliberately `!= 'true'` and not
|
|
364
716
|
* `== 'false'`: an unset, empty, or garbled output must run the suite.
|
|
365
717
|
*/
|
|
366
718
|
declare const FACTORY_PROOF_GATE_GUARD = "steps.factory-proof.outputs.reuse-proof != 'true'";
|
|
367
719
|
/**
|
|
368
|
-
* Pull requests only
|
|
369
|
-
*
|
|
370
|
-
*
|
|
720
|
+
* Pull requests only — the gate's single condition (#873, default since #863,
|
|
721
|
+
* the only mode since the merge-target opt-out was deleted).
|
|
722
|
+
*
|
|
723
|
+
* A merge target's guarantee is about the whole tree, not the diff. A
|
|
724
|
+
* candidate proof only ever binds the diff the candidate was scoped to, so
|
|
725
|
+
* reusing it on the merged commit proves less than the merge target needs.
|
|
726
|
+
* #931 is that defect observed — a `main` push reused a candidate proof,
|
|
727
|
+
* executed no command, and left a red package unnoticed for three days. Every
|
|
728
|
+
* default-branch push therefore executes the full hosted suite, whatever
|
|
729
|
+
* proof exists.
|
|
730
|
+
*
|
|
731
|
+
* Which branches trigger the workflow at all stays repository-owned. This
|
|
732
|
+
* condition only keeps the gate from consulting proof outside a pull request.
|
|
371
733
|
*/
|
|
372
734
|
declare const FACTORY_PROOF_GATE_IF = "github.event_name == 'pull_request'";
|
|
373
735
|
/**
|
|
374
736
|
* The complete refusal vocabulary. Deliberately few, because these are the
|
|
375
|
-
* only distinctions the gate can honestly make from
|
|
737
|
+
* only distinctions the gate can honestly make from its Checks API reads.
|
|
376
738
|
*
|
|
377
739
|
* - `proven` a covering, passing, unambiguous proof for this exact head
|
|
378
740
|
* - `none` no App-verified factory check run at this commit
|
|
379
741
|
* - `pending` the newest generation had not completed when this job read it
|
|
380
742
|
* - `failed` the newest generation records no pass
|
|
381
743
|
* - `unreadable` it passed but carries no binding for this repository and head
|
|
382
|
-
* - `incomplete`
|
|
744
|
+
* - `incomplete` its executed plus stamp-authorized released commands do not
|
|
745
|
+
* cover every required command
|
|
383
746
|
* - `ambiguous` two newest generations share the greatest start time
|
|
384
747
|
* - `error` the gate could not reach a decision (fail open)
|
|
385
748
|
*
|
|
@@ -415,6 +778,34 @@ interface ProofReuseCommand {
|
|
|
415
778
|
* must refuse instead.
|
|
416
779
|
*/
|
|
417
780
|
declare const proofReuseRequiredCommands: (commands: readonly ProofReuseCommand[]) => readonly string[] | undefined;
|
|
781
|
+
/**
|
|
782
|
+
* Resolve command *identities* to their `ProofReuseCommand` objects (ADR
|
|
783
|
+
* 0021).
|
|
784
|
+
*
|
|
785
|
+
* Selection by name is deliberately a consumer decision (proof-surfaces.ts in
|
|
786
|
+
* software-factory-hq, the `paitronage:verify` filter in paitronage's
|
|
787
|
+
* `verify.ts`): only the consumer knows which named commands a guarded
|
|
788
|
+
* surface requires. What both of those implementations independently
|
|
789
|
+
* hand-rolled is the same lookup — find each name in the profile's command
|
|
790
|
+
* catalog, and refuse to silently shrink the required set when a name has no
|
|
791
|
+
* entry. That lookup is what this function is: the mechanic, not the
|
|
792
|
+
* selection.
|
|
793
|
+
*
|
|
794
|
+
* Throwing at generation time (rather than returning `undefined` or an empty
|
|
795
|
+
* array) is deliberate: a name with no catalog entry is a mistake in the
|
|
796
|
+
* generator source, not a runtime condition a consumer should have to check
|
|
797
|
+
* for, and a required set that quietly loses an entry is exactly what makes a
|
|
798
|
+
* passing proof trivially "covering".
|
|
799
|
+
*
|
|
800
|
+
* `selectionLabel` names the failure, nothing else: it is not part of the
|
|
801
|
+
* selection this function resolves, only prose a consumer supplies for its
|
|
802
|
+
* own thrown error (e.g. HQ's surface name, "core" or "docs"). The message
|
|
803
|
+
* deliberately says "the profile's command catalog" rather than naming
|
|
804
|
+
* `software-factory.profile.json`: a fleet-generic library must not assume
|
|
805
|
+
* every consumer's catalog is that exact file, so this wording differs
|
|
806
|
+
* on purpose from the HQ-local message it replaced.
|
|
807
|
+
*/
|
|
808
|
+
declare const resolveProofReuseCommands: (catalog: readonly ProofReuseCommand[], names: readonly string[], selectionLabel?: string) => readonly ProofReuseCommand[];
|
|
418
809
|
interface FactoryProofGateOptions {
|
|
419
810
|
/**
|
|
420
811
|
* The profile command objects this guarded surface selected. A consumer with
|
|
@@ -455,9 +846,10 @@ interface FactoryProofGateStep {
|
|
|
455
846
|
}
|
|
456
847
|
/**
|
|
457
848
|
* The step itself, structurally accepted by gagen's `step()` without adding a
|
|
458
|
-
* gagen runtime dependency. It belongs first in the job it guards:
|
|
459
|
-
*
|
|
460
|
-
*
|
|
849
|
+
* gagen runtime dependency. It belongs first in the job it guards: a few API
|
|
850
|
+
* reads with the default `GITHUB_TOKEN`, no checkout, no install, so a proven
|
|
851
|
+
* head costs a runner nothing beyond job startup. The step runs on pull
|
|
852
|
+
* requests only, so it needs only `checks: read` (#873, #863).
|
|
461
853
|
*
|
|
462
854
|
* A **step, not a job**, and that is not a style preference. A separate gate
|
|
463
855
|
* job that errored would leave the guarded job `skipped`, and a summary job
|
|
@@ -510,6 +902,732 @@ declare const proofReuseCoverage: ({
|
|
|
510
902
|
/** `proofReuseCoverage`, as a build failure. */
|
|
511
903
|
declare const assertProofReuseCoverage: (input: ProofReuseCoverageInput) => ProofReuseCoverageReport;
|
|
512
904
|
//#endregion
|
|
905
|
+
//#region src/proof-reuse-presentation.d.ts
|
|
906
|
+
/** Generic timing and presentation steps around the proof-reuse gate (#652). */
|
|
907
|
+
declare const FACTORY_PROOF_TIMING_STEP_ID = "ci-timing";
|
|
908
|
+
declare const FACTORY_PROOF_TIMING_START_STEP_NAME = "Start CI timing";
|
|
909
|
+
declare const FACTORY_PROOF_TIMING_SUMMARY_STEP_NAME = "Record proof-reuse timing";
|
|
910
|
+
interface FactoryProofReusePresentationOptions {
|
|
911
|
+
/** Human-readable name of the guarded suite. */
|
|
912
|
+
readonly surface: string;
|
|
913
|
+
}
|
|
914
|
+
interface FactoryProofTimingStartStep {
|
|
915
|
+
readonly continueOnError: true;
|
|
916
|
+
readonly id: typeof FACTORY_PROOF_TIMING_STEP_ID;
|
|
917
|
+
readonly name: typeof FACTORY_PROOF_TIMING_START_STEP_NAME;
|
|
918
|
+
readonly run: string;
|
|
919
|
+
}
|
|
920
|
+
declare const factoryProofTimingStartStep: () => FactoryProofTimingStartStep;
|
|
921
|
+
interface FactoryProofReuseSummaryStep {
|
|
922
|
+
readonly continueOnError: true;
|
|
923
|
+
readonly env: Readonly<Record<string, string>>;
|
|
924
|
+
readonly if: "always()";
|
|
925
|
+
readonly name: typeof FACTORY_PROOF_TIMING_SUMMARY_STEP_NAME;
|
|
926
|
+
readonly run: string;
|
|
927
|
+
}
|
|
928
|
+
declare const factoryProofReuseSummaryStep: (options: FactoryProofReusePresentationOptions) => FactoryProofReuseSummaryStep;
|
|
929
|
+
//#endregion
|
|
930
|
+
//#region src/candidate-impact-workflow.d.ts
|
|
931
|
+
declare const FACTORY_CANDIDATE_IMPACT_STEP_ID = "candidate_impact";
|
|
932
|
+
declare const FACTORY_CANDIDATE_IMPACT_DECISION_OUTPUT = "decision";
|
|
933
|
+
declare const FACTORY_CANDIDATE_IMPACT_BASIS_OUTPUT = "basis";
|
|
934
|
+
declare const FACTORY_CANDIDATE_IMPACT_INERT_OUTPUT = "inert_paths";
|
|
935
|
+
declare const FACTORY_CANDIDATE_IMPACT_UNSUBSCRIBED_OUTPUT = "unsubscribed_paths";
|
|
936
|
+
interface FactoryCandidateImpactWorkflowOptions {
|
|
937
|
+
readonly base?: string;
|
|
938
|
+
readonly cli?: string;
|
|
939
|
+
readonly head?: string;
|
|
940
|
+
readonly profilePath?: string;
|
|
941
|
+
readonly targets: readonly string[];
|
|
942
|
+
}
|
|
943
|
+
interface FactoryCandidateImpactWorkflow {
|
|
944
|
+
/** Outputs for a caller-owned decision job that subsequent jobs may consume. */
|
|
945
|
+
readonly decisionJobOutputs: Readonly<Record<string, string>>;
|
|
946
|
+
readonly decisionStep: WorkflowStep;
|
|
947
|
+
/**
|
|
948
|
+
* A fail-open cross-job condition: only an explicit usable withdrawal skips
|
|
949
|
+
* work. The decision job id is required.
|
|
950
|
+
*/
|
|
951
|
+
readonly demandedIf: (targetName: string, decisionJob: string) => string;
|
|
952
|
+
/** The same fail-open condition for a step in the decision job. */
|
|
953
|
+
readonly demandedIfAtStep: (targetName: string) => string;
|
|
954
|
+
readonly targetOutputs: Readonly<Record<string, string>>;
|
|
955
|
+
}
|
|
956
|
+
/**
|
|
957
|
+
* Generate the factory-owned candidate routing seam for a consumer
|
|
958
|
+
* pull-request workflow (#741). The decision step calls
|
|
959
|
+
* `psf candidate:impact` with the pull request's exact base/head commits, so
|
|
960
|
+
* the canonical profile impact declarations and dependency graph route the
|
|
961
|
+
* run — never a second path matcher. Consumers retain jobs, surface names,
|
|
962
|
+
* runners, commands, and credentials; this artifact supplies only the
|
|
963
|
+
* decision step and per-target withdrawal conditions. Target output keys are
|
|
964
|
+
* the same stable contract the production decision seam writes.
|
|
965
|
+
*
|
|
966
|
+
* The decision checkout must have the exact head commit checked out and the
|
|
967
|
+
* base commit reachable (`fetchDepth: 0`, `ref` = the head SHA); anything
|
|
968
|
+
* else refuses withdrawal and keeps every target demanded.
|
|
969
|
+
*/
|
|
970
|
+
declare const factoryCandidateImpactWorkflow: (options: FactoryCandidateImpactWorkflowOptions) => FactoryCandidateImpactWorkflow;
|
|
971
|
+
//#endregion
|
|
972
|
+
//#region src/lifecycle-contract-lane.d.ts
|
|
973
|
+
declare const FACTORY_LIFECYCLE_CONTRACT_JOB_ID = "factory-contracts";
|
|
974
|
+
declare const FACTORY_LIFECYCLE_CONTRACT_JOB_NAME = "Factory / Alchemy Contracts";
|
|
975
|
+
interface FactoryLifecycleContractLaneOptions {
|
|
976
|
+
readonly command: string;
|
|
977
|
+
readonly jobId?: string;
|
|
978
|
+
readonly jobName?: string;
|
|
979
|
+
}
|
|
980
|
+
interface FactoryLifecycleContractLane {
|
|
981
|
+
readonly jobId: string;
|
|
982
|
+
readonly jobName: string;
|
|
983
|
+
readonly steps: readonly WorkflowStep[];
|
|
984
|
+
}
|
|
985
|
+
/**
|
|
986
|
+
* Generate the factory-owned non-credentialed lifecycle-contract lane
|
|
987
|
+
* (#765). Consumers declare the package-script command in
|
|
988
|
+
* `software-factory.profile.json`; this helper never loads that profile.
|
|
989
|
+
* Callers pass the parsed declaration (or omit it) and include or skip the
|
|
990
|
+
* returned job. Setup, runners, topology, and credentials stay with the
|
|
991
|
+
* caller — and this lane must never receive credentials.
|
|
992
|
+
*
|
|
993
|
+
* The generated steps run only the declared package script and write an
|
|
994
|
+
* always() evidence summary of what the lane proves and does not prove.
|
|
995
|
+
* The command must be a package-script invocation: `run <script>`, or a
|
|
996
|
+
* shorthand whose script name contains `:` (`pnpm test:factory`). Optional
|
|
997
|
+
* pnpm `--filter <pkg>` may precede either form. Shell operators, credential
|
|
998
|
+
* env, extra flags, and direct Vitest are refused.
|
|
999
|
+
*/
|
|
1000
|
+
declare const factoryLifecycleContractLane: (declaration?: FactoryLifecycleContractLaneOptions) => FactoryLifecycleContractLane | undefined;
|
|
1001
|
+
//#endregion
|
|
1002
|
+
//#region src/merge-freeze-job.d.ts
|
|
1003
|
+
/**
|
|
1004
|
+
* The merge-freeze writer job (#356, ADR 0016; #429 for the
|
|
1005
|
+
* merge-target namespace; #872 for this package).
|
|
1006
|
+
*
|
|
1007
|
+
* A consumer's generated merge-target-push Verify workflow is the ONLY
|
|
1008
|
+
* producer of `patronage-factory/merge-freeze` generations: a red
|
|
1009
|
+
* push-triggered Verify completes a generation active, a green one completes
|
|
1010
|
+
* it inactive, and no command, scheduled job, or second workflow writes this
|
|
1011
|
+
* check run. The operator override (`demand:waive --demand merge-freeze`)
|
|
1012
|
+
* waives the demand for one candidate during a fix-forward; it never writes
|
|
1013
|
+
* here.
|
|
1014
|
+
*
|
|
1015
|
+
* The write mirrors what the factory package's merge-freeze reader parses:
|
|
1016
|
+
* create the run `in_progress` with no `started_at` (GitHub stamps the
|
|
1017
|
+
* generation clock — the ordering rule itself is owned by the reader), then
|
|
1018
|
+
* PATCH it completed with the reader-shaped state payload in `output.text`.
|
|
1019
|
+
* The consumer's workflow test executes this exact script against a stubbed
|
|
1020
|
+
* `gh` and parses the emitted payload with `validateMergeFreezeState`, so
|
|
1021
|
+
* writer and reader cannot drift silently.
|
|
1022
|
+
*
|
|
1023
|
+
* Those two API calls are what the reader's two settling phases observe
|
|
1024
|
+
* (#890). Before the POST the merge target carries no generation at all, which
|
|
1025
|
+
* a reader reports as `awaiting-generation` while the pushed hosted verify run
|
|
1026
|
+
* is still pending. Between the POST and the PATCH the generation exists with
|
|
1027
|
+
* no `output.text`, which a reader reports as `running-generation`. Only the
|
|
1028
|
+
* PATCH writes a verdict, so neither phase is one.
|
|
1029
|
+
*
|
|
1030
|
+
* Failure posture is deliberately fail-closed and the opposite of the
|
|
1031
|
+
* proof-reuse gate's fail-open shell: this step runs under the runner's
|
|
1032
|
+
* default `bash -e {0}`, so any API refusal aborts the step, the generation
|
|
1033
|
+
* stays absent or `in_progress`, and every `pr:ready` arming-time read of
|
|
1034
|
+
* that tip (#477) refuses until a later push writes a green generation.
|
|
1035
|
+
*
|
|
1036
|
+
* **Ownership line.** This package owns the check name, the App identity, the
|
|
1037
|
+
* `create-github-app-token` inputs, the result fold, the merge-target `if`,
|
|
1038
|
+
* and the job's `permissions`. The caller owns the runner, the `needs` list
|
|
1039
|
+
* of every authoritative verification leaf, the timeout, and any extra env.
|
|
1040
|
+
*/
|
|
1041
|
+
/** The one check-run name every merge-freeze reader pins. */
|
|
1042
|
+
declare const FACTORY_MERGE_FREEZE_CHECK_NAME = "patronage-factory/merge-freeze";
|
|
1043
|
+
declare const FACTORY_MERGE_FREEZE_JOB_ID = "freeze";
|
|
1044
|
+
declare const FACTORY_MERGE_FREEZE_JOB_NAME = "Report the merge freeze";
|
|
1045
|
+
/** Step id the token step exposes its installation token under. */
|
|
1046
|
+
declare const FACTORY_MERGE_FREEZE_APP_TOKEN_STEP_ID = "factory-app-token";
|
|
1047
|
+
/**
|
|
1048
|
+
* The GitHub Actions expression that folds the needed jobs' results into the
|
|
1049
|
+
* one word the script branches on. It mirrors the `verify` summary job's
|
|
1050
|
+
* failure condition exactly: any failed or cancelled needed job is a red
|
|
1051
|
+
* merge target.
|
|
1052
|
+
*/
|
|
1053
|
+
declare const FACTORY_MERGE_FREEZE_VERIFY_RESULT_EXPRESSION = "${{ (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) && 'failure' || 'success' }}";
|
|
1054
|
+
/**
|
|
1055
|
+
* The literal factory merge-target namespace, as a `github.ref` predicate
|
|
1056
|
+
* (#429).
|
|
1057
|
+
*
|
|
1058
|
+
* `main` plus the repository-owned `epic/**` integration branches, and
|
|
1059
|
+
* nothing else. Deliberately literal rather than profile-declared: one
|
|
1060
|
+
* implementation per contract, no configuration machinery for a two-element
|
|
1061
|
+
* namespace whose second element is a namespace prefix the repository itself
|
|
1062
|
+
* owns. `epic/` needs the trailing slash — `startsWith` would otherwise admit
|
|
1063
|
+
* `epicness/…`, which is not a merge target.
|
|
1064
|
+
*
|
|
1065
|
+
* A caller's `push` trigger branch list names the same namespace. That list
|
|
1066
|
+
* decides which events produce a run at all; this predicate decides which of
|
|
1067
|
+
* those runs may write a generation.
|
|
1068
|
+
*/
|
|
1069
|
+
declare const FACTORY_MERGE_TARGET_REF_CONDITION: string;
|
|
1070
|
+
/**
|
|
1071
|
+
* `always()` is load-bearing: the red path is the whole point, so the job must
|
|
1072
|
+
* run when a needed verification job failed. `github.event_name == 'push'` is
|
|
1073
|
+
* load-bearing twice over: a `pull_request` run must never write a generation
|
|
1074
|
+
* (its `github.sha` is a synthetic merge commit that no base tip is ever read
|
|
1075
|
+
* at), and a `pull_request` trigger with an `epic/**` base list would
|
|
1076
|
+
* otherwise reach this job.
|
|
1077
|
+
*/
|
|
1078
|
+
declare const FACTORY_MERGE_FREEZE_IF: string;
|
|
1079
|
+
/**
|
|
1080
|
+
* Least privilege for the writer job: no `GITHUB_TOKEN` scope at all.
|
|
1081
|
+
*
|
|
1082
|
+
* Both Checks API calls run under the App installation token minted in the
|
|
1083
|
+
* first step (`GH_TOKEN: steps.factory-app-token.outputs.token`), and the job
|
|
1084
|
+
* never checks out the repository. So the job uses no `GITHUB_TOKEN` scope,
|
|
1085
|
+
* and an empty block is the honest declaration. A `checks: write` here would
|
|
1086
|
+
* hand every adopter an unused write scope (#884).
|
|
1087
|
+
*/
|
|
1088
|
+
declare const FACTORY_MERGE_FREEZE_PERMISSIONS: Readonly<{}>;
|
|
1089
|
+
/**
|
|
1090
|
+
* The script the freeze step runs. Environment contract:
|
|
1091
|
+
* - `GH_TOKEN`: an installation token for the pinned Patronage Factory App —
|
|
1092
|
+
* the check run must carry that App's identity or every reader rejects it.
|
|
1093
|
+
* - `VERIFY_RESULT`: `success` or `failure` (see the fold expression above).
|
|
1094
|
+
* - `VERIFY_JOBS`: JSON `needs` context; only job results are retained.
|
|
1095
|
+
* - `GITHUB_SHA` / `GITHUB_REPOSITORY` / `GITHUB_SERVER_URL` /
|
|
1096
|
+
* `GITHUB_RUN_ID` / `GITHUB_RUN_ATTEMPT` / `GITHUB_REF_NAME`: runner-provided.
|
|
1097
|
+
*
|
|
1098
|
+
* `GITHUB_REF_NAME` is the merge target this run pushed to — `main` or an
|
|
1099
|
+
* `epic/**` integration branch (#429). The job is gated to `push` events on
|
|
1100
|
+
* exactly those refs, so the branch name is always the short name of a
|
|
1101
|
+
* repository-owned merge target and never a pull-request merge ref. It
|
|
1102
|
+
* appears in recovery guidance because a reader of an epic-targeting
|
|
1103
|
+
* candidate must be told which branch owns the generation. A later green
|
|
1104
|
+
* generation on that branch's current tip clears it, including a rerun.
|
|
1105
|
+
*/
|
|
1106
|
+
declare const factoryMergeFreezeScript: () => string;
|
|
1107
|
+
interface FactoryMergeFreezeJobOptions<TNeed> {
|
|
1108
|
+
/** The pinned `actions/create-github-app-token` the caller declared. */
|
|
1109
|
+
readonly createGithubAppToken: PinnedAction;
|
|
1110
|
+
/**
|
|
1111
|
+
* Every authoritative verification leaf this generation folds. The elements
|
|
1112
|
+
* are whatever the caller's workflow generator uses for `needs:`; they are
|
|
1113
|
+
* returned unchanged.
|
|
1114
|
+
*/
|
|
1115
|
+
readonly needs: readonly TNeed[];
|
|
1116
|
+
/**
|
|
1117
|
+
* Override the result fold. Defaults to
|
|
1118
|
+
* `FACTORY_MERGE_FREEZE_VERIFY_RESULT_EXPRESSION`, which is what a caller
|
|
1119
|
+
* whose summary job folds `needs.*.result` wants. Supply one only when the
|
|
1120
|
+
* caller's red condition is genuinely different.
|
|
1121
|
+
*/
|
|
1122
|
+
readonly verifyResultExpression?: string;
|
|
1123
|
+
}
|
|
1124
|
+
interface FactoryMergeFreezeJob<TNeed> {
|
|
1125
|
+
readonly if: typeof FACTORY_MERGE_FREEZE_IF;
|
|
1126
|
+
readonly jobId: typeof FACTORY_MERGE_FREEZE_JOB_ID;
|
|
1127
|
+
readonly jobName: typeof FACTORY_MERGE_FREEZE_JOB_NAME;
|
|
1128
|
+
readonly needs: readonly TNeed[];
|
|
1129
|
+
readonly permissions: typeof FACTORY_MERGE_FREEZE_PERMISSIONS;
|
|
1130
|
+
readonly steps: readonly WorkflowStep[];
|
|
1131
|
+
}
|
|
1132
|
+
/**
|
|
1133
|
+
* Build the merge-freeze writer job.
|
|
1134
|
+
*
|
|
1135
|
+
* An empty `needs` list is refused: a fold over no verification leaf is
|
|
1136
|
+
* always `success`, so such a job would write a green generation for a merge
|
|
1137
|
+
* target nothing verified — the exact failure the freeze exists to prevent.
|
|
1138
|
+
*/
|
|
1139
|
+
declare const factoryMergeFreezeJob: <TNeed>(options: FactoryMergeFreezeJobOptions<TNeed>) => FactoryMergeFreezeJob<TNeed>;
|
|
1140
|
+
//#endregion
|
|
1141
|
+
//#region src/pr-status-hud-workflow.d.ts
|
|
1142
|
+
declare const FACTORY_PR_STATUS_HUD_JOB_ID = "status-hud";
|
|
1143
|
+
declare const FACTORY_PR_STATUS_HUD_JOB_NAME = "Present PR status HUD";
|
|
1144
|
+
declare const FACTORY_PR_STATUS_HUD_APP_TOKEN_STEP_ID = "factory-app-token";
|
|
1145
|
+
declare const FACTORY_PR_STATUS_HUD_PLAN_PATH = ".factory-memory/preview-plan.json";
|
|
1146
|
+
/**
|
|
1147
|
+
* Presentation is independent of deploy demand. Callers who `needs` the jobs
|
|
1148
|
+
* that settle HUD sources (verify, deploy) must keep this `always()` so a
|
|
1149
|
+
* skipped or withdrawn deploy still publishes Skipped rows.
|
|
1150
|
+
*/
|
|
1151
|
+
declare const FACTORY_PR_STATUS_HUD_IF = "always() && github.event_name == 'pull_request' && github.event.pull_request.draft != true";
|
|
1152
|
+
interface FactoryPrStatusHudWorkflowOptions {
|
|
1153
|
+
readonly cli?: string;
|
|
1154
|
+
readonly createGithubAppToken: PinnedAction;
|
|
1155
|
+
}
|
|
1156
|
+
/**
|
|
1157
|
+
* Least privilege for the job that runs the present step. The present step
|
|
1158
|
+
* is an inventory `list`, so the job needs exactly the inventory's read
|
|
1159
|
+
* permissions (#825, #859).
|
|
1160
|
+
*/
|
|
1161
|
+
declare const FACTORY_PR_STATUS_HUD_PERMISSIONS: Readonly<{
|
|
1162
|
+
readonly checks: "read";
|
|
1163
|
+
readonly contents: "read";
|
|
1164
|
+
readonly "pull-requests": "read";
|
|
1165
|
+
}>;
|
|
1166
|
+
declare const FACTORY_PR_STATUS_HUD_CONCURRENCY: Readonly<{
|
|
1167
|
+
cancelInProgress: false;
|
|
1168
|
+
group: "status-hud-${{ github.repository }}-${{ github.event.pull_request.number }}";
|
|
1169
|
+
}>;
|
|
1170
|
+
interface FactoryPrStatusHudWorkflow {
|
|
1171
|
+
readonly concurrency: typeof FACTORY_PR_STATUS_HUD_CONCURRENCY;
|
|
1172
|
+
readonly if: typeof FACTORY_PR_STATUS_HUD_IF;
|
|
1173
|
+
readonly jobId: typeof FACTORY_PR_STATUS_HUD_JOB_ID;
|
|
1174
|
+
readonly jobName: typeof FACTORY_PR_STATUS_HUD_JOB_NAME;
|
|
1175
|
+
readonly permissions: typeof FACTORY_PR_STATUS_HUD_PERMISSIONS;
|
|
1176
|
+
readonly presentSteps: readonly WorkflowStep[];
|
|
1177
|
+
}
|
|
1178
|
+
declare const factoryPrStatusHudWorkflow: (options: FactoryPrStatusHudWorkflowOptions) => FactoryPrStatusHudWorkflow;
|
|
1179
|
+
//#endregion
|
|
1180
|
+
//#region src/preview-cleanup-topology.d.ts
|
|
1181
|
+
declare const FACTORY_PREVIEW_CLEANUP_AUDIT_JOB_ID = "stage-residue-audit";
|
|
1182
|
+
declare const FACTORY_PREVIEW_CLEANUP_AUDIT_JOB_NAME = "Stage residue audit";
|
|
1183
|
+
interface FactoryPreviewCleanupTopologyOptions {
|
|
1184
|
+
readonly audit: {
|
|
1185
|
+
readonly command: string;
|
|
1186
|
+
readonly jobId?: string;
|
|
1187
|
+
readonly jobName?: string;
|
|
1188
|
+
};
|
|
1189
|
+
readonly stacks: readonly string[];
|
|
1190
|
+
}
|
|
1191
|
+
interface FactoryPreviewCleanupDestroyJob {
|
|
1192
|
+
readonly jobId: string;
|
|
1193
|
+
readonly stack: string;
|
|
1194
|
+
}
|
|
1195
|
+
interface FactoryPreviewCleanupAuditJob {
|
|
1196
|
+
readonly if: "always()";
|
|
1197
|
+
readonly jobId: string;
|
|
1198
|
+
readonly jobName: string;
|
|
1199
|
+
readonly needs: readonly string[];
|
|
1200
|
+
readonly steps: readonly WorkflowStep[];
|
|
1201
|
+
}
|
|
1202
|
+
interface FactoryPreviewCleanupTopology {
|
|
1203
|
+
readonly auditJob: FactoryPreviewCleanupAuditJob;
|
|
1204
|
+
readonly destroyJobs: readonly FactoryPreviewCleanupDestroyJob[];
|
|
1205
|
+
}
|
|
1206
|
+
declare const previewCleanupDestroyJobId: (stack: string) => string;
|
|
1207
|
+
/**
|
|
1208
|
+
* Generate the factory-owned preview-cleanup topology (#764): one destroy
|
|
1209
|
+
* job identity per stack, then exactly one stage-wide residue-audit job
|
|
1210
|
+
* that `needs` every destroy. The audit is whole-stage — this helper never
|
|
1211
|
+
* threads a stack name or path filter into it. Callers own destroy steps,
|
|
1212
|
+
* what counts as residue, credentials, and runners.
|
|
1213
|
+
*/
|
|
1214
|
+
declare const factoryPreviewCleanupTopology: (options: FactoryPreviewCleanupTopologyOptions) => FactoryPreviewCleanupTopology;
|
|
1215
|
+
//#endregion
|
|
1216
|
+
//#region src/preview-receipt-workflow.d.ts
|
|
1217
|
+
interface FactoryPreviewReceiptWorkflowOptions {
|
|
1218
|
+
readonly target: string;
|
|
1219
|
+
readonly cli?: string;
|
|
1220
|
+
/** Caller-owned PR number expression, passed through the environment. */
|
|
1221
|
+
readonly pr?: string;
|
|
1222
|
+
}
|
|
1223
|
+
interface FactoryPreviewReceiptWorkflow {
|
|
1224
|
+
/** Place before the selected target's first mutation, under its selection guard. */
|
|
1225
|
+
readonly beginStep: WorkflowStep;
|
|
1226
|
+
/** Append after consumer deploy and required smoke steps. Never rename the bind step. */
|
|
1227
|
+
readonly completionSteps: readonly WorkflowStep[];
|
|
1228
|
+
/** Place before cleanup, including cleanup of a failed/unregistered deployment. */
|
|
1229
|
+
readonly invalidateStep: WorkflowStep;
|
|
1230
|
+
readonly permissions: Readonly<{
|
|
1231
|
+
actions: "read";
|
|
1232
|
+
contents: "read";
|
|
1233
|
+
deployments: "write";
|
|
1234
|
+
"pull-requests": "read";
|
|
1235
|
+
}>;
|
|
1236
|
+
}
|
|
1237
|
+
/** Receipt transport only. The consumer owns selection, lifecycle, smoke, and freshness. */
|
|
1238
|
+
declare const factoryPreviewReceiptWorkflow: (options: FactoryPreviewReceiptWorkflowOptions) => FactoryPreviewReceiptWorkflow;
|
|
1239
|
+
//#endregion
|
|
1240
|
+
//#region src/production-impact-workflow.d.ts
|
|
1241
|
+
declare const FACTORY_PRODUCTION_IMPACT_STEP_ID = "production_impact";
|
|
1242
|
+
declare const FACTORY_PRODUCTION_IMPACT_DECISION_OUTPUT = "decision";
|
|
1243
|
+
declare const FACTORY_PRODUCTION_IMPACT_BASIS_OUTPUT = "basis";
|
|
1244
|
+
declare const FACTORY_PRODUCTION_IMPACT_UNSUBSCRIBED_OUTPUT = "unsubscribed_paths";
|
|
1245
|
+
/** Stable GitHub-output key for one declared target. */
|
|
1246
|
+
declare const productionImpactTargetOutput: (targetName: string) => string;
|
|
1247
|
+
interface FactoryProductionImpactWorkflowOptions {
|
|
1248
|
+
/** The checked-out candidate commit. Defaults to `github.sha`. */
|
|
1249
|
+
readonly candidate?: string;
|
|
1250
|
+
readonly cli?: string;
|
|
1251
|
+
readonly profilePath?: string;
|
|
1252
|
+
/** Deployment stage the receipts are bound to, when the consumer has one. */
|
|
1253
|
+
readonly stage?: string;
|
|
1254
|
+
readonly targets: readonly string[];
|
|
1255
|
+
}
|
|
1256
|
+
interface FactoryProductionImpactWorkflow {
|
|
1257
|
+
/** Outputs for a caller-owned decision job that subsequent jobs may consume. */
|
|
1258
|
+
readonly decisionJobOutputs: Readonly<Record<string, string>>;
|
|
1259
|
+
readonly decisionStep: WorkflowStep;
|
|
1260
|
+
/**
|
|
1261
|
+
* A fail-open cross-job condition: only an explicit usable withdrawal skips
|
|
1262
|
+
* work. The decision job id is required.
|
|
1263
|
+
*/
|
|
1264
|
+
readonly demandedIf: (targetName: string, decisionJob: string) => string;
|
|
1265
|
+
/** The same fail-open condition for a step in the decision job. */
|
|
1266
|
+
readonly demandedIfAtStep: (targetName: string) => string;
|
|
1267
|
+
/** Permissions every job that runs the decision step or a receipt step declares for `github.token`. */
|
|
1268
|
+
readonly permissions: Readonly<{
|
|
1269
|
+
actions: "read";
|
|
1270
|
+
contents: "read";
|
|
1271
|
+
deployments: "write";
|
|
1272
|
+
}>;
|
|
1273
|
+
/**
|
|
1274
|
+
* The receipt steps a deploy job appends after its deploy and health steps,
|
|
1275
|
+
* in order: a success receipt that runs when every earlier step succeeded
|
|
1276
|
+
* and outputs the new deployment id; a bind step whose name carries that id
|
|
1277
|
+
* and whose presence in GitHub's job record is the reader's proof that this
|
|
1278
|
+
* run created that record; and a failure receipt that runs when a step
|
|
1279
|
+
* failed. Only a bound success receipt advances the target's baseline. Do
|
|
1280
|
+
* not rename or reorder them.
|
|
1281
|
+
*/
|
|
1282
|
+
readonly receiptSteps: (targetName: string) => readonly WorkflowStep[];
|
|
1283
|
+
readonly targetOutputs: Readonly<Record<string, string>>;
|
|
1284
|
+
}
|
|
1285
|
+
/**
|
|
1286
|
+
* Generate the small factory-owned decision seam for a consumer production
|
|
1287
|
+
* workflow. Consumers retain jobs, deploy commands, credentials, topology,
|
|
1288
|
+
* health checks, and convergence checks; this artifact supplies the decision
|
|
1289
|
+
* step, per-target withdrawal conditions, and the receipt steps that record
|
|
1290
|
+
* what each deploy job did.
|
|
1291
|
+
*
|
|
1292
|
+
* The decision step resolves each target's demand from its last trusted
|
|
1293
|
+
* successful deployment receipt, never from the push's before commit. The
|
|
1294
|
+
* decision checkout needs full history (`fetchDepth: 0`) so the baseline
|
|
1295
|
+
* commit is reachable; a shallow checkout keeps every target demanded.
|
|
1296
|
+
*/
|
|
1297
|
+
declare const factoryProductionImpactWorkflow: (options: FactoryProductionImpactWorkflowOptions) => FactoryProductionImpactWorkflow;
|
|
1298
|
+
//#endregion
|
|
1299
|
+
//#region src/push-identity-workflow.d.ts
|
|
1300
|
+
declare const FACTORY_PUSH_IDENTITY_SCHEMA_VERSION = 1;
|
|
1301
|
+
/** Versioned document uploaded by a push-triggered verification run. */
|
|
1302
|
+
interface FactoryPushIdentityEnvelope {
|
|
1303
|
+
readonly after: string;
|
|
1304
|
+
readonly before: string;
|
|
1305
|
+
readonly repository: string;
|
|
1306
|
+
readonly runId: string;
|
|
1307
|
+
readonly schemaVersion: typeof FACTORY_PUSH_IDENTITY_SCHEMA_VERSION;
|
|
1308
|
+
}
|
|
1309
|
+
type FactoryPushIdentityDisposition = "refused" | "usable";
|
|
1310
|
+
interface FactoryPushIdentityProducerOptions {
|
|
1311
|
+
/**
|
|
1312
|
+
* Explicit caller-owned upload-artifact pin from its workflow artifact.
|
|
1313
|
+
* Pass factory-ci's `UPLOAD_ARTIFACT` catalog export (or another
|
|
1314
|
+
* `actions/upload-artifact` pin); the caller wires the step, the catalog
|
|
1315
|
+
* only names the pin.
|
|
1316
|
+
*/
|
|
1317
|
+
readonly uploadArtifact: PinnedAction;
|
|
1318
|
+
/** Optional consumer trigger policy combined with the required push event. */
|
|
1319
|
+
readonly if?: string;
|
|
1320
|
+
}
|
|
1321
|
+
interface FactoryPushIdentityProducer {
|
|
1322
|
+
readonly artifactName: string;
|
|
1323
|
+
readonly steps: readonly WorkflowStep[];
|
|
1324
|
+
}
|
|
1325
|
+
/**
|
|
1326
|
+
* Record and upload the exact push-event identity without changing the Verify
|
|
1327
|
+
* result when transport is unavailable. Place these steps after verification.
|
|
1328
|
+
*/
|
|
1329
|
+
declare const factoryPushIdentityProducer: (options: FactoryPushIdentityProducerOptions) => FactoryPushIdentityProducer;
|
|
1330
|
+
interface FactoryPushIdentityConsumer {
|
|
1331
|
+
/** Job outputs suitable for a caller-owned decision job and telemetry. */
|
|
1332
|
+
readonly outputs: Readonly<Record<"after" | "before" | "disposition" | "provenance" | "reason", string>>;
|
|
1333
|
+
readonly requiredPermissions: Readonly<{
|
|
1334
|
+
actions: "read";
|
|
1335
|
+
contents: "read";
|
|
1336
|
+
}>;
|
|
1337
|
+
readonly steps: readonly WorkflowStep[];
|
|
1338
|
+
/** Run classification only when exact identity transport is usable. */
|
|
1339
|
+
readonly usableIf: string;
|
|
1340
|
+
}
|
|
1341
|
+
interface FactoryPushIdentityConsumerOptions {
|
|
1342
|
+
/** Explicit caller-owned checkout pin from its action family. */
|
|
1343
|
+
readonly checkout: PinnedAction;
|
|
1344
|
+
/** Explicit caller-owned download-artifact pin from its workflow artifact. */
|
|
1345
|
+
readonly downloadArtifact: PinnedAction;
|
|
1346
|
+
}
|
|
1347
|
+
/**
|
|
1348
|
+
* Download and validate identity from exactly the triggering workflow run in
|
|
1349
|
+
* the current repository. Every failure becomes a typed refusal; consumers
|
|
1350
|
+
* retain deploy policy, credentials, commands, topology, and convergence.
|
|
1351
|
+
*/
|
|
1352
|
+
declare const factoryPushIdentityConsumer: (options: FactoryPushIdentityConsumerOptions) => FactoryPushIdentityConsumer;
|
|
1353
|
+
//#endregion
|
|
1354
|
+
//#region src/vitest-profile.d.ts
|
|
1355
|
+
/** Schema version of the emitted profile document. */
|
|
1356
|
+
declare const VITEST_PROFILE_SCHEMA_VERSION = 1;
|
|
1357
|
+
/** `tool` discriminator every emitted profile carries. */
|
|
1358
|
+
declare const VITEST_PROFILE_TOOL = "factory-ci-vitest-profile";
|
|
1359
|
+
/** Per-assertion status as Vitest's JSON reporter spells it. */
|
|
1360
|
+
type VitestTestStatus = "disabled" | "failed" | "passed" | "pending" | "skipped" | "todo";
|
|
1361
|
+
/** The subset of Vitest's `--reporter=json` document this module reads. */
|
|
1362
|
+
interface VitestJsonReport {
|
|
1363
|
+
numFailedTests: number;
|
|
1364
|
+
numPassedTests: number;
|
|
1365
|
+
numPendingTests: number;
|
|
1366
|
+
numTodoTests: number;
|
|
1367
|
+
numTotalTests: number;
|
|
1368
|
+
numTotalTestSuites: number;
|
|
1369
|
+
success: boolean;
|
|
1370
|
+
testResults: {
|
|
1371
|
+
assertionResults: {
|
|
1372
|
+
duration?: number | null;
|
|
1373
|
+
fullName: string;
|
|
1374
|
+
status: VitestTestStatus;
|
|
1375
|
+
}[];
|
|
1376
|
+
endTime: number;
|
|
1377
|
+
name: string;
|
|
1378
|
+
startTime: number;
|
|
1379
|
+
status: "failed" | "passed";
|
|
1380
|
+
}[];
|
|
1381
|
+
}
|
|
1382
|
+
/** Duration statistics over one population of samples, in milliseconds. */
|
|
1383
|
+
interface VitestProfileDurationSummary {
|
|
1384
|
+
maximum: number;
|
|
1385
|
+
mean: number;
|
|
1386
|
+
median: number;
|
|
1387
|
+
minimum: number;
|
|
1388
|
+
}
|
|
1389
|
+
/**
|
|
1390
|
+
* The machine a sample ran on, plus the commit it measured. `cpuModel` is the
|
|
1391
|
+
* field that makes two runs comparable at all: hosted runner pools mix silicon
|
|
1392
|
+
* behind one label.
|
|
1393
|
+
*/
|
|
1394
|
+
interface VitestProfileEnvironment {
|
|
1395
|
+
arch: string;
|
|
1396
|
+
availableParallelism: number;
|
|
1397
|
+
cpuCount: number;
|
|
1398
|
+
cpuModel: string | null;
|
|
1399
|
+
gitDirty: boolean | null;
|
|
1400
|
+
gitHead: string | null;
|
|
1401
|
+
node: string;
|
|
1402
|
+
osRelease: string;
|
|
1403
|
+
platform: string;
|
|
1404
|
+
totalMemoryBytes: number;
|
|
1405
|
+
vitest: string;
|
|
1406
|
+
}
|
|
1407
|
+
/** One complete Vitest run inside a profile. */
|
|
1408
|
+
interface VitestProfileSample {
|
|
1409
|
+
counts: {
|
|
1410
|
+
failed: number;
|
|
1411
|
+
passed: number;
|
|
1412
|
+
pending: number;
|
|
1413
|
+
suites: number;
|
|
1414
|
+
tests: number;
|
|
1415
|
+
todo: number;
|
|
1416
|
+
} | null;
|
|
1417
|
+
durationMs: number;
|
|
1418
|
+
endedAt: string;
|
|
1419
|
+
exitCode: number;
|
|
1420
|
+
failure: string | null;
|
|
1421
|
+
files: {
|
|
1422
|
+
durationMs: number;
|
|
1423
|
+
path: string;
|
|
1424
|
+
status: "failed" | "passed";
|
|
1425
|
+
}[];
|
|
1426
|
+
reportAvailable: boolean;
|
|
1427
|
+
sample: number;
|
|
1428
|
+
startedAt: string;
|
|
1429
|
+
tests: {
|
|
1430
|
+
durationMs: number;
|
|
1431
|
+
file: string;
|
|
1432
|
+
name: string;
|
|
1433
|
+
status: VitestTestStatus;
|
|
1434
|
+
}[];
|
|
1435
|
+
}
|
|
1436
|
+
/** The emitted profile document. */
|
|
1437
|
+
interface VitestProfile {
|
|
1438
|
+
command: string[];
|
|
1439
|
+
endedAt: string;
|
|
1440
|
+
environment: VitestProfileEnvironment;
|
|
1441
|
+
options: {
|
|
1442
|
+
maxWorkers: number;
|
|
1443
|
+
samples: number;
|
|
1444
|
+
slowLimit: number;
|
|
1445
|
+
};
|
|
1446
|
+
rawReportDirectory: string;
|
|
1447
|
+
runs: VitestProfileSample[];
|
|
1448
|
+
schemaVersion: typeof VITEST_PROFILE_SCHEMA_VERSION;
|
|
1449
|
+
startedAt: string;
|
|
1450
|
+
summary: {
|
|
1451
|
+
durationMs: VitestProfileDurationSummary;
|
|
1452
|
+
slowFiles: {
|
|
1453
|
+
durationMs: VitestProfileDurationSummary;
|
|
1454
|
+
path: string;
|
|
1455
|
+
samples: number;
|
|
1456
|
+
}[];
|
|
1457
|
+
slowTests: {
|
|
1458
|
+
durationMs: VitestProfileDurationSummary;
|
|
1459
|
+
file: string;
|
|
1460
|
+
name: string;
|
|
1461
|
+
samples: number;
|
|
1462
|
+
}[];
|
|
1463
|
+
};
|
|
1464
|
+
tool: typeof VITEST_PROFILE_TOOL;
|
|
1465
|
+
}
|
|
1466
|
+
/** What a caller must decide before a profile can run. */
|
|
1467
|
+
interface VitestProfileOptions {
|
|
1468
|
+
/** Directory Vitest runs in; file paths are recorded relative to it. */
|
|
1469
|
+
cwd: string;
|
|
1470
|
+
/** Directory whose Git state is recorded. Defaults to `cwd`. */
|
|
1471
|
+
gitDirectory?: string;
|
|
1472
|
+
/** Vitest `--maxWorkers` for every sample. */
|
|
1473
|
+
maxWorkers: number;
|
|
1474
|
+
/** Absolute path of the profile document to write. */
|
|
1475
|
+
outputPath: string;
|
|
1476
|
+
/** Called before each sample starts. */
|
|
1477
|
+
onSampleStart?: (input: {
|
|
1478
|
+
maxWorkers: number;
|
|
1479
|
+
sample: number;
|
|
1480
|
+
samples: number;
|
|
1481
|
+
}) => void;
|
|
1482
|
+
/** Called after each sample is normalized and persisted. */
|
|
1483
|
+
onSampleComplete?: (input: {
|
|
1484
|
+
result: VitestProfileSample;
|
|
1485
|
+
sample: number;
|
|
1486
|
+
samples: number;
|
|
1487
|
+
}) => void;
|
|
1488
|
+
/** How many serial runs to take. */
|
|
1489
|
+
samples: number;
|
|
1490
|
+
/** How many slow files and slow tests to keep in the summary. */
|
|
1491
|
+
slowLimit: number;
|
|
1492
|
+
/**
|
|
1493
|
+
* `stdio` for the Vitest child. Defaults to `"inherit"`, which is what a
|
|
1494
|
+
* caller printing progress to a terminal wants; a caller whose own stdout is
|
|
1495
|
+
* structured passes `"ignore"` to silence the run.
|
|
1496
|
+
*/
|
|
1497
|
+
stdio?: StdioOptions;
|
|
1498
|
+
}
|
|
1499
|
+
/** Outcome of one Vitest invocation, as `runSample` reports it. */
|
|
1500
|
+
interface VitestProfileSampleExecution {
|
|
1501
|
+
durationMs: number;
|
|
1502
|
+
exitCode: number;
|
|
1503
|
+
failure?: string | null;
|
|
1504
|
+
report: VitestJsonReport | null;
|
|
1505
|
+
}
|
|
1506
|
+
/** Injectable seams; production passes none of them. */
|
|
1507
|
+
interface VitestProfileDependencies {
|
|
1508
|
+
now?: () => Date;
|
|
1509
|
+
runSample?: (input: {
|
|
1510
|
+
cwd: string;
|
|
1511
|
+
maxWorkers: number;
|
|
1512
|
+
reportPath: string;
|
|
1513
|
+
sample: number;
|
|
1514
|
+
stdio: StdioOptions;
|
|
1515
|
+
}) => Promise<VitestProfileSampleExecution>;
|
|
1516
|
+
writeResult?: (outputPath: string, profile: VitestProfile) => Promise<void>;
|
|
1517
|
+
}
|
|
1518
|
+
/**
|
|
1519
|
+
* A sample failed. The partial profile is already on disk; `exitCode` is the
|
|
1520
|
+
* status a caller should exit with.
|
|
1521
|
+
*/
|
|
1522
|
+
declare class VitestProfileError extends Error {
|
|
1523
|
+
readonly exitCode: number;
|
|
1524
|
+
constructor(message: string, exitCode: number);
|
|
1525
|
+
}
|
|
1526
|
+
/**
|
|
1527
|
+
* Fold one Vitest JSON report into a profile sample: file and test timings,
|
|
1528
|
+
* both sorted slowest first, plus the run's counts. A missing report (crash,
|
|
1529
|
+
* timeout, unwritable output) yields a sample with `reportAvailable: false`
|
|
1530
|
+
* rather than nothing at all.
|
|
1531
|
+
*/
|
|
1532
|
+
declare const normalizeVitestProfileSample: (report: VitestJsonReport | null, input: {
|
|
1533
|
+
cwd: string;
|
|
1534
|
+
durationMs: number;
|
|
1535
|
+
endedAt: Date;
|
|
1536
|
+
exitCode: number;
|
|
1537
|
+
failure?: string | null;
|
|
1538
|
+
sample: number;
|
|
1539
|
+
startedAt: Date;
|
|
1540
|
+
}) => VitestProfileSample;
|
|
1541
|
+
/**
|
|
1542
|
+
* Record the machine and commit a profile was taken on. Vitest's version is
|
|
1543
|
+
* resolved from `cwd`, so it is the consumer's Vitest and not this package's.
|
|
1544
|
+
* Git failures degrade to `null` — an artifact from a tarball checkout is still
|
|
1545
|
+
* a usable measurement.
|
|
1546
|
+
*/
|
|
1547
|
+
declare const captureVitestProfileEnvironment: (options: {
|
|
1548
|
+
cwd: string;
|
|
1549
|
+
gitDirectory?: string;
|
|
1550
|
+
}) => Promise<VitestProfileEnvironment>;
|
|
1551
|
+
/**
|
|
1552
|
+
* Write a profile document atomically: a partial file must never be readable
|
|
1553
|
+
* as a complete measurement, and the profile is rewritten after every sample.
|
|
1554
|
+
*/
|
|
1555
|
+
declare const writeVitestProfile: (outputPath: string, profile: VitestProfile) => Promise<void>;
|
|
1556
|
+
/**
|
|
1557
|
+
* Take `samples` serial Vitest runs at one worker count and persist the profile
|
|
1558
|
+
* after each one. Samples never overlap: concurrent runs would measure CPU and
|
|
1559
|
+
* I/O contention instead of the worker count under test. A failing sample
|
|
1560
|
+
* throws `VitestProfileError` with the partial profile already written.
|
|
1561
|
+
*/
|
|
1562
|
+
declare const runVitestProfile: (options: VitestProfileOptions, dependencies?: VitestProfileDependencies) => Promise<VitestProfile>;
|
|
1563
|
+
//#endregion
|
|
1564
|
+
//#region src/vitest-profile-reader.d.ts
|
|
1565
|
+
/**
|
|
1566
|
+
* Outcome of reading one candidate document. `unrecognized` carries the first
|
|
1567
|
+
* reason the document failed — an analyzer reports it verbatim rather than
|
|
1568
|
+
* treating an unreadable profile as an empty one.
|
|
1569
|
+
*/
|
|
1570
|
+
type VitestProfileReadResult = {
|
|
1571
|
+
kind: "profile";
|
|
1572
|
+
profile: VitestProfile;
|
|
1573
|
+
} | {
|
|
1574
|
+
kind: "unrecognized";
|
|
1575
|
+
reason: string;
|
|
1576
|
+
};
|
|
1577
|
+
/**
|
|
1578
|
+
* Check one parsed JSON document against the profile contract the writer
|
|
1579
|
+
* emits. Returns the typed profile on success and the first mismatch reason
|
|
1580
|
+
* otherwise — never a partially-usable value.
|
|
1581
|
+
*/
|
|
1582
|
+
declare const readVitestProfileDocument: (value: unknown) => VitestProfileReadResult;
|
|
1583
|
+
//#endregion
|
|
1584
|
+
//#region src/verify-runner-policy.d.ts
|
|
1585
|
+
declare const DEPOT_LABEL = "depot-ubuntu-24.04";
|
|
1586
|
+
declare const HOSTED_LABEL = "ubuntu-latest";
|
|
1587
|
+
/**
|
|
1588
|
+
* Why a job runs where it does. The two Depot kinds share a label. They stay
|
|
1589
|
+
* distinct so billed-rounding jobs and long compute jobs cannot be confused
|
|
1590
|
+
* in the declaration table.
|
|
1591
|
+
*
|
|
1592
|
+
* `deploy-credentials` is legal to construct (HQ deploy).
|
|
1593
|
+
* `assertVerifyRunnerPolicy` refuses it, because a Verify workflow has no
|
|
1594
|
+
* Cloudflare production secret.
|
|
1595
|
+
*/
|
|
1596
|
+
type FactoryRunnerKind = "sustained-compute" | "rounding-tax" | "app-token" | "deploy-credentials";
|
|
1597
|
+
type FactoryRunnerHome = "depot" | "hosted";
|
|
1598
|
+
interface FactoryRunnerOverride {
|
|
1599
|
+
readonly kind: "override";
|
|
1600
|
+
readonly home: FactoryRunnerHome;
|
|
1601
|
+
readonly why: string;
|
|
1602
|
+
}
|
|
1603
|
+
type FactoryRunnerDecision = FactoryRunnerKind | FactoryRunnerOverride;
|
|
1604
|
+
interface FactoryVerifyRunner {
|
|
1605
|
+
readonly decision: FactoryRunnerDecision;
|
|
1606
|
+
readonly home: FactoryRunnerHome;
|
|
1607
|
+
readonly label: typeof DEPOT_LABEL | typeof HOSTED_LABEL;
|
|
1608
|
+
readonly why?: string;
|
|
1609
|
+
}
|
|
1610
|
+
type FactoryVerifyRunnerTable = Readonly<Record<string, FactoryVerifyRunner>>;
|
|
1611
|
+
interface FactoryVerifyRunnerPolicyInput {
|
|
1612
|
+
readonly source: string;
|
|
1613
|
+
readonly jobs: FactoryVerifyRunnerTable;
|
|
1614
|
+
}
|
|
1615
|
+
interface FactoryVerifyRunnerMismatch {
|
|
1616
|
+
readonly jobId: string;
|
|
1617
|
+
readonly expected: string;
|
|
1618
|
+
readonly actual: string;
|
|
1619
|
+
}
|
|
1620
|
+
interface FactoryVerifyRunnerPolicyReport {
|
|
1621
|
+
readonly ok: boolean;
|
|
1622
|
+
readonly undeclared: readonly string[];
|
|
1623
|
+
readonly missing: readonly string[];
|
|
1624
|
+
readonly mismatches: readonly FactoryVerifyRunnerMismatch[];
|
|
1625
|
+
readonly forbiddenKinds: readonly string[];
|
|
1626
|
+
}
|
|
1627
|
+
declare const factoryVerifyRunner: (decision: FactoryRunnerDecision) => FactoryVerifyRunner;
|
|
1628
|
+
declare const verifyRunnerPolicy: (yaml: string, input: FactoryVerifyRunnerPolicyInput) => FactoryVerifyRunnerPolicyReport;
|
|
1629
|
+
declare const assertVerifyRunnerPolicy: (yaml: string, input: FactoryVerifyRunnerPolicyInput) => FactoryVerifyRunnerPolicyReport;
|
|
1630
|
+
//#endregion
|
|
513
1631
|
//#region src/workflow-shell-lint.d.ts
|
|
514
1632
|
/**
|
|
515
1633
|
* Parse-check the shell embedded in generated workflow YAML (#376).
|
|
@@ -561,4 +1679,4 @@ declare const assertWorkflowShellParses: (yaml: string, options: {
|
|
|
561
1679
|
readonly source: string;
|
|
562
1680
|
}) => void;
|
|
563
1681
|
//#endregion
|
|
564
|
-
export { type BundleAlchemyEntryOptions, type CheckoutStepOptions, type ExecuteAlchemyEntryOptions, type ExecuteAlchemyEntryResult, FACTORY_PROOF_GATE_APP_ID, FACTORY_PROOF_GATE_CHECK_NAME, FACTORY_PROOF_GATE_GUARD, FACTORY_PROOF_GATE_IF, FACTORY_PROOF_GATE_MODE_OUTPUT, FACTORY_PROOF_GATE_OUTPUT, FACTORY_PROOF_GATE_REASONS, FACTORY_PROOF_GATE_REASON_OUTPUT, FACTORY_PROOF_GATE_SHELL, FACTORY_PROOF_GATE_STEP_ID, type FactoryProofGateOptions, type FactoryProofGateReason, type FactoryProofGateStep, type FactoryWorkflowArtifact, type FactoryWorkflowOptions, type FactoryWorkflowSetupOptions, GitHubApiError, type GithubAppCredentials, type GithubAppTokenOptions, type InstallStepOptions, type LocalPreviewStage, type LocalPreviewStageOptions, NODE_PNPM_ACTION_FAMILY_NODE24, type NodePnpmActionFamily, type ParseLocalPreviewStageExpected, type ParsedLocalPreviewStage, type PinnedAction, type ProofReuseCommand, type ProofReuseCoverageInput, type ProofReuseCoverageReport, type SetupNodeStepOptions, type WorkflowShellParseFailure, type WorkflowStep, assertProofReuseCoverage, assertWorkflowShellParses, bundleAlchemyEntry, executeAlchemyEntry, factoryProofGateScript, factoryProofGateStep, factoryWorkflow, githubAppJwt, isLocalPreviewStage, localPreviewStage, mintInstallationToken, parseLocalPreviewStage, proofReuseCoverage, proofReuseRequiredCommands, workflowRunBlocks, workflowShellParseFailures };
|
|
1682
|
+
export { ALCHEMY_BASELINE, type AlchemyBaselinePackageJson, type AssertAlchemyBaselineInput, type BundleAlchemyEntryOptions, type CheckoutStepOptions, EXECUTE_ALCHEMY_ENTRY_MAX_BUFFER, type ExecuteAlchemyEntryOptions, type ExecuteAlchemyEntryResult, FACTORY_APP_BROKER_ORIGIN, FACTORY_APP_BROKER_PATH, FACTORY_APP_BROKER_TOKEN_PERMISSIONS, FACTORY_CANDIDATE_IMPACT_BASIS_OUTPUT, FACTORY_CANDIDATE_IMPACT_DECISION_OUTPUT, FACTORY_CANDIDATE_IMPACT_INERT_OUTPUT, FACTORY_CANDIDATE_IMPACT_STEP_ID, FACTORY_CANDIDATE_IMPACT_UNSUBSCRIBED_OUTPUT, FACTORY_CANDIDATE_PULL_REQUEST_TYPES, FACTORY_CURSOR_OIDC_AUDIENCE, FACTORY_CURSOR_OIDC_ISSUER, FACTORY_CURSOR_OIDC_JWKS_URL, FACTORY_CURSOR_OIDC_MANAGED_RUNTIME, FACTORY_LIFECYCLE_CONTRACT_JOB_ID, FACTORY_LIFECYCLE_CONTRACT_JOB_NAME, FACTORY_MERGE_FREEZE_APP_TOKEN_STEP_ID, FACTORY_MERGE_FREEZE_CHECK_NAME, FACTORY_MERGE_FREEZE_IF, FACTORY_MERGE_FREEZE_JOB_ID, FACTORY_MERGE_FREEZE_JOB_NAME, FACTORY_MERGE_FREEZE_PERMISSIONS, FACTORY_MERGE_FREEZE_VERIFY_RESULT_EXPRESSION, FACTORY_MERGE_TARGET_REF_CONDITION, FACTORY_PREVIEW_CLEANUP_AUDIT_JOB_ID, FACTORY_PREVIEW_CLEANUP_AUDIT_JOB_NAME, FACTORY_PRODUCTION_IMPACT_BASIS_OUTPUT, FACTORY_PRODUCTION_IMPACT_DECISION_OUTPUT, FACTORY_PRODUCTION_IMPACT_STEP_ID, FACTORY_PRODUCTION_IMPACT_UNSUBSCRIBED_OUTPUT, FACTORY_PROOF_GATE_APP_ID, FACTORY_PROOF_GATE_CHECK_NAME, FACTORY_PROOF_GATE_GUARD, FACTORY_PROOF_GATE_IF, FACTORY_PROOF_GATE_MODE_OUTPUT, FACTORY_PROOF_GATE_OUTPUT, FACTORY_PROOF_GATE_REASONS, FACTORY_PROOF_GATE_REASON_OUTPUT, FACTORY_PROOF_GATE_SHELL, FACTORY_PROOF_GATE_SOURCE_URL_OUTPUT, FACTORY_PROOF_GATE_STEP_ID, FACTORY_PROOF_GATE_STEP_NAME, FACTORY_PR_STATUS_HUD_APP_TOKEN_STEP_ID, FACTORY_PR_STATUS_HUD_CONCURRENCY, FACTORY_PR_STATUS_HUD_IF, FACTORY_PR_STATUS_HUD_JOB_ID, FACTORY_PR_STATUS_HUD_JOB_NAME, FACTORY_PR_STATUS_HUD_PERMISSIONS, FACTORY_PR_STATUS_HUD_PLAN_PATH, FACTORY_PUSH_IDENTITY_SCHEMA_VERSION, type FactoryCandidateImpactWorkflow, type FactoryCandidateImpactWorkflowOptions, type FactoryLifecycleContractLane, type FactoryLifecycleContractLaneOptions, type FactoryMergeFreezeJob, type FactoryMergeFreezeJobOptions, type FactoryPrStatusHudWorkflow, type FactoryPrStatusHudWorkflowOptions, type FactoryPreviewCleanupAuditJob, type FactoryPreviewCleanupDestroyJob, type FactoryPreviewCleanupTopology, type FactoryPreviewCleanupTopologyOptions, type FactoryPreviewReceiptWorkflow, type FactoryPreviewReceiptWorkflowOptions, type FactoryProductionImpactWorkflow, type FactoryProductionImpactWorkflowOptions, type FactoryProofGateOptions, type FactoryProofGateReason, type FactoryProofGateStep, type FactoryProofReusePresentationOptions, type FactoryProofReuseSummaryStep, type FactoryProofTimingStartStep, type FactoryPushIdentityConsumer, type FactoryPushIdentityConsumerOptions, type FactoryPushIdentityDisposition, type FactoryPushIdentityEnvelope, type FactoryPushIdentityProducer, type FactoryPushIdentityProducerOptions, type FactoryRunnerDecision, type FactoryRunnerHome, type FactoryRunnerKind, type FactoryRunnerOverride, type FactoryVerifyRunner, type FactoryVerifyRunnerMismatch, type FactoryVerifyRunnerPolicyInput, type FactoryVerifyRunnerPolicyReport, type FactoryVerifyRunnerTable, type FactoryWorkflowArtifact, type FactoryWorkflowOptions, type FactoryWorkflowSetupOptions, GitHubApiError, GitHubAppTokenTransportError, type GithubAppCredentials, type GithubAppInstallationPermissions, type GithubAppTokenOptions, type InstallStepOptions, type LocalPreviewStage, type LocalPreviewStageOptions, NODE_PNPM_ACTION_FAMILY_NODE24, type NodePnpmActionFamily, PREVIEW_PROOF_INVENTORY_CHECK_NAME, PREVIEW_PROOF_INVENTORY_LIST_PERMISSIONS, type ParseLocalPreviewStageExpected, type ParsedLocalPreviewStage, type PinnedAction, type PreviewProofCandidate, type PreviewProofCleanupOutcome, type PreviewProofCleanupStatus, type PreviewProofEnvelopeEvidence, type PreviewProofInventoryAccess, type PreviewProofInventoryCleanupInput, type PreviewProofInventoryListInput, type PreviewProofInventoryPersistInput, type PreviewProofInventoryStore, type PreviewProofInventoryTransport, type PreviewProofLifecycleEvent, type PreviewProofLifecycleState, type PreviewProofRegistration, type PreviewProofResolveQuery, PreviewProofTransportError, type ProofReuseCommand, type ProofReuseCoverageInput, type ProofReuseCoverageReport, SETUP_STEP_ROLES, type SetupNodeStepOptions, type SetupStepRole, UPLOAD_ARTIFACT, VITEST_PROFILE_SCHEMA_VERSION, VITEST_PROFILE_TOOL, type VitestJsonReport, type VitestProfile, type VitestProfileDependencies, type VitestProfileDurationSummary, type VitestProfileEnvironment, VitestProfileError, type VitestProfileOptions, type VitestProfileReadResult, type VitestProfileSample, type VitestProfileSampleExecution, type VitestTestStatus, type WorkflowShellParseFailure, type WorkflowStep, assertAlchemyBaseline, assertProofReuseCoverage, assertVerifyRunnerPolicy, assertWorkflowShellParses, bundleAlchemyEntry, captureVitestProfileEnvironment, executeAlchemyEntry, factoryCandidateImpactWorkflow, factoryCandidateOrPushCondition, factoryLifecycleContractLane, factoryMergeFreezeJob, factoryMergeFreezeScript, factoryPrStatusHudWorkflow, factoryPreviewCleanupTopology, factoryPreviewReceiptWorkflow, factoryProductionImpactWorkflow, factoryProofGateScript, factoryProofGateStep, factoryProofReuseSummaryStep, factoryProofTimingStartStep, factoryPushIdentityConsumer, factoryPushIdentityProducer, factoryVerifyRunner, factoryWorkflow, githubAppJwt, isLocalPreviewStage, localPreviewStage, mintInstallationToken, normalizeVitestProfileSample, parseLocalPreviewStage, previewCleanupDestroyJobId, previewProofInventory, previewProofLifecycle, productionImpactTargetOutput, proofReuseCoverage, proofReuseRequiredCommands, readVitestProfileDocument, resolveProofReuseCommands, runVitestProfile, setupStepsForRoles, verifyRunnerPolicy, workflowRunBlocks, workflowShellParseFailures, writeVitestProfile };
|