@patronage/factory-ci 1.0.0-alpha.42 → 1.0.0-alpha.44
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 +69 -3
- package/dist/.build-fingerprint.json +1 -1
- package/dist/alchemy/index.d.ts +1 -1
- package/dist/alchemy/index.js +2 -2
- package/dist/{execute-alchemy-entry-B0lBN-YZ.js → execute-alchemy-entry-C2ZhsNTN.js} +1 -1
- package/dist/index.d.ts +298 -2
- package/dist/index.js +594 -52
- package/package.json +2 -2
- package/src/alchemy/plan-effects.ts +1 -1
- package/src/alchemy-baseline.ts +1 -1
- package/src/index.ts +44 -0
- package/src/preview-cleanup-workflow.ts +422 -0
- package/src/preview-cleanup.ts +688 -0
- package/src/proof-reuse-gate.ts +27 -7
package/README.md
CHANGED
|
@@ -308,6 +308,72 @@ const jobs = [
|
|
|
308
308
|
|
|
309
309
|
The audit job is `always()` so a failed destroy still runs the stage-wide check. It does not receive a stack name or path filter — per-stack audit filters are rejected because they trade away the whole-stage guarantee (paitronage#1143). `previewCleanupDestroyJobId(stack)` is the same id mapping callers can use when they assemble destroy jobs by hand.
|
|
310
310
|
|
|
311
|
+
### Closed-PR cleanup and the orphan sweep
|
|
312
|
+
|
|
313
|
+
`factoryPreviewCleanupWorkflow` (#1540) builds the whole cleanup on that topology, so each consumer stops carrying its own copy. It owns target discovery, the per-stack destroy matrices, outcome recording and the stage-wide audit. The consumer keeps its stack list, a one-line destroy command, a one-line residue reader, credentials and protected-stage policy.
|
|
314
|
+
|
|
315
|
+
```ts
|
|
316
|
+
import {
|
|
317
|
+
factoryPreviewCleanupWorkflow,
|
|
318
|
+
setupStepsForRoles,
|
|
319
|
+
} from "@patronage/factory-ci";
|
|
320
|
+
|
|
321
|
+
const cleanup = factoryPreviewCleanupWorkflow({
|
|
322
|
+
stacks: ["website", "loop", "flue-agents"],
|
|
323
|
+
stackAliases: { "preview-deploy-website": "website" },
|
|
324
|
+
hostedStagePrefix: "pr-", // omit when there is no hosted pr-N stage
|
|
325
|
+
environment: "preview-cleanup",
|
|
326
|
+
createGithubAppToken: generated.actions.createGithubAppToken,
|
|
327
|
+
residueCommand: "node tools/cleanup-residue.ts",
|
|
328
|
+
destroyCommand:
|
|
329
|
+
'pnpm alchemy:destroy "$FACTORY_PREVIEW_CLEANUP_STACK" "$FACTORY_PREVIEW_CLEANUP_STAGE"',
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
const setup = [
|
|
333
|
+
{
|
|
334
|
+
...generated.setupStepsByRole.checkout,
|
|
335
|
+
with: { ref: cleanup.checkoutRef },
|
|
336
|
+
},
|
|
337
|
+
...setupStepsForRoles(generated, ["setupPnpm", "setupNode", "install"]),
|
|
338
|
+
];
|
|
339
|
+
const discover = job(cleanup.discoverJob.jobId, {
|
|
340
|
+
...cleanup.discoverJob,
|
|
341
|
+
runsOn,
|
|
342
|
+
env: credentials,
|
|
343
|
+
steps: [...setup, ...cleanup.discoverJob.steps],
|
|
344
|
+
});
|
|
345
|
+
const destroys = cleanup.destroyJobs.map((destroy) =>
|
|
346
|
+
job(destroy.jobId, {
|
|
347
|
+
...destroy,
|
|
348
|
+
needs: [discover],
|
|
349
|
+
runsOn,
|
|
350
|
+
env: credentials,
|
|
351
|
+
steps: [...setup, ...destroy.steps],
|
|
352
|
+
})
|
|
353
|
+
);
|
|
354
|
+
const audit = job(cleanup.auditJob.jobId, {
|
|
355
|
+
...cleanup.auditJob,
|
|
356
|
+
needs: [discover, ...destroys],
|
|
357
|
+
runsOn,
|
|
358
|
+
env: { ...credentials, ...cleanup.auditJob.env },
|
|
359
|
+
steps: [...setup, ...cleanup.auditJob.steps],
|
|
360
|
+
});
|
|
361
|
+
workflow({
|
|
362
|
+
on: cleanup.on,
|
|
363
|
+
permissions: cleanup.permissions,
|
|
364
|
+
jobs: [discover, ...destroys, audit],
|
|
365
|
+
});
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
- **Gate.** Every credentialed job runs in the named GitHub `environment`. The discover job runs for a closed PR whose head is this repository (`FACTORY_PREVIEW_CLEANUP_PR_CLOSED_CONDITION`), on the schedule, or on a dispatch from the default branch (`FACTORY_PREVIEW_CLEANUP_SWEEP_CONDITION`). Nothing reads a production deploy flag. Check out `checkoutRef`, the default branch, never the closed head.
|
|
369
|
+
- **Discover.** For a closed PR, the PR's inventory registrations are united with the residue, keeping only `local-pr-<pr>-*` stages and the hosted `<prefix><pr>` stage in declared stacks (`discoverPreviewCleanupTargets`). The sweep keeps the residue of PRs GitHub reports closed (`discoverOrphanedPreviewCleanupTargets`, `readPullRequestStates`). It fails closed: a stage that does not parse as disposable, an undeclared stack, and an open or unknown PR are all retained. A sweep handles up to `sweep.maxTargets` targets (50) per run and leaves the rest for the next one. It takes each stage whole across its stacks, so a run goes over the cap only when its first stage alone has more stacks than the cap. Pass `sweep: false` for PR-close cleanup only.
|
|
370
|
+
- **Residue.** `residueCommand` prints `[{ "stack": …, "stage": … }]`. Map physical resources to a stack and stage before printing them; this package never guesses a resource's owner.
|
|
371
|
+
- **Destroy.** `destroyCommand` reads `$FACTORY_PREVIEW_CLEANUP_STACK` and `$FACTORY_PREVIEW_CLEANUP_STAGE` (and `$FACTORY_PREVIEW_CLEANUP_PR`), exits non-zero when it did not destroy, and may append evidence lines to `$FACTORY_PREVIEW_CLEANUP_EVIDENCE`. Matrix values reach the shell through the environment, never interpolated into the script.
|
|
372
|
+
- **Record.** After each destroy, `recordPreviewCleanupOutcome` lists the registration with the workflow token and writes the passed or failed outcome, with the evidence and run URL, through the Factory App token. A stage nothing registered records nothing. A registration whose last cleanup failed is recovered through the same transition.
|
|
373
|
+
- **Audit.** The audit re-reads the residue after every destroy and fails if any target stage remains under any stack (`assertPreviewCleanupTargetsAbsent`).
|
|
374
|
+
|
|
375
|
+
The invocable half is `psf preview:cleanup --action discover|sweep|record|audit`; the generated steps call it with `cli` (default `pnpm exec psf`).
|
|
376
|
+
|
|
311
377
|
### Merge-freeze writer job
|
|
312
378
|
|
|
313
379
|
```ts
|
|
@@ -752,7 +818,7 @@ const graph = await evaluateStack({
|
|
|
752
818
|
|
|
753
819
|
`evaluateStack` runs a stack program at one stage and returns the graph Alchemy would plan, with no state store and no network. It wraps Alchemy's `Plan.make`: the program registers its resources under a `Stack` service, then the plan builds under `inMemoryState()` at the requested `Stage`. Every provider answers its `read` and `list` probes with "absent", so the cold-adoption probe `Plan.make` makes for a resource with resolved props and no prior state never leaves the process. A stage the program returns from early (paitronage's `placeholder` stage) evaluates to an empty graph.
|
|
754
820
|
|
|
755
|
-
`program` is the effect the consumer hands `Alchemy.Stack`, not the `Alchemy.Stack(...)` value. The value captures the consumer's real `providers` and `state` layers, and at Alchemy 2.0.0-beta.
|
|
821
|
+
`program` is the effect the consumer hands `Alchemy.Stack`, not the `Alchemy.Stack(...)` value. The value captures the consumer's real `providers` and `state` layers, and at Alchemy 2.0.0-beta.83 building `Cloudflare.providers()` is not inert (`ProfileStoreLive` inside `CloudflareApiLive` writes `~/.alchemy/profiles/default`, and the layer needs the `AuthProviders` service), so evaluating the value cannot stay free of side effects. Export the program next to the stack:
|
|
756
822
|
|
|
757
823
|
```ts
|
|
758
824
|
export const program = Effect.gen(function* () {
|
|
@@ -763,7 +829,7 @@ export default Alchemy.Stack("hq", { providers, state }, program);
|
|
|
763
829
|
|
|
764
830
|
Pass `providers` when the program depends on hand-written provider layers. Every provider that layer registers keeps its identity (`stables`, `aliases`, `diff`) and loses its probes; an unregistered resource type still evaluates. Each graph resource carries the `LogicalId`, `Type`, and raw `Props` of its plan node, so a prop may hold an unresolved Alchemy output. `upstreamByProp` names, per top-level prop, the logical ids that prop's value references, which is the only way to read a cross-resource reference out of raw props: an output is a function, so the prop that holds it says nothing on its own. A prop that references nothing carries no key. The references are kept per prop and never pooled into one list, so a caller asking which resources one prop names is never answered with an id a different prop mentioned. Each binding row comes from Alchemy's Worker binding channel: `worker` is the host's logical id, `name` and `type` are the strings Alchemy emits (`d1`, `kv_namespace`, `secrets_store_secret`, and so on), and `target` is the logical id of the resource the row references, when it references one.
|
|
765
831
|
|
|
766
|
-
The caller's `providers` layer is **built** before its probes are stubbed: `evaluateStack` wraps that layer, and Alchemy's own lookup resolves each provider out of it before `read` and `list` are replaced. So any side effect a layer performs at construction — a credential read, a network call, a file write — is the caller's, and happens. This is why `Cloudflare.providers()` must not be passed: at beta.
|
|
832
|
+
The caller's `providers` layer is **built** before its probes are stubbed: `evaluateStack` wraps that layer, and Alchemy's own lookup resolves each provider out of it before `read` and `list` are replaced. So any side effect a layer performs at construction — a credential read, a network call, a file write — is the caller's, and happens. This is why `Cloudflare.providers()` must not be passed: at beta.83 its `CloudflareApiLive` still creates `~/.alchemy/profiles/default` and requires `AuthProviders` when it builds, before there is anything to stub. Beta.77 also resolved credentials there (`Credentials.fromAuthProvider`); beta.81 deferred that to first use and beta.83 still does. The no-network guarantee covers evaluation, not layer construction: pass only layers whose construction is inert.
|
|
767
833
|
|
|
768
834
|
The helper decides nothing about the graph. Invariants over it are separate exports; `assertUrlImpliesAuth` below is the first.
|
|
769
835
|
|
|
@@ -799,7 +865,7 @@ The factory's own security review prompt carries the same rule in prose, so a re
|
|
|
799
865
|
import { ALCHEMY_BASELINE, assertAlchemyBaseline } from "@patronage/factory-ci";
|
|
800
866
|
```
|
|
801
867
|
|
|
802
|
-
`ALCHEMY_BASELINE` is the exact `alchemy` and `effect` pair the fleet moves together on: `{ alchemy: "2.0.0-beta.
|
|
868
|
+
`ALCHEMY_BASELINE` is the exact `alchemy` and `effect` pair the fleet moves together on: `{ alchemy: "2.0.0-beta.83", effect: "4.0.1" }`. It is a plain constant on the root entry — it imports neither package — so any consumer can read it without installing the `./alchemy` subpath's peers.
|
|
803
869
|
|
|
804
870
|
`assertAlchemyBaseline({ packageJson })` is a consumer contract helper: it fails when the consumer's own `dependencies` or `devDependencies` pin `alchemy` or `effect` to anything other than the baseline, and it fails when only one of the pair is present. Alchemy peers on Effect, so an unpinned auto-installed Effect can drift outside the baseline while a lone `alchemy` pin would otherwise pass. Both packages remaining absent is not drift — they are optional peers of the subpath, so a consumer that never imports it, such as this package's own CLI, carries neither and passes. The pin is exact, not a range: the fleet is pre-1.0 and moves together, so a range would let one project drift silently ahead of or behind the rest. `assertAlchemyBaseline` reads only the object it is handed; it never walks the filesystem or reads a lockfile. Call it from a consumer's own contract test, passing that consumer's parsed `package.json`.
|
|
805
871
|
|
package/dist/alchemy/index.d.ts
CHANGED
|
@@ -744,7 +744,7 @@ declare const isAlchemyLifecycleError: (error: unknown) => error is AlchemyLifec
|
|
|
744
744
|
* The renderer logs every line through Effect's pretty console logger, so a
|
|
745
745
|
* line arrives as `[HH:MM:SS.mmm] INFO (#1): <line>`, and coloured when the
|
|
746
746
|
* child inherits `FORCE_COLOR`. Both wrappers are stripped before a line is
|
|
747
|
-
* read. The captured output under `tests/fixtures/plan-output/beta-
|
|
747
|
+
* read. The captured output under `tests/fixtures/plan-output/beta-83/` is
|
|
748
748
|
* the evidence for every shape this file reads.
|
|
749
749
|
*
|
|
750
750
|
* The adapter fails on anything it does not recognise: no summary, two
|
package/dist/alchemy/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as isLocalPreviewStage, n as executeAlchemyEntry, r as resolveAlchemyChildCwd, s as ALCHEMY_BASELINE } from "../execute-alchemy-entry-
|
|
1
|
+
import { i as isLocalPreviewStage, n as executeAlchemyEntry, r as resolveAlchemyChildCwd, s as ALCHEMY_BASELINE } from "../execute-alchemy-entry-C2ZhsNTN.js";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
@@ -585,7 +585,7 @@ const assertDestroyLeftNothing = async ({ stack, stage, stateReader }) => {
|
|
|
585
585
|
* The renderer logs every line through Effect's pretty console logger, so a
|
|
586
586
|
* line arrives as `[HH:MM:SS.mmm] INFO (#1): <line>`, and coloured when the
|
|
587
587
|
* child inherits `FORCE_COLOR`. Both wrappers are stripped before a line is
|
|
588
|
-
* read. The captured output under `tests/fixtures/plan-output/beta-
|
|
588
|
+
* read. The captured output under `tests/fixtures/plan-output/beta-83/` is
|
|
589
589
|
* the evidence for every shape this file reads.
|
|
590
590
|
*
|
|
591
591
|
* The adapter fails on anything it does not recognise: no summary, two
|
|
@@ -12,7 +12,7 @@ import { spawnSync } from "node:child_process";
|
|
|
12
12
|
* `effect`, so it ships from the root entry, not the `./alchemy` subpath.
|
|
13
13
|
*/
|
|
14
14
|
const ALCHEMY_BASELINE = {
|
|
15
|
-
alchemy: "2.0.0-beta.
|
|
15
|
+
alchemy: "2.0.0-beta.83",
|
|
16
16
|
effect: "4.0.1"
|
|
17
17
|
};
|
|
18
18
|
const BASELINE_PACKAGE_NAMES = Object.keys(ALCHEMY_BASELINE);
|
package/dist/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ import { StdioOptions } from "node:child_process";
|
|
|
12
12
|
* `effect`, so it ships from the root entry, not the `./alchemy` subpath.
|
|
13
13
|
*/
|
|
14
14
|
declare const ALCHEMY_BASELINE: {
|
|
15
|
-
readonly alchemy: "2.0.0-beta.
|
|
15
|
+
readonly alchemy: "2.0.0-beta.83";
|
|
16
16
|
readonly effect: "4.0.1";
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
@@ -1222,6 +1222,302 @@ declare const previewCleanupDestroyJobId: (stack: string) => string;
|
|
|
1222
1222
|
*/
|
|
1223
1223
|
declare const factoryPreviewCleanupTopology: (options: FactoryPreviewCleanupTopologyOptions) => FactoryPreviewCleanupTopology;
|
|
1224
1224
|
//#endregion
|
|
1225
|
+
//#region src/preview-cleanup.d.ts
|
|
1226
|
+
/**
|
|
1227
|
+
* Closed-PR preview cleanup and the scheduled orphan sweep (#1540).
|
|
1228
|
+
*
|
|
1229
|
+
* This module owns the consumer-neutral decisions: which stages a closed PR
|
|
1230
|
+
* left behind, which stages belong to PRs that are already closed, how a
|
|
1231
|
+
* stack-scoped destroy outcome reaches the inventory, and whether a stage is
|
|
1232
|
+
* still present afterwards. The consumer keeps its stack list, the destroy
|
|
1233
|
+
* command, the residue reader, credentials and protected-stage policy.
|
|
1234
|
+
*
|
|
1235
|
+
* Every destructive target passes through the one disposable-stage grammar
|
|
1236
|
+
* (`local-pr-<pr>-<sha>`) or the consumer's declared hosted grammar
|
|
1237
|
+
* (`<prefix><pr>`). Anything else is retained, never destroyed.
|
|
1238
|
+
*/
|
|
1239
|
+
/** One `{ stack, stage }` row from the consumer's residue reader. */
|
|
1240
|
+
interface PreviewCleanupResidue {
|
|
1241
|
+
readonly stack: string;
|
|
1242
|
+
readonly stage: string;
|
|
1243
|
+
}
|
|
1244
|
+
/** One stack-scoped destroy the cleanup workflow runs. */
|
|
1245
|
+
interface PreviewCleanupTarget {
|
|
1246
|
+
/** Present when a registration supplied the head, so the record can bind it. */
|
|
1247
|
+
readonly headSha?: string;
|
|
1248
|
+
readonly pr: number;
|
|
1249
|
+
readonly stack: string;
|
|
1250
|
+
readonly stage: string;
|
|
1251
|
+
}
|
|
1252
|
+
interface PreviewCleanupStackPolicy {
|
|
1253
|
+
/**
|
|
1254
|
+
* The consumer's hosted per-PR stage prefix, such as `"pr-"` for `pr-123`.
|
|
1255
|
+
* Omit it when the consumer has no hosted per-PR stage.
|
|
1256
|
+
*/
|
|
1257
|
+
readonly hostedStagePrefix?: string;
|
|
1258
|
+
/**
|
|
1259
|
+
* Other names the inventory or the residue reader uses for a declared stack,
|
|
1260
|
+
* mapped to that stack. A registration recorded as `preview-deploy-website`
|
|
1261
|
+
* resolves to `website` with `{ "preview-deploy-website": "website" }`.
|
|
1262
|
+
*/
|
|
1263
|
+
readonly stackAliases?: Readonly<Record<string, string>>;
|
|
1264
|
+
/** The stacks a cleanup destroys, in the consumer's own names. */
|
|
1265
|
+
readonly stacks: readonly string[];
|
|
1266
|
+
}
|
|
1267
|
+
interface DiscoverPreviewCleanupTargetsInput extends PreviewCleanupStackPolicy {
|
|
1268
|
+
readonly pr: number;
|
|
1269
|
+
/** Inventory registrations for the PR, from `previewProofInventory.list`. */
|
|
1270
|
+
readonly registrations: readonly PreviewProofRegistration[];
|
|
1271
|
+
readonly residue: readonly PreviewCleanupResidue[];
|
|
1272
|
+
}
|
|
1273
|
+
type PreviewCleanupPullRequestState = "closed" | "open";
|
|
1274
|
+
interface DiscoverOrphanedPreviewCleanupTargetsInput extends PreviewCleanupStackPolicy {
|
|
1275
|
+
/**
|
|
1276
|
+
* Targets per run; the rest wait for the next sweep. Default 50. A stage's
|
|
1277
|
+
* targets across its stacks are taken whole, so a run exceeds the cap only
|
|
1278
|
+
* when its first stage alone has more stacks than the cap.
|
|
1279
|
+
*/
|
|
1280
|
+
readonly maxTargets?: number;
|
|
1281
|
+
/**
|
|
1282
|
+
* The state GitHub reported for each PR the residue names. A PR missing
|
|
1283
|
+
* from the map is unknown, and its stages are retained.
|
|
1284
|
+
*/
|
|
1285
|
+
readonly pullRequestStates: ReadonlyMap<number, PreviewCleanupPullRequestState>;
|
|
1286
|
+
readonly residue: readonly PreviewCleanupResidue[];
|
|
1287
|
+
}
|
|
1288
|
+
interface PreviewCleanupSweep {
|
|
1289
|
+
/**
|
|
1290
|
+
* Orphaned targets left for the next sweep. A stage is never split: all of
|
|
1291
|
+
* its stacks are taken or all are deferred.
|
|
1292
|
+
*/
|
|
1293
|
+
readonly deferred: number;
|
|
1294
|
+
readonly targets: readonly PreviewCleanupTarget[];
|
|
1295
|
+
}
|
|
1296
|
+
interface RecordPreviewCleanupOutcomeInput {
|
|
1297
|
+
readonly evidence: readonly string[];
|
|
1298
|
+
readonly headSha?: string;
|
|
1299
|
+
readonly outcome: Exclude<PreviewProofCleanupStatus, "pending">;
|
|
1300
|
+
readonly owner: string;
|
|
1301
|
+
readonly pr: number;
|
|
1302
|
+
readonly repo: string;
|
|
1303
|
+
readonly runUrl?: string;
|
|
1304
|
+
readonly stack: string;
|
|
1305
|
+
readonly stackAliases?: Readonly<Record<string, string>>;
|
|
1306
|
+
readonly stage: string;
|
|
1307
|
+
}
|
|
1308
|
+
interface RecordPreviewCleanupOutcomeAccess {
|
|
1309
|
+
/**
|
|
1310
|
+
* Lists registrations. A workflow `GITHUB_TOKEN` with
|
|
1311
|
+
* `PREVIEW_PROOF_INVENTORY_LIST_PERMISSIONS`: the Factory App token has no
|
|
1312
|
+
* contents permission and cannot serve the list (#825).
|
|
1313
|
+
*/
|
|
1314
|
+
readonly read: PreviewProofInventoryAccess;
|
|
1315
|
+
/** Writes the outcome. A Factory App installation token. */
|
|
1316
|
+
readonly write: PreviewProofInventoryAccess;
|
|
1317
|
+
}
|
|
1318
|
+
type RecordPreviewCleanupOutcomeResult = {
|
|
1319
|
+
/** Destroyed but never registered: inventory residue or a hosted stage. */readonly kind: "unregistered";
|
|
1320
|
+
} | {
|
|
1321
|
+
readonly kind: "recorded" | "recovered";
|
|
1322
|
+
readonly registration: PreviewProofRegistration;
|
|
1323
|
+
};
|
|
1324
|
+
interface ReadPullRequestStatesInput {
|
|
1325
|
+
readonly owner: string;
|
|
1326
|
+
readonly prs: readonly number[];
|
|
1327
|
+
readonly repo: string;
|
|
1328
|
+
}
|
|
1329
|
+
interface ReadPullRequestStatesAccess {
|
|
1330
|
+
readonly fetch?: typeof fetch;
|
|
1331
|
+
readonly timeoutMs?: number;
|
|
1332
|
+
/** Needs `pull-requests: read`. */
|
|
1333
|
+
readonly token: string;
|
|
1334
|
+
}
|
|
1335
|
+
/** The GitHub-output key a stack's matrix and presence flag use. */
|
|
1336
|
+
declare const previewCleanupStackOutputKey: (stack: string) => string;
|
|
1337
|
+
/**
|
|
1338
|
+
* Validate a stack policy. Throws on an empty or duplicate stack list, a
|
|
1339
|
+
* stack name a shell or GitHub output could misread, an alias to an
|
|
1340
|
+
* undeclared stack, or a hosted prefix that is not `<word>-`.
|
|
1341
|
+
*/
|
|
1342
|
+
declare const assertPreviewCleanupStackPolicy: (policy: PreviewCleanupStackPolicy) => void;
|
|
1343
|
+
/** The PR a hosted stage belongs to, or `null` when it is not one. */
|
|
1344
|
+
declare const parseHostedPreviewStage: (stage: string, prefix: string) => number | null;
|
|
1345
|
+
/**
|
|
1346
|
+
* Targets for one closed PR: its inventory registrations united with the
|
|
1347
|
+
* residue the consumer still sees for it. Only the PR's own `local-pr-<pr>-*`
|
|
1348
|
+
* stages and its hosted stage survive, in declared stacks. A registration
|
|
1349
|
+
* wins a collision so its head SHA reaches the cleanup record. A registration
|
|
1350
|
+
* whose cleanup already passed is skipped unless the residue still lists it.
|
|
1351
|
+
*/
|
|
1352
|
+
declare const discoverPreviewCleanupTargets: (input: DiscoverPreviewCleanupTargetsInput) => readonly PreviewCleanupTarget[];
|
|
1353
|
+
/**
|
|
1354
|
+
* The PRs whose disposable stages appear in the residue. The sweep reads
|
|
1355
|
+
* their state before it decides anything.
|
|
1356
|
+
*/
|
|
1357
|
+
declare const previewCleanupResiduePullRequests: (policy: PreviewCleanupStackPolicy, residue: readonly PreviewCleanupResidue[]) => readonly number[];
|
|
1358
|
+
/**
|
|
1359
|
+
* Targets for the scheduled sweep: disposable residue whose PR GitHub
|
|
1360
|
+
* reports closed. It fails closed. A stage that does not parse as disposable,
|
|
1361
|
+
* a stack the consumer did not declare, and a PR that is open or whose state
|
|
1362
|
+
* is unknown are all retained.
|
|
1363
|
+
*/
|
|
1364
|
+
declare const discoverOrphanedPreviewCleanupTargets: (input: DiscoverOrphanedPreviewCleanupTargetsInput) => PreviewCleanupSweep;
|
|
1365
|
+
/**
|
|
1366
|
+
* The `$GITHUB_OUTPUT` lines the cleanup workflow's discover job publishes:
|
|
1367
|
+
* `has_targets`, `targets`, and for each declared stack `has_<key>` and
|
|
1368
|
+
* `<key>_matrix`. A stack with no target still gets `has_<key>=false`, so
|
|
1369
|
+
* its destroy job skips instead of expanding an empty matrix.
|
|
1370
|
+
*/
|
|
1371
|
+
declare const previewCleanupGithubOutput: (policy: PreviewCleanupStackPolicy, targets: readonly PreviewCleanupTarget[]) => string;
|
|
1372
|
+
/** Parse untrusted residue JSON: an array of `{ stack, stage }` rows. */
|
|
1373
|
+
declare const parsePreviewCleanupResidue: (value: unknown) => readonly PreviewCleanupResidue[];
|
|
1374
|
+
/**
|
|
1375
|
+
* Parse untrusted target JSON (the discover job's `targets` output). Every
|
|
1376
|
+
* row must still be a disposable stage owned by its own PR, so a tampered
|
|
1377
|
+
* output cannot widen the audit or a record.
|
|
1378
|
+
*/
|
|
1379
|
+
declare const parsePreviewCleanupTargets: (policy: PreviewCleanupStackPolicy, value: unknown) => readonly PreviewCleanupTarget[];
|
|
1380
|
+
/**
|
|
1381
|
+
* The whole-stage audit after every destroy. Any residue row whose stage
|
|
1382
|
+
* is a target stage fails it, whatever stack the reader assigned the row,
|
|
1383
|
+
* because a sibling stack's leftovers are the same stage's residue.
|
|
1384
|
+
*/
|
|
1385
|
+
declare const assertPreviewCleanupTargetsAbsent: (targets: readonly PreviewCleanupTarget[], residue: readonly PreviewCleanupResidue[]) => void;
|
|
1386
|
+
/**
|
|
1387
|
+
* Record one stack destroy's outcome on the inventory registration it
|
|
1388
|
+
* cleaned up. A stage nothing registered (residue-only, or a hosted stage)
|
|
1389
|
+
* returns `unregistered` without writing. A registration whose last cleanup
|
|
1390
|
+
* failed is recovered through the same cleanup transition.
|
|
1391
|
+
*/
|
|
1392
|
+
declare const recordPreviewCleanupOutcome: (input: RecordPreviewCleanupOutcomeInput, access: RecordPreviewCleanupOutcomeAccess) => Promise<RecordPreviewCleanupOutcomeResult>;
|
|
1393
|
+
/**
|
|
1394
|
+
* Ask GitHub for each PR's state. A PR GitHub does not know is left out of
|
|
1395
|
+
* the map, so the sweep retains its stages.
|
|
1396
|
+
*/
|
|
1397
|
+
declare const readPullRequestStates: (input: ReadPullRequestStatesInput, access: ReadPullRequestStatesAccess) => Promise<ReadonlyMap<number, PreviewCleanupPullRequestState>>;
|
|
1398
|
+
//#endregion
|
|
1399
|
+
//#region src/preview-cleanup-workflow.d.ts
|
|
1400
|
+
declare const FACTORY_PREVIEW_CLEANUP_DISCOVER_JOB_ID = "discover";
|
|
1401
|
+
declare const FACTORY_PREVIEW_CLEANUP_DISCOVER_JOB_NAME = "Discover preview cleanup targets";
|
|
1402
|
+
declare const FACTORY_PREVIEW_CLEANUP_DISCOVER_STEP_ID = "targets";
|
|
1403
|
+
declare const FACTORY_PREVIEW_CLEANUP_DESTROY_STEP_ID = "destroy";
|
|
1404
|
+
declare const FACTORY_PREVIEW_CLEANUP_APP_TOKEN_STEP_ID = "factory-app-token";
|
|
1405
|
+
declare const FACTORY_PREVIEW_CLEANUP_DEFAULT_SWEEP_CRON = "23 6 * * *";
|
|
1406
|
+
/**
|
|
1407
|
+
* A closed pull request whose head lives in this repository. A fork's head
|
|
1408
|
+
* never reaches a job that holds cleanup credentials.
|
|
1409
|
+
*/
|
|
1410
|
+
declare const FACTORY_PREVIEW_CLEANUP_PR_CLOSED_CONDITION = "github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request.head.repo.full_name == github.repository";
|
|
1411
|
+
/**
|
|
1412
|
+
* The sweep: the schedule, which GitHub always runs on the default branch,
|
|
1413
|
+
* or a manual dispatch from the default branch.
|
|
1414
|
+
*/
|
|
1415
|
+
declare const FACTORY_PREVIEW_CLEANUP_SWEEP_CONDITION = "github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch))";
|
|
1416
|
+
/**
|
|
1417
|
+
* The ref every cleanup job checks out: the default branch's trusted code,
|
|
1418
|
+
* never the closed PR's head. Empty on `schedule`, where the checkout
|
|
1419
|
+
* already defaults to the default branch.
|
|
1420
|
+
*/
|
|
1421
|
+
declare const FACTORY_PREVIEW_CLEANUP_CHECKOUT_REF = "${{ github.event.repository.default_branch }}";
|
|
1422
|
+
interface FactoryPreviewCleanupWorkflowOptions extends PreviewCleanupStackPolicy {
|
|
1423
|
+
readonly cli?: string;
|
|
1424
|
+
/**
|
|
1425
|
+
* The workflow's concurrency group for one destroy. It may read
|
|
1426
|
+
* `matrix.stack`, `matrix.stage` and `matrix.pr`. Share it with the
|
|
1427
|
+
* consumer's deploy job when a deploy and a destroy must not race.
|
|
1428
|
+
*/
|
|
1429
|
+
readonly concurrencyGroup?: string;
|
|
1430
|
+
/** The pinned `actions/create-github-app-token` the caller declared. */
|
|
1431
|
+
readonly createGithubAppToken: PinnedAction;
|
|
1432
|
+
/**
|
|
1433
|
+
* One shell line that destroys `$FACTORY_PREVIEW_CLEANUP_STAGE` of
|
|
1434
|
+
* `$FACTORY_PREVIEW_CLEANUP_STACK` and exits non-zero when it did not. It
|
|
1435
|
+
* may append evidence lines to `$FACTORY_PREVIEW_CLEANUP_EVIDENCE`.
|
|
1436
|
+
*/
|
|
1437
|
+
readonly destroyCommand: string;
|
|
1438
|
+
/**
|
|
1439
|
+
* The GitHub environment every job that holds cleanup credentials runs
|
|
1440
|
+
* in. Its protection rules, not a production deploy flag, gate cleanup.
|
|
1441
|
+
*/
|
|
1442
|
+
readonly environment: string;
|
|
1443
|
+
/**
|
|
1444
|
+
* One shell line that prints the consumer's residue as JSON
|
|
1445
|
+
* `[{ "stack": …, "stage": … }]` on stdout: Alchemy state and any physical
|
|
1446
|
+
* resources the consumer can attribute to a stack and stage.
|
|
1447
|
+
*/
|
|
1448
|
+
readonly residueCommand: string;
|
|
1449
|
+
/** The scheduled orphan sweep. Pass `false` to generate PR-close cleanup only. */
|
|
1450
|
+
readonly sweep?: false | {
|
|
1451
|
+
/** Defaults to `FACTORY_PREVIEW_CLEANUP_DEFAULT_SWEEP_CRON`. */readonly cron?: string;
|
|
1452
|
+
/**
|
|
1453
|
+
* Targets per sweep run. Defaults to 50. Stages are taken whole, so a
|
|
1454
|
+
* run exceeds it only when its first stage has more stacks than this.
|
|
1455
|
+
*/
|
|
1456
|
+
readonly maxTargets?: number;
|
|
1457
|
+
};
|
|
1458
|
+
}
|
|
1459
|
+
interface FactoryPreviewCleanupWorkflowJob {
|
|
1460
|
+
readonly environment: string;
|
|
1461
|
+
readonly if: string;
|
|
1462
|
+
readonly jobId: string;
|
|
1463
|
+
readonly jobName: string;
|
|
1464
|
+
readonly permissions: Readonly<Record<string, "read" | "write">>;
|
|
1465
|
+
/** Append after the caller's setup steps. */
|
|
1466
|
+
readonly steps: readonly WorkflowStep[];
|
|
1467
|
+
}
|
|
1468
|
+
interface FactoryPreviewCleanupWorkflowDiscoverJob extends FactoryPreviewCleanupWorkflowJob {
|
|
1469
|
+
readonly outputs: Readonly<Record<string, string>>;
|
|
1470
|
+
}
|
|
1471
|
+
interface FactoryPreviewCleanupWorkflowDestroyJob extends FactoryPreviewCleanupWorkflowJob {
|
|
1472
|
+
readonly concurrency: {
|
|
1473
|
+
readonly cancelInProgress: false;
|
|
1474
|
+
readonly group: string;
|
|
1475
|
+
};
|
|
1476
|
+
/** Always the discover job's id. */
|
|
1477
|
+
readonly needs: readonly string[];
|
|
1478
|
+
readonly stack: string;
|
|
1479
|
+
readonly strategy: {
|
|
1480
|
+
readonly failFast: false;
|
|
1481
|
+
readonly matrix: {
|
|
1482
|
+
readonly include: string;
|
|
1483
|
+
};
|
|
1484
|
+
};
|
|
1485
|
+
}
|
|
1486
|
+
interface FactoryPreviewCleanupWorkflowAuditJob extends FactoryPreviewCleanupWorkflowJob {
|
|
1487
|
+
/** Merge into the job's own `env` alongside the caller's credentials. */
|
|
1488
|
+
readonly env: Readonly<Record<string, string>>;
|
|
1489
|
+
/** The discover job, then every destroy job. */
|
|
1490
|
+
readonly needs: readonly string[];
|
|
1491
|
+
}
|
|
1492
|
+
interface FactoryPreviewCleanupWorkflow {
|
|
1493
|
+
readonly auditJob: FactoryPreviewCleanupWorkflowAuditJob;
|
|
1494
|
+
/** Pass to the checkout step of every job. */
|
|
1495
|
+
readonly checkoutRef: typeof FACTORY_PREVIEW_CLEANUP_CHECKOUT_REF;
|
|
1496
|
+
readonly destroyJobs: readonly FactoryPreviewCleanupWorkflowDestroyJob[];
|
|
1497
|
+
readonly discoverJob: FactoryPreviewCleanupWorkflowDiscoverJob;
|
|
1498
|
+
readonly on: Readonly<Record<string, unknown>>;
|
|
1499
|
+
readonly permissions: Readonly<{
|
|
1500
|
+
contents: "read";
|
|
1501
|
+
}>;
|
|
1502
|
+
}
|
|
1503
|
+
/**
|
|
1504
|
+
* Generate the factory-owned closed-PR preview cleanup and orphan sweep
|
|
1505
|
+
* (#1540) on top of `factoryPreviewCleanupTopology`:
|
|
1506
|
+
*
|
|
1507
|
+
* - `discover` reads the consumer's residue and, for a closed same-repo PR,
|
|
1508
|
+
* unites it with the PR's inventory registrations; for the sweep, keeps the
|
|
1509
|
+
* residue of PRs GitHub reports closed. It publishes one matrix per stack.
|
|
1510
|
+
* - one destroy job per stack runs the consumer's destroy for each matrix
|
|
1511
|
+
* target, then records the outcome on the inventory with the Factory App.
|
|
1512
|
+
* - one stage-wide audit re-reads the residue after every destroy and fails
|
|
1513
|
+
* if any target stage remains, in any stack.
|
|
1514
|
+
*
|
|
1515
|
+
* Every credentialed job runs in the consumer's GitHub environment, never
|
|
1516
|
+
* behind a production deploy flag. The caller prepends its own setup steps
|
|
1517
|
+
* (checked out at `checkoutRef`), and adds `runsOn` and credential `env`.
|
|
1518
|
+
*/
|
|
1519
|
+
declare const factoryPreviewCleanupWorkflow: (options: FactoryPreviewCleanupWorkflowOptions) => FactoryPreviewCleanupWorkflow;
|
|
1520
|
+
//#endregion
|
|
1225
1521
|
//#region src/preview-receipt-workflow.d.ts
|
|
1226
1522
|
interface FactoryPreviewReceiptWorkflowOptions {
|
|
1227
1523
|
readonly target: string;
|
|
@@ -1688,4 +1984,4 @@ declare const assertWorkflowShellParses: (yaml: string, options: {
|
|
|
1688
1984
|
readonly source: string;
|
|
1689
1985
|
}) => void;
|
|
1690
1986
|
//#endregion
|
|
1691
|
-
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 };
|
|
1987
|
+
export { ALCHEMY_BASELINE, type AlchemyBaselinePackageJson, type AssertAlchemyBaselineInput, type BundleAlchemyEntryOptions, type CheckoutStepOptions, type DiscoverOrphanedPreviewCleanupTargetsInput, type DiscoverPreviewCleanupTargetsInput, 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_APP_TOKEN_STEP_ID, FACTORY_PREVIEW_CLEANUP_AUDIT_JOB_ID, FACTORY_PREVIEW_CLEANUP_AUDIT_JOB_NAME, FACTORY_PREVIEW_CLEANUP_CHECKOUT_REF, FACTORY_PREVIEW_CLEANUP_DEFAULT_SWEEP_CRON, FACTORY_PREVIEW_CLEANUP_DESTROY_STEP_ID, FACTORY_PREVIEW_CLEANUP_DISCOVER_JOB_ID, FACTORY_PREVIEW_CLEANUP_DISCOVER_JOB_NAME, FACTORY_PREVIEW_CLEANUP_DISCOVER_STEP_ID, FACTORY_PREVIEW_CLEANUP_PR_CLOSED_CONDITION, FACTORY_PREVIEW_CLEANUP_SWEEP_CONDITION, 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 FactoryPreviewCleanupWorkflow, type FactoryPreviewCleanupWorkflowAuditJob, type FactoryPreviewCleanupWorkflowDestroyJob, type FactoryPreviewCleanupWorkflowDiscoverJob, type FactoryPreviewCleanupWorkflowJob, type FactoryPreviewCleanupWorkflowOptions, 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 PreviewCleanupPullRequestState, type PreviewCleanupResidue, type PreviewCleanupStackPolicy, type PreviewCleanupSweep, type PreviewCleanupTarget, 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, type ReadPullRequestStatesAccess, type ReadPullRequestStatesInput, type RecordPreviewCleanupOutcomeAccess, type RecordPreviewCleanupOutcomeInput, type RecordPreviewCleanupOutcomeResult, 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, assertPreviewCleanupStackPolicy, assertPreviewCleanupTargetsAbsent, assertProofReuseCoverage, assertVerifyRunnerPolicy, assertWorkflowShellParses, bundleAlchemyEntry, captureVitestProfileEnvironment, discoverOrphanedPreviewCleanupTargets, discoverPreviewCleanupTargets, executeAlchemyEntry, factoryCandidateImpactWorkflow, factoryCandidateOrPushCondition, factoryLifecycleContractLane, factoryMergeFreezeJob, factoryMergeFreezeScript, factoryPrStatusHudWorkflow, factoryPreviewCleanupTopology, factoryPreviewCleanupWorkflow, factoryPreviewReceiptWorkflow, factoryProductionImpactWorkflow, factoryProofGateScript, factoryProofGateStep, factoryProofReuseSummaryStep, factoryProofTimingStartStep, factoryPushIdentityConsumer, factoryPushIdentityProducer, factoryVerifyRunner, factoryWorkflow, githubAppJwt, isLocalPreviewStage, localPreviewStage, mintInstallationToken, normalizeVitestProfileSample, parseHostedPreviewStage, parseLocalPreviewStage, parsePreviewCleanupResidue, parsePreviewCleanupTargets, previewCleanupDestroyJobId, previewCleanupGithubOutput, previewCleanupResiduePullRequests, previewCleanupStackOutputKey, previewProofInventory, previewProofLifecycle, productionImpactTargetOutput, proofReuseCoverage, proofReuseRequiredCommands, readPullRequestStates, readVitestProfileDocument, recordPreviewCleanupOutcome, resolveProofReuseCommands, runVitestProfile, setupStepsForRoles, verifyRunnerPolicy, workflowRunBlocks, workflowShellParseFailures, writeVitestProfile };
|