@patronage/factory-ci 1.0.0-alpha.22 → 1.0.0-alpha.24

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 CHANGED
@@ -79,7 +79,7 @@ const core = job("core", {
79
79
 
80
80
  Migration: upgrade `@patronage/factory-ci`, apply the shared trigger types and job condition in the TypeScript workflow source, then regenerate and commit the emitted YAML. Draft `opened` and `synchronize` events will stop running substantive Verify work. Promotion through `ready_for_review`, later non-draft Candidate events, and merge-target pushes continue to run their applicable battery. A skipped draft run is presentation, not proof.
81
81
 
82
- Production impact support follows the same ownership line. A generated deploy workflow declares only its target names and consumes the returned decision step and fail-open `demandedIf(target)` expressions:
82
+ Production impact support follows the same ownership line. A generated deploy workflow declares only its target names and consumes the returned decision step and fail-open `demandedIf(target, decisionJob)` expressions:
83
83
 
84
84
  ```ts
85
85
  const impact = factoryProductionImpactWorkflow({
@@ -111,6 +111,7 @@ import {
111
111
  factoryPushIdentityProducer,
112
112
  factoryWorkflow,
113
113
  NODE_PNPM_ACTION_FAMILY_NODE24,
114
+ UPLOAD_ARTIFACT,
114
115
  } from "@patronage/factory-ci";
115
116
 
116
117
  const workflowArtifact = factoryWorkflow({
@@ -120,10 +121,7 @@ const workflowArtifact = factoryWorkflow({
120
121
  tag: "v5.0.0",
121
122
  uses: "actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0",
122
123
  },
123
- uploadArtifact: {
124
- tag: "v4.6.2",
125
- uses: "actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02",
126
- },
124
+ uploadArtifact: UPLOAD_ARTIFACT,
127
125
  },
128
126
  generated: {
129
127
  source: ".github/workflows/verify.ts",
@@ -165,7 +163,7 @@ The helper selects no action family or action version. Callers pass the explicit
165
163
 
166
164
  This is identity transport and validation only. The consumer still owns the `workflow_run` trigger and branch policy, job topology and runners, deploy credentials and environments, target declarations, commands, ordering, and convergence/no-op proof. None of those belong in the identity artifact or decision job.
167
165
 
168
- Candidate pull-request routing follows the same ownership line through `factoryCandidateImpactWorkflow` (#741). A generated Verify workflow declares only its target names and consumes the returned decision step and fail-open `demandedIf(target)` expressions, so the profile's canonical impact declarations and dependency graph route the run instead of a repository-maintained path filter:
166
+ Candidate pull-request routing follows the same ownership line through `factoryCandidateImpactWorkflow` (#741). A generated Verify workflow declares only its target names and consumes the returned decision step and fail-open `demandedIf(target, decisionJob)` expressions, so the profile's canonical impact declarations and dependency graph route the run instead of a repository-maintained path filter:
169
167
 
170
168
  ```ts
171
169
  const impact = factoryCandidateImpactWorkflow({
@@ -191,7 +189,7 @@ const core = job("core", {
191
189
  });
192
190
  ```
193
191
 
194
- `demandedIf(target, decisionJob)` emits `always()` so a failed decision job still demands work, and it checks only the decision job's result. Declare the decision job as the routed job's only `needs`. A routed job with more prerequisites must add its own `needs.<job>.result == 'success'` clauses, because `always()` suppresses GitHub's implicit success gating for every dependency. The production decision seam has the same contract.
192
+ `demandedIf(target, decisionJob)` builds the cross-job condition. The decision job id is required, so a routed job cannot receive a same-job condition by accident. It emits `always()` so a failed decision job still demands work, and it checks only the decision job's result. Declare the decision job as the routed job's only `needs`. A routed job with more prerequisites must add its own `needs.<job>.result == 'success'` clauses, because `always()` suppresses GitHub's implicit success gating for every dependency. `demandedIfAtStep(target)` builds the same fail-open condition for a step inside the decision job, where the decision is read from `steps.<stepId>`. The production decision seam has the same contract.
195
193
 
196
194
  Trust boundary: candidate routing is a cost control inside the pull request's own CI, not a merge-security control. A `pull_request` run executes the PR's workflow file and install scripts, so a hostile PR can already shape any of its own job outputs — with or without this seam, exactly as with a repository path filter. Merge admission never trusts these outputs: merge-target push verification stays full and unrouted, and the factory proof chain binds to commits, not to job conditions.
197
195
 
@@ -334,10 +332,10 @@ const coreCommands = profile.verification.commands.filter(
334
332
  );
335
333
 
336
334
  const core = job("core", {
337
- // `pull-requests: read` serves the gate's default-branch merge fallback
338
- // (#611). Without it the fallback's PR lookup fails and every merge push
339
- // silently pays the full suite.
340
- permissions: { checks: "read", contents: "read", "pull-requests": "read" },
335
+ // `checks: read` is all the default PR-only gate needs. Add
336
+ // `pull-requests: read` only with `reuse: "pull-request-and-default-branch"`,
337
+ // where the merge fallback (#611) looks up the producing pull request.
338
+ permissions: { checks: "read", contents: "read" },
341
339
  steps: [
342
340
  step(factoryProofGateStep({ commands: coreCommands, surface: "core" })),
343
341
  step(factoryProofTimingStartStep()),
@@ -349,9 +347,11 @@ const core = job("core", {
349
347
 
350
348
  The **proof-reuse gate** decides whether a hosted job may reuse the local verification the factory already published for this exact head (ADR 0022). Refusing runs hosted CI; it never fails the candidate. The App identity, check name, step id, output names, guard, and every trust predicate are fixed here rather than consumer-configurable — three repositories had grown three answers to the same question and had already drifted.
351
349
 
352
- The gate runs on pull requests and on pushes to the default branch (#611). A push run first reads proof at the pushed head. A squash merge mints a new commit, so when that direct read finds no generation at all, a **merge fallback** looks up the single merged pull request whose merge commit is the pushed head and reuses that PR head's proven check run only when the merge commit's tree id equals the proven head's tree id, which makes the pushed content byte-identical to what was verified (a clean squash of an unchanged tip). Patch identity was considered and rejected as the comparator: `git patch-id` normalizes whitespace and ignores base motion, so an identical patch can still integrate into a tree nothing verified. No unique producing PR, an unreadable commit, a proof that is anything but proven, or tree drift from a dirty or stale merge all leave the direct refusal standing and run the full suite. The fallback needs `pull-requests: read` and `contents: read` on the job in addition to `checks: read`; a job that grants less loses only the fallback.
350
+ **The gate runs on pull requests only by default** (#863). A merge target's guarantee is about the whole tree, not the diff, and a candidate proof binds only the diff that candidate was scoped to. Every default-branch push therefore executes the full hosted suite, and the job needs only `checks: read`. #931 is the defect this default answers: a `main` push reused an impact-scoped candidate proof, executed no command, and left a red package unnoticed for three days.
351
+
352
+ `reuse` chooses which events may reuse proof (#873). It takes two values and nothing else, because the emitted condition is a trust predicate: a free-text override lets a consumer reuse proof on a ref nothing proved. `"pull-request"` is the default described above. `"pull-request-and-default-branch"` is the opt-out: it adds pushes to the default branch, and the consumer accepts that an impact-scoped candidate proof may gate a whole tree. Choose it when merge-target runner time matters more than that guarantee.
353
353
 
354
- `reuse` chooses which events may reuse proof (#873). It takes two values and nothing else, because the emitted condition is a trust predicate: a free-text override lets a consumer reuse proof on a ref nothing proved. `"pull-request-and-default-branch"` is the default and the behaviour above. `"pull-request"` emits `github.event_name == 'pull_request'` alone and omits the merge fallback, so every default-branch push executes the full hosted suite and the job needs only `checks: read`. Choose it when the merged commit must be verified in its own right; the consumer then owns that unconditional default-branch cost.
354
+ Under the opt-out, a push run first reads proof at the pushed head. A squash merge mints a new commit, so when that direct read finds no generation at all, a **merge fallback** looks up the single merged pull request whose merge commit is the pushed head and reuses that PR head's proven check run — only when the merge commit's tree id equals the proven head's tree id, which makes the pushed content byte-identical to what was verified (a clean squash of an unchanged tip). Patch identity was considered and rejected as the comparator: `git patch-id` normalizes whitespace and ignores base motion, so an identical patch can still integrate into a tree nothing verified. No unique producing PR, an unreadable commit, a proof that is anything but proven, or tree drift from a dirty or stale merge all leave the direct refusal standing and run the full suite. The fallback needs `pull-requests: read` and `contents: read` on the job in addition to `checks: read`; a job that grants less loses only the fallback.
355
355
 
356
356
  A proof is reusable only when the complete Checks API result (`filter=all`, every page) establishes one unambiguous newest generation by greatest `started_at`, produced by the pinned App for the exact repository and head, completed successfully with `outcome: passed`, and covering every command identity the guarded surface requires. Coverage is the union of `executedCommands` and commands released by `notRequiredCommands` only after the gate validates each release against that same proof binding's command-to-target map and identity-bound impact stamp. Missing, malformed, duplicated, affected, unknown, or differently bound release data refuses reuse and runs the hosted surface. `mode` is reported as diagnostic metadata, never authorized on: a reduced-mode proof whose executed and stamp-authorized released commands cover a surface is reusable.
357
357
 
@@ -379,7 +379,7 @@ import { bundleAlchemyEntry, executeAlchemyEntry } from "@patronage/factory-ci";
379
379
 
380
380
  `alias` is a specifier-to-target map handed to esbuild. Substitution runs before the `packages` and `external` decisions, so an aliased bare specifier is inlined even under `packages: "external"` — that is how a repo points a workspace-only or duplicated package at one file. Give absolute paths or package names; which aliases a repo needs is consumer policy and this package ships no defaults. `executeAlchemyEntry` passes its whole `bundle` option through, so the map is available there too. Because substitution runs first, an alias on `alchemy`, `effect`, or any of their subpaths would silently defeat the externals and bundle a second copy, so those keys are rejected outright. Targets are not string-matched — no rule over how a path is spelled can survive `..` segments or symlinks — so instead the build's metafile is checked afterwards and the bundle is rejected if it carries any input from a reserved package, however that file was reached. A consumer shim that re-exports `effect` by bare specifier stays external naturally and is allowed.
381
381
 
382
- `executeAlchemyEntry({ from, bundle, args, ... })` owns the repeated choreography: resolve the consumer's Alchemy CLI from `from`, bundle the entry, run that CLI under the current Node binary with the absolute bundled entry appended, and throw on spawn errors, signals, missing statuses, or non-zero exits. It returns only after status 0. Pass `bundledEntry` (absolute or cwd-relative) to skip the bundle step and reuse a path from a prior `bundleAlchemyEntry` call; `bundle` is then optional. Captured output (`stdio: "pipe"`) honors `maxBuffer` only when the caller supplies it (Node's `spawnSync` default is 1 MiB; pass `EXECUTE_ALCHEMY_ENTRY_MAX_BUFFER` for 64 MiB) and, when supplied, a `redact: (text: string) => string` hook applied to stdout and stderr before they are returned. Default `stdio: "inherit"` still streams the child unredacted. This package does not own a secret-name policy.
382
+ `executeAlchemyEntry({ from, bundle, args, ... })` owns the repeated choreography: resolve the consumer's Alchemy CLI from `from`, bundle the entry, run that CLI under the current Node binary with the absolute bundled entry appended, and throw on spawn errors, signals, missing statuses, or non-zero exits. It returns only after status 0. Options carry exactly one entry source. Pass `bundle` to bundle now, or `bundledEntry` (absolute or cwd-relative) to reuse a path from a prior `bundleAlchemyEntry` call. Passing both, or neither, does not type-check. Captured output (`stdio: "pipe"`) honors `maxBuffer` only when the caller supplies it (Node's `spawnSync` default is 1 MiB; pass `EXECUTE_ALCHEMY_ENTRY_MAX_BUFFER` for 64 MiB) and, when supplied, a `redact: (text: string) => string` hook applied to stdout and stderr before they are returned. Default `stdio: "inherit"` still streams the child unredacted. This package does not own a secret-name policy.
383
383
 
384
384
  The caller still owns deploy/destroy/plan arguments, stage admission, credentials, environment shaping, destructive-plan guards, and convergence. Failure messages never repeat arguments or environment values.
385
385
 
@@ -406,7 +406,7 @@ import { previewProofLifecycle } from "@patronage/factory-ci";
406
406
  Events:
407
407
 
408
408
  - `begin` — the pre-deploy gate. Refuses a draft, a closed PR, a dirty or mismatched worktree, and any stage the disposable grammar does not own for this PR head. Does not create a registration.
409
- - `register` — the same identity gate, plus passed smoke, passed convergence, and a passing three-way-bound evidence envelope at this head. Writes a registration with `cleanupStatus: "pending"`. Machine evidence is that envelope; this module never posts a PR comment.
409
+ - `register` — the same identity gate, plus passed smoke, passed convergence, and a passing three-way-bound evidence envelope at this head. Writes a registration with `cleanup.outcome: "pending"`. Cleanup, smoke, and convergence status live only on their nested objects, so no top-level copy can diverge from them. Machine evidence is that envelope; this module never posts a PR comment.
410
410
  - `cleanup` — records an explicit passed or failed outcome onto an existing registration. Cleanup is never inferred from whether the stage still exists. `recover` is the failed-to-resolved re-entry of this event.
411
411
 
412
412
  Proof runs entirely on one side of GitHub's draft/ready boundary: both `begin` and `register` refuse `isDraft: true`. Undraft first, then prove. Callers still own deploy, destroy, credentials, smoke probes, envelope emission, and stack names.
@@ -452,9 +452,9 @@ The factory publishes its check runs, and paitronage its proof comments, under t
452
452
 
453
453
  `mintInstallationToken({ credentials, owner, repo }, options?)` is that mechanism and nothing more. `credentials` is `{ appId, installationId?, privateKeyPath }`: the app id GitHub issued, the installation when a consumer has recorded one, and the path to the private key. The key is a _path_, not key material, so no caller has to hold a secret in memory to make this call — and **where that path comes from stays the consumer's**. Operator config, a secret manager, an environment variable: this package neither reads a config file nor knows a key-path convention. `githubAppJwt(credentials, options?)` is the signing step alone, for a caller that needs the app JWT rather than an installation token.
454
454
 
455
- Nothing is cached. The token is returned to the caller, which owns its lifetime — this module keeps no copy of the token or the key, and never writes either to any output. A failing GitHub response throws `GitHubApiError`, which carries `status` so a caller can tell a retryable failure (422, 429, 5xx) from a wrong-credentials one.
455
+ Nothing is cached. The token is returned to the caller, which owns its lifetime — this module keeps no copy of the token or the key, and never writes either to any output. Mint requests send `Connection: close` and retry transport failures — fetch rejection, timeout, a body that dies mid-read, or 408/429/5xx — with doubling backoff for three attempts by default. Exhaustion throws `GitHubAppTokenTransportError` with the attempt count and a bounded credential-free reason. Any other 4xx is GitHub's verdict and throws `GitHubApiError` on the first response without retrying. The budget is the caller's: `transportAttempts` sets the total attempts, and a caller whose mint is best-effort and already has a fallback passes `1` so the fallback stays prompt. The backoff is fixed and does not scale with `timeoutMs`.
456
456
 
457
- `options` are all injectable seams: `fetch`, `now`, `readPrivateKey`, and a `timeoutMs` per request (five seconds by default). Tests substitute the first three; production passes at most a timeout.
457
+ `options` are all injectable seams: `fetch`, `now`, `readPrivateKey`, `transportAttempts`, and a `timeoutMs` per request (five seconds by default). Tests substitute the seams; production passes at most a timeout and a budget.
458
458
 
459
459
  ### Vitest suite profiling
460
460
 
package/dist/index.d.ts CHANGED
@@ -53,6 +53,18 @@ declare const NODE_PNPM_ACTION_FAMILY_NODE24: {
53
53
  readonly uses: "pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271";
54
54
  };
55
55
  };
56
+ /**
57
+ * The one `actions/upload-artifact` pin every workflow generator shares
58
+ * (#887). Two callers pinned two different commits of the same tag family;
59
+ * naming the pin here makes that drift impossible the same way the Node/pnpm
60
+ * family does. A caller passes this through `factoryWorkflow`'s
61
+ * `additionalActions.uploadArtifact` explicitly — the catalog names the pin,
62
+ * it does not inject the upload step.
63
+ */
64
+ declare const UPLOAD_ARTIFACT: {
65
+ readonly tag: "v4.6.2";
66
+ readonly uses: "actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02";
67
+ };
56
68
  //#endregion
57
69
  //#region src/candidate-lifecycle.d.ts
58
70
  /**
@@ -205,12 +217,10 @@ interface PreviewProofRegistration {
205
217
  readonly outcome: PreviewProofCleanupStatus;
206
218
  readonly runUrl?: string;
207
219
  };
208
- readonly cleanupStatus: PreviewProofCleanupStatus;
209
220
  readonly convergence: {
210
221
  readonly detail: string;
211
222
  readonly status: "passed";
212
223
  };
213
- readonly convergenceStatus: "passed";
214
224
  readonly headSha: string;
215
225
  readonly pr: number;
216
226
  readonly proof: {
@@ -223,7 +233,6 @@ interface PreviewProofRegistration {
223
233
  readonly detail: string;
224
234
  readonly outcome: "passed";
225
235
  };
226
- readonly smokeStatus: "passed";
227
236
  readonly source: "local-self-certified";
228
237
  readonly stack: string;
229
238
  readonly stage: LocalPreviewStage;
@@ -462,6 +471,20 @@ interface FactoryWorkflowArtifact<Additional extends Readonly<Record<string, Pin
462
471
  */
463
472
  declare const factoryWorkflow: <const Additional extends Readonly<Record<string, PinnedAction>> = Record<never, never>>(options: FactoryWorkflowOptions<Additional>) => FactoryWorkflowArtifact<Additional>;
464
473
  //#endregion
474
+ //#region src/github-transport.d.ts
475
+ /**
476
+ * Bounded transport retries could not reach the GitHub App endpoint (#923).
477
+ * The reason is credential-free, so it is safe to log. Re-exported from
478
+ * `github-app-token.ts`, which owns the mint surface.
479
+ */
480
+ declare class GitHubAppTokenTransportError extends Error {
481
+ /** How many transport attempts were made before giving up. */
482
+ readonly attempts: number;
483
+ /** The last transient HTTP status, when the server answered at all. */
484
+ readonly status?: number;
485
+ constructor(reason: string, attempts: number, status?: number);
486
+ }
487
+ //#endregion
465
488
  //#region src/github-app-token.d.ts
466
489
  /**
467
490
  * What a consumer must know to mint: the app id, where the private key is, and
@@ -491,6 +514,15 @@ interface GithubAppTokenOptions {
491
514
  readPrivateKey?: (privateKeyPath: string) => Buffer | string;
492
515
  /** Per-request timeout; defaults to five seconds. */
493
516
  timeoutMs?: number;
517
+ /**
518
+ * Total transport attempts per request, the first one included. Defaults to
519
+ * three: a mint that must survive a stale keep-alive socket (#923). A caller
520
+ * whose mint is best-effort and already has a fallback passes 1, because
521
+ * retrying against a deliberately short timeout only delays that fallback
522
+ * (#938). The backoff between attempts is fixed and does not scale with
523
+ * `timeoutMs`; the two dials are unrelated.
524
+ */
525
+ transportAttempts?: number;
494
526
  }
495
527
  /**
496
528
  * The signed app JWT GitHub accepts as `Authorization: Bearer` for the App
@@ -518,22 +550,12 @@ declare const mintInstallationToken: (input: {
518
550
  //#region src/execute-alchemy-entry.d.ts
519
551
  /** Node's spawnSync default is 1 MiB; Alchemy plans routinely exceed that. */
520
552
  declare const EXECUTE_ALCHEMY_ENTRY_MAX_BUFFER: number;
521
- interface ExecuteAlchemyEntryOptions {
553
+ interface ExecuteAlchemyEntryCommon {
522
554
  /**
523
555
  * CLI arguments before the bundled entry. The absolute entry path is always
524
556
  * appended as the final argument.
525
557
  */
526
558
  readonly args: readonly string[];
527
- /**
528
- * Bundle the consumer entry before execution. Required unless `bundledEntry`
529
- * is set. Ignored when `bundledEntry` is set.
530
- */
531
- readonly bundle?: BundleAlchemyEntryOptions;
532
- /**
533
- * Already-bundled entry path. When set, skips the internal bundle step and
534
- * appends this path as the CLI's final argument.
535
- */
536
- readonly bundledEntry?: string;
537
559
  /** Child working directory. Defaults to the bundle root, then process.cwd. */
538
560
  readonly cwd?: string;
539
561
  /** Child environment. Defaults to process.env. */
@@ -556,6 +578,21 @@ interface ExecuteAlchemyEntryOptions {
556
578
  /** Child stdio. Default "inherit". */
557
579
  readonly stdio?: "inherit" | "pipe";
558
580
  }
581
+ /**
582
+ * Exactly one entry source. The union refuses `bundle` and `bundledEntry`
583
+ * together, and refuses neither, so no runtime check is needed.
584
+ */
585
+ type ExecuteAlchemyEntryOptions = ExecuteAlchemyEntryCommon & ({
586
+ /** Bundle the consumer entry before execution. */readonly bundle: BundleAlchemyEntryOptions;
587
+ readonly bundledEntry?: never;
588
+ } | {
589
+ readonly bundle?: never;
590
+ /**
591
+ * Already-bundled entry path. Skips the internal bundle step and
592
+ * appends this path as the CLI's final argument.
593
+ */
594
+ readonly bundledEntry: string;
595
+ });
559
596
  interface ExecuteAlchemyEntryResult {
560
597
  readonly bundledEntry: string;
561
598
  readonly stderr: string | null;
@@ -565,8 +602,8 @@ interface ExecuteAlchemyEntryResult {
565
602
  * Bundle a consumer-owned Alchemy entry, resolve that consumer's Alchemy CLI,
566
603
  * run it under the current Node binary, and return only on a successful exit.
567
604
  *
568
- * Pass `bundledEntry` to skip the bundle step and reuse an already-bundled
569
- * path. Captured stdout and stderr (`stdio: "pipe"`) can be redacted through
605
+ * Options carry exactly one entry source: `bundle` to bundle now, or
606
+ * `bundledEntry` to reuse an already-bundled path. Captured stdout and stderr (`stdio: "pipe"`) can be redacted through
570
607
  * `redact` before they are returned; `stdio: "inherit"` still streams the
571
608
  * child unredacted.
572
609
  *
@@ -581,10 +618,13 @@ declare const executeAlchemyEntry: (options: ExecuteAlchemyEntryOptions) => Prom
581
618
  *
582
619
  * It answers one question, before checkout and before install: may this job
583
620
  * reuse the local verification the factory already published for *this exact
584
- * head*? On a push to the merge target one fallback extends "this exact head"
585
- * to "this exact tree": a squash merge whose result tree is byte-identical to
586
- * the producing pull request's proven head tree reuses that head's proof
587
- * (#611). Refusing runs hosted CI; it never fails the candidate. Three
621
+ * head*? By default it asks that only on a pull request, so every
622
+ * default-branch push executes the full hosted suite (#863). A consumer may
623
+ * opt into `reuse: "pull-request-and-default-branch"`, where one fallback
624
+ * extends "this exact head" to "this exact tree": a squash merge whose result
625
+ * tree is byte-identical to the producing pull request's proven head tree
626
+ * reuses that head's proof (#611). Refusing runs hosted CI; it never fails
627
+ * the candidate. Three
588
628
  * repositories had independently grown their own answer to that question and
589
629
  * had already drifted apart, so the answer lives here once, with the App
590
630
  * identity, check name, step identity, output names, guard, and every trust
@@ -662,18 +702,25 @@ declare const FACTORY_PROOF_GATE_SOURCE_URL_OUTPUT = "source-check-url";
662
702
  */
663
703
  declare const FACTORY_PROOF_GATE_GUARD = "steps.factory-proof.outputs.reuse-proof != 'true'";
664
704
  /**
665
- * Pull requests, plus pushes to the merge target (#611).
705
+ * Pull requests, plus pushes to the merge target (#611) — the **opt-out**
706
+ * condition a consumer gets with `reuse: "pull-request-and-default-branch"`.
666
707
  *
667
- * The gate was pull-request-only through 1.0.0-alpha.15: a push to a
668
- * protected branch always ran the full suite, because no local proof is ever
669
- * written for the merged SHA. That still holds for the *direct* read — a
670
- * squash merge mints a new commit which is why the push path exists only
671
- * together with the merge fallback below: when no generation exists at the
672
- * merged SHA, the gate may look up the producing pull request and reuse its
673
- * head proof, but only when the merge result's tree is exactly the proven
674
- * head's tree. Deploy gates keep
675
- * waiting for a green required check at the merged SHA; a reused proof turns
676
- * that check green through the same guarded steps a pull request uses.
708
+ * It buys runner time on the merge target and pays for it in coverage. No
709
+ * local proof is ever written for a merged SHA, so the direct read finds
710
+ * nothing after a squash merge. The push path therefore exists only together
711
+ * with the merge fallback below: when no generation exists at the merged SHA,
712
+ * the gate may look up the producing pull request and reuse its head proof,
713
+ * but only when the merge result's tree is exactly the proven head's tree.
714
+ * Deploy gates keep waiting for a green required check at the merged SHA; a
715
+ * reused proof turns that check green through the same guarded steps a pull
716
+ * request uses.
717
+ *
718
+ * The trade this mode accepts: a candidate's proof may be impact-scoped, and
719
+ * an impact-scoped proof is a sound gate for the candidate and an unsound
720
+ * gate for the merge target. #931 is that defect observed — a `main` push
721
+ * reused a candidate proof, executed no command, and left a red package
722
+ * unnoticed for three days. Choose this mode only when the consumer accepts
723
+ * that risk for speed.
677
724
  *
678
725
  * The push side is deliberately the merge target only — the repository's
679
726
  * default branch — not every pushed branch. Which branches trigger a
@@ -683,16 +730,16 @@ declare const FACTORY_PROOF_GATE_GUARD = "steps.factory-proof.outputs.reuse-proo
683
730
  */
684
731
  declare const FACTORY_PROOF_GATE_IF = "github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch))";
685
732
  /**
686
- * Pull requests only — the condition a consumer gets with
687
- * `reuse: "pull-request"` (#873).
733
+ * Pull requests only — the **default** condition, and the condition a
734
+ * consumer gets with `reuse: "pull-request"` (#873, default since #863).
688
735
  *
689
- * A repository may want its default-branch pushes to always execute the full
690
- * hosted suite, whatever proof exists: the merged commit is what the fleet
691
- * deploys, so a periodic unconditional run of every command is a deliberate
692
- * cost some consumers choose to pay. This condition is that choice, expressed
693
- * once here rather than as a consumer-written override string. The mode also
694
- * skips the push-event merge fallback, so no push path can reuse proof even if
695
- * the workflow reaches the step through some other trigger.
736
+ * A merge target's guarantee is about the whole tree, not the diff. A
737
+ * candidate proof only ever binds the diff the candidate was scoped to, so
738
+ * reusing it on the merged commit proves less than the merge target needs.
739
+ * Every default-branch push therefore executes the full hosted suite,
740
+ * whatever proof exists. The mode also skips the push-event merge fallback,
741
+ * so no push path can reuse proof even if the workflow reaches the step
742
+ * through some other trigger.
696
743
  *
697
744
  * Which branches trigger the workflow at all stays repository-owned. This
698
745
  * condition only keeps the gate from consulting proof outside a pull request.
@@ -706,10 +753,12 @@ declare const FACTORY_PROOF_GATE_PULL_REQUEST_IF = "github.event_name == 'pull_r
706
753
  * unproven ref — and the emitted condition is a trust predicate. The consumer
707
754
  * chooses the mode; `factory-ci` owns what each mode emits.
708
755
  *
709
- * - `pull-request-and-default-branch` (default) pull requests plus pushes to
710
- * the merge target, with the merge fallback. Today's behaviour.
711
- * - `pull-request` pull requests only. Default-branch pushes execute the full
712
- * hosted suite, and the merge fallback is not emitted.
756
+ * - `pull-request` (default) pull requests only. Default-branch pushes
757
+ * execute the full hosted suite, and the merge fallback is not emitted.
758
+ * - `pull-request-and-default-branch` the opt-out: pull requests plus pushes
759
+ * to the merge target, with the merge fallback. It is faster on the merge
760
+ * target and it lets an impact-scoped candidate proof gate a whole tree
761
+ * (#931), so a consumer must ask for it.
713
762
  */
714
763
  type FactoryProofGateReuse = "pull-request" | "pull-request-and-default-branch";
715
764
  /**
@@ -796,10 +845,10 @@ interface FactoryProofGateOptions {
796
845
  */
797
846
  readonly commands: readonly ProofReuseCommand[];
798
847
  /**
799
- * Which events may reuse proof. Defaults to
800
- * `"pull-request-and-default-branch"`, the behaviour every consumer has
801
- * today. `"pull-request"` makes default-branch pushes execute the full
802
- * hosted suite (#873).
848
+ * Which events may reuse proof. Defaults to `"pull-request"`: every
849
+ * default-branch push executes the full hosted suite (#873, #863).
850
+ * `"pull-request-and-default-branch"` is the opt-out a consumer chooses for
851
+ * speed on the merge target, and it accepts #931's risk.
803
852
  */
804
853
  readonly reuse?: FactoryProofGateReuse;
805
854
  /** Names the suite in the job summary. Changes no trust decision. */
@@ -838,13 +887,14 @@ interface FactoryProofGateStep {
838
887
  * The step itself, structurally accepted by gagen's `step()` without adding a
839
888
  * gagen runtime dependency. It belongs first in the job it guards: a few API
840
889
  * reads with the default `GITHUB_TOKEN`, no checkout, no install, so a proven
841
- * head costs a runner nothing beyond job startup. A pull request needs
842
- * `checks: read`; the push-event merge fallback additionally reads the
843
- * producing pull request (`pull-requests: read`) and the two commit objects
844
- * whose tree ids it compares (`contents: read`). A job that grants less
845
- * loses only the fallback the failed read degrades to the full suite. A
846
- * consumer that passes `reuse: "pull-request"` emits neither the push clause
847
- * nor the fallback, and needs only `checks: read` (#873).
890
+ * head costs a runner nothing beyond job startup. The default
891
+ * `reuse: "pull-request"` emits neither the push clause nor the fallback, and
892
+ * needs only `checks: read` (#873, #863). A consumer that opts into
893
+ * `reuse: "pull-request-and-default-branch"` also runs the push-event merge
894
+ * fallback, which reads the producing pull request (`pull-requests: read`)
895
+ * and the two commit objects whose tree ids it compares (`contents: read`).
896
+ * A job that grants less loses only the fallback the failed read degrades
897
+ * to the full suite.
848
898
  *
849
899
  * A **step, not a job**, and that is not a style preference. A separate gate
850
900
  * job that errored would leave the guarded job `skipped`, and a summary job
@@ -939,8 +989,13 @@ interface FactoryCandidateImpactWorkflow {
939
989
  /** Outputs for a caller-owned decision job that subsequent jobs may consume. */
940
990
  readonly decisionJobOutputs: Readonly<Record<string, string>>;
941
991
  readonly decisionStep: WorkflowStep;
942
- /** A fail-open condition: only an explicit usable withdrawal skips work. */
943
- readonly demandedIf: (targetName: string, decisionJob?: string) => string;
992
+ /**
993
+ * A fail-open cross-job condition: only an explicit usable withdrawal skips
994
+ * work. The decision job id is required.
995
+ */
996
+ readonly demandedIf: (targetName: string, decisionJob: string) => string;
997
+ /** The same fail-open condition for a step in the decision job. */
998
+ readonly demandedIfAtStep: (targetName: string) => string;
944
999
  readonly targetOutputs: Readonly<Record<string, string>>;
945
1000
  }
946
1001
  /**
@@ -1010,6 +1065,13 @@ declare const factoryLifecycleContractLane: (declaration?: FactoryLifecycleContr
1010
1065
  * `gh` and parses the emitted payload with `validateMergeFreezeState`, so
1011
1066
  * writer and reader cannot drift silently.
1012
1067
  *
1068
+ * Those two API calls are what the reader's two settling phases observe
1069
+ * (#890). Before the POST the merge target carries no generation at all, which
1070
+ * a reader reports as `awaiting-generation` while the pushed hosted verify run
1071
+ * is still pending. Between the POST and the PATCH the generation exists with
1072
+ * no `output.text`, which a reader reports as `running-generation`. Only the
1073
+ * PATCH writes a verdict, so neither phase is one.
1074
+ *
1013
1075
  * Failure posture is deliberately fail-closed and the opposite of the
1014
1076
  * proof-reuse gate's fail-open shell: this step runs under the runner's
1015
1077
  * default `bash -e {0}`, so any API refusal aborts the step, the generation
@@ -1213,8 +1275,13 @@ interface FactoryProductionImpactWorkflow {
1213
1275
  /** Outputs for a caller-owned decision job that subsequent jobs may consume. */
1214
1276
  readonly decisionJobOutputs: Readonly<Record<string, string>>;
1215
1277
  readonly decisionStep: WorkflowStep;
1216
- /** A fail-open condition: only an explicit usable withdrawal skips work. */
1217
- readonly demandedIf: (targetName: string, decisionJob?: string) => string;
1278
+ /**
1279
+ * A fail-open cross-job condition: only an explicit usable withdrawal skips
1280
+ * work. The decision job id is required.
1281
+ */
1282
+ readonly demandedIf: (targetName: string, decisionJob: string) => string;
1283
+ /** The same fail-open condition for a step in the decision job. */
1284
+ readonly demandedIfAtStep: (targetName: string) => string;
1218
1285
  readonly targetOutputs: Readonly<Record<string, string>>;
1219
1286
  }
1220
1287
  /**
@@ -1237,7 +1304,12 @@ interface FactoryPushIdentityEnvelope {
1237
1304
  }
1238
1305
  type FactoryPushIdentityDisposition = "refused" | "usable";
1239
1306
  interface FactoryPushIdentityProducerOptions {
1240
- /** Explicit caller-owned upload-artifact pin from its workflow artifact. */
1307
+ /**
1308
+ * Explicit caller-owned upload-artifact pin from its workflow artifact.
1309
+ * Pass factory-ci's `UPLOAD_ARTIFACT` catalog export (or another
1310
+ * `actions/upload-artifact` pin); the caller wires the step, the catalog
1311
+ * only names the pin.
1312
+ */
1241
1313
  readonly uploadArtifact: PinnedAction;
1242
1314
  /** Optional consumer trigger policy combined with the required push event. */
1243
1315
  readonly if?: string;
@@ -1556,4 +1628,4 @@ declare const assertWorkflowShellParses: (yaml: string, options: {
1556
1628
  readonly source: string;
1557
1629
  }) => void;
1558
1630
  //#endregion
1559
- export { type BundleAlchemyEntryOptions, type CheckoutStepOptions, EXECUTE_ALCHEMY_ENTRY_MAX_BUFFER, type ExecuteAlchemyEntryOptions, type ExecuteAlchemyEntryResult, 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_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_PULL_REQUEST_IF, 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 FactoryProductionImpactWorkflow, type FactoryProductionImpactWorkflowOptions, type FactoryProofGateOptions, type FactoryProofGateReason, type FactoryProofGateReuse, type FactoryProofGateStep, type FactoryProofReusePresentationOptions, type FactoryProofReuseSummaryStep, type FactoryProofTimingStartStep, type FactoryPushIdentityConsumer, type FactoryPushIdentityConsumerOptions, type FactoryPushIdentityDisposition, type FactoryPushIdentityEnvelope, type FactoryPushIdentityProducer, type FactoryPushIdentityProducerOptions, type FactoryWorkflowArtifact, type FactoryWorkflowOptions, type FactoryWorkflowSetupOptions, GitHubApiError, type GithubAppCredentials, 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, type SetupNodeStepOptions, 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, assertProofReuseCoverage, assertWorkflowShellParses, bundleAlchemyEntry, captureVitestProfileEnvironment, executeAlchemyEntry, factoryCandidateImpactWorkflow, factoryCandidateOrPushCondition, factoryLifecycleContractLane, factoryMergeFreezeJob, factoryMergeFreezeScript, factoryPrStatusHudWorkflow, factoryPreviewCleanupTopology, factoryProductionImpactWorkflow, factoryProofGateScript, factoryProofGateStep, factoryProofReuseSummaryStep, factoryProofTimingStartStep, factoryPushIdentityConsumer, factoryPushIdentityProducer, factoryWorkflow, githubAppJwt, isLocalPreviewStage, localPreviewStage, mintInstallationToken, normalizeVitestProfileSample, parseLocalPreviewStage, previewCleanupDestroyJobId, previewProofInventory, previewProofLifecycle, productionImpactTargetOutput, proofReuseCoverage, proofReuseRequiredCommands, readVitestProfileDocument, resolveProofReuseCommands, runVitestProfile, workflowRunBlocks, workflowShellParseFailures, writeVitestProfile };
1631
+ export { type BundleAlchemyEntryOptions, type CheckoutStepOptions, EXECUTE_ALCHEMY_ENTRY_MAX_BUFFER, type ExecuteAlchemyEntryOptions, type ExecuteAlchemyEntryResult, 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_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_PULL_REQUEST_IF, 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 FactoryProductionImpactWorkflow, type FactoryProductionImpactWorkflowOptions, type FactoryProofGateOptions, type FactoryProofGateReason, type FactoryProofGateReuse, type FactoryProofGateStep, type FactoryProofReusePresentationOptions, type FactoryProofReuseSummaryStep, type FactoryProofTimingStartStep, type FactoryPushIdentityConsumer, type FactoryPushIdentityConsumerOptions, type FactoryPushIdentityDisposition, type FactoryPushIdentityEnvelope, type FactoryPushIdentityProducer, type FactoryPushIdentityProducerOptions, type FactoryWorkflowArtifact, type FactoryWorkflowOptions, type FactoryWorkflowSetupOptions, GitHubApiError, GitHubAppTokenTransportError, type GithubAppCredentials, 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, type SetupNodeStepOptions, 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, assertProofReuseCoverage, assertWorkflowShellParses, bundleAlchemyEntry, captureVitestProfileEnvironment, executeAlchemyEntry, factoryCandidateImpactWorkflow, factoryCandidateOrPushCondition, factoryLifecycleContractLane, factoryMergeFreezeJob, factoryMergeFreezeScript, factoryPrStatusHudWorkflow, factoryPreviewCleanupTopology, factoryProductionImpactWorkflow, factoryProofGateScript, factoryProofGateStep, factoryProofReuseSummaryStep, factoryProofTimingStartStep, factoryPushIdentityConsumer, factoryPushIdentityProducer, factoryWorkflow, githubAppJwt, isLocalPreviewStage, localPreviewStage, mintInstallationToken, normalizeVitestProfileSample, parseLocalPreviewStage, previewCleanupDestroyJobId, previewProofInventory, previewProofLifecycle, productionImpactTargetOutput, proofReuseCoverage, proofReuseRequiredCommands, readVitestProfileDocument, resolveProofReuseCommands, runVitestProfile, workflowRunBlocks, workflowShellParseFailures, writeVitestProfile };