@patronage/software-factory 1.0.0-alpha.1 → 1.0.0-alpha.13
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/CONTEXT.md +10 -0
- package/README.md +14 -6
- package/dist/index.d.ts +51 -53
- package/dist/index.js +1302 -522
- package/dist/schemas.d.ts +4 -2
- package/dist/schemas.js +5 -4
- package/package.json +7 -3
package/CONTEXT.md
CHANGED
|
@@ -6,12 +6,22 @@ The shared Patronage software factory: typed lifecycle state, proof gates, and o
|
|
|
6
6
|
|
|
7
7
|
## Language
|
|
8
8
|
|
|
9
|
+
### Admission
|
|
10
|
+
|
|
11
|
+
**Candidate**: The exact patch under admission — the `headSha` / `patchId` / `mergeBaseSha` identity every piece of evidence binds to. A GitHub draft pull request is not a Candidate; GitHub's draft boolean is the machine lifecycle authority, and ready-for-review is the Candidate state. Experiment and interactive describe human intent only and create no machine states.
|
|
12
|
+
|
|
13
|
+
**Promotion**: The one transition from a draft pull request into a Candidate. `pr:publish` is the promotion verb. Its composed handoff finishes proof while draft, promotes, then evaluates Candidate demands at the unchanged head. Draft open and synchronize events run no substantive hosted Verify battery; `ready_for_review` starts the complete applicable Candidate pass.
|
|
14
|
+
|
|
9
15
|
### Proof reuse
|
|
10
16
|
|
|
11
17
|
**Proof gate**: A command that emits a typed proof — the self-timed set is `pr:verify`, `pr:review`, `pr:ready`, `boundary:check`, and `factory:closeout`; one execution is a **gate run**. Typed proof files are the source of readiness truth; prose never substitutes.
|
|
12
18
|
|
|
13
19
|
**Proof-reuse gate**: The decision that consumes trusted verification proof and determines whether hosted CI may skip work already performed. Refusing reuse runs the hosted suite; it does not fail the candidate. Defined by ADR 0022. _Avoid_: proof gate (that produces readiness proof rather than reusing it).
|
|
14
20
|
|
|
21
|
+
### Impact
|
|
22
|
+
|
|
23
|
+
**Impact**: The candidate-bound classification of which declared product targets a changed path or lockfile graph can reach. Path impact is opt-in: a target is affected if and only if a valid changed path matches one of its declared globs. A valid path matched by no target is **unsubscribed** and demands no target-scoped work, while remaining explicit in the stamp basis and human summary. Shared paths affect every target that subscribes to them. Invalid paths and unreadable or malformed required inputs still fail closed. Impact may withdraw target-scoped work; it never certifies a merge target, whose push-triggered verification stays full. Defined by ADR 0027. _Avoid_: affectedness; ownership (the declaration is a subscription, not an implicit filesystem owner).
|
|
24
|
+
|
|
15
25
|
### Planning intake
|
|
16
26
|
|
|
17
27
|
**Spec**: The single through-line planning artifact — a technical, non-technical, or blended description of the work to be built, produced by `to-spec`. The term supersedes "PRD"; older artifacts titled "PRD:" (e.g. #232) are specs by another name. _Avoid_: PRD (retired), requirements doc.
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
The factory admits a pull request from evidence bound to its candidate. It validates policy and proof; it does not schedule workers, choose models, or run reviews. Those are jobs for the harness or operator.
|
|
6
6
|
|
|
7
|
-
Admission is fail closed. A clean-session review and required verification produce typed proof, then readiness decides whether the candidate may proceed. Evidence stays current when the candidate patch is unchanged; the push-triggered Verify workflow covers integration risk on every factory merge target and
|
|
7
|
+
Admission is fail closed. A clean-session review and required verification produce typed proof, then readiness decides whether the candidate may proceed. Evidence stays current when the candidate patch is unchanged; the push-triggered Verify workflow covers integration risk on every factory merge target — `main` and the `epic/**` integration branches. When a target goes red, the factory refuses new readiness decisions and authorized arming against that target; candidates armed before the target went red can still land. Epic policy, including review minimums and auto-merge authority, lives in the boundary manifest. HQ observes this work; it never blocks a gate.
|
|
8
8
|
|
|
9
9
|
## Develop the package
|
|
10
10
|
|
|
@@ -30,18 +30,24 @@ This is the release checklist. It lives here and nowhere else; the repository ru
|
|
|
30
30
|
|
|
31
31
|
Releases are attended and hand-cut. Nothing in the factory publishes, tags, or releases on its own, and no step below may be automated as a drive-by.
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
The factory family has one version posture (ADR 0026, `docs/adr/0026-factory-family-version-lines-move-in-lockstep.md` in the source repository): `@patronage/factory-ci` moves in lockstep majors with this CLI. From factory-ci's first release in the CLI's current series onward, majors and prerelease series move together while patch and prerelease increments stay independent per package. A consumer pins a factory-ci from the same major/prerelease series as its CLI; there is no compatibility matrix. Until that first lockstep release, factory-ci's published 0.x line is the named pre-adoption state and pairs with any CLI version. `@patronage/alchemy-d1-state` keeps independent SemVer. Lockstep is a rule the maintainer follows when cutting releases, never automation.
|
|
34
|
+
|
|
35
|
+
A stacked release train has one terminal release-owning slice. Interior slices do not bump `package.json` or cut a checkpoint unless the boundary explicitly intends a separately published release at that slice: a lower-slice bump consumes the release window before the terminal slice lands, and the train must then advance the version and re-earn its terminal evidence.
|
|
36
|
+
|
|
37
|
+
A stable cut has two phases. Phase 1 is the verified package candidate: steps 1 through 4 below, ending in the attended npm publish, tag, and GitHub release. Phase 2 is post-publication stable-doc convergence: steps 5 and 6, a normal admitted docs PR followed by the read-only convergence assertion from a clean `main`. Stable docs must never claim an unpublished version, so they cannot land in the phase-1 change. Prerelease behavior is unchanged: prerelease notes may land before publish while stable docs keep naming the prior stable version.
|
|
38
|
+
|
|
39
|
+
1. Bump `package.json` to valid SemVer. The assertion derives its expected stable or prerelease channel from the version; it accepts no channel flag. Before publishing, prove production HQ accepts this candidate's proof schema. The manifest bump triggers the CI-only `HQ Deploy` workflow because HQ bundles this package's public schemas. From a clean `main`, record `RELEASE_SHA="$(git rev-parse HEAD)"`, find the `HQ Deploy` run with `gh run list --workflow "HQ Deploy" --commit "$RELEASE_SHA"`, and use `gh run watch <run-id> --exit-status`; an older green deployment does not count. Then, outside a sandbox, run `psf hq:flush --cwd <candidate-worktree>` against the candidate's retained `pr-verify-proof`. The release may proceed only when the current proof exists, the exact-SHA deployment passed, and the drain reports that proof `delivered` or `duplicate` (or no pending spool because its original delivery already succeeded), with `rejected 0` and no event remaining. This is an attended release-compatibility gate; it does not make HQ authoritative for ordinary admission.
|
|
40
|
+
2. Build and review one pnpm tarball, then publish that exact tarball per the [repository operations runbook](../docs/repository-operations.md#publishing) (attended and hand-cut). Publishing the workspace directory is not allowed because it rebuilds during `prepack` after the artifact review. **Always pass `--tag` explicitly, on every publish, prerelease or stable**: `pnpm publish "$SOFTWARE_FACTORY_TARBALL" --tag next --access public` for a prerelease, `--tag latest` for a stable cut. A filtered directory publish takes pnpm's recursive path, which passes its own `--tag` (defaulting to `latest`) to npm and therefore ignores the `publishConfig.tag: next` pin both factory packages carry; that is how 1.0.0-alpha.6 briefly took `latest` (#658). The pins stay as belt and braces, but they are not the control. Omitting the flag is not a safe failure: it moves `latest`, which the convergence assertion can only report after the fact. The attended token path does not promise an npm provenance attestation; the source SHA and reviewed tarball SRI are its operational provenance.
|
|
35
41
|
3. Cut the `software-factory-vX.Y.Z` tag and push it.
|
|
36
42
|
4. Cut the GitHub release for that tag, with notes covering features, deletions, breaking changes, and closed issues. Mark it as a prerelease exactly when its SemVer version has a prerelease component. When the release changes the profile `schemaVersion`, state it in the notes — the profile schema version is a separate axis from the package version.
|
|
37
|
-
5. Update affected `software-factory-docs/` pages. Stable docs must state the current stable version. Prerelease docs may record the candidate and its migration notes, but must not represent it as the current stable release.
|
|
38
|
-
6.
|
|
43
|
+
5. Converge the stable docs after publication. Update affected `software-factory-docs/` pages through a normal admitted docs PR. Stable docs must state the current stable version. Prerelease docs may record the candidate and its migration notes, but must not represent it as the current stable release.
|
|
44
|
+
6. After the docs PR merges, confirm the six facts converge from a clean checkout of `main`:
|
|
39
45
|
|
|
40
46
|
```bash
|
|
41
47
|
pnpm --filter @patronage/software-factory exec tsx scripts/assert-publish-manifest.ts --release .
|
|
42
48
|
```
|
|
43
49
|
|
|
44
|
-
It reads what you just did and derives the channel from the manifest version. A stable release must converge exactly among manifest, npm `latest`, non-prerelease GitHub release, tag, and stable docs. A prerelease must exist on npm, own npm `next`, leave npm `latest` at the stable docs version, and have its prerelease GitHub release and tag. It publishes nothing. Step 6 is the only step a machine performs, and it performs it after you.
|
|
50
|
+
It reads what you just did and derives the channel from the manifest version. A stable release must converge exactly among manifest, npm `latest`, non-prerelease GitHub release, tag, and stable docs. A prerelease must exist on npm, own npm `next`, leave npm `latest` at the stable docs version, and have its prerelease GitHub release and tag. The sixth fact is the factory-ci pairing above: the assertion passes while every observed published `@patronage/factory-ci` version is pre-adoption 0.x and names that state, fails once a lockstep factory-ci release exists whose newest published version is outside the CLI's major/prerelease series, and fails when the registry read yields no readable factory-ci versions or contains an entry that does not parse — missing or unreadable data is an unsatisfied fact, not pre-adoption. It publishes nothing. Step 6 is the only step a machine performs, and it performs it after you.
|
|
45
51
|
|
|
46
52
|
## Use it in a project
|
|
47
53
|
|
|
@@ -54,6 +60,8 @@ pnpm exec patronage-factory --help # or: psf --help
|
|
|
54
60
|
|
|
55
61
|
The repository profile declares its admission policy. Operator-local settings and HQ credentials are documented separately, so they do not become committed project configuration.
|
|
56
62
|
|
|
63
|
+
Generated production workflows may call `psf production:impact --before <sha> --after <sha> --github-output <path>`. The command recomputes the profile's opt-in impact subscriptions from those exact real commits and emits stable demanded/withdrawn target outputs, the changed-file decision basis, and unsubscribed paths. It only withdraws work: missing, zero, malformed, unreachable, non-ancestral, or otherwise unclassifiable identities leave every known target demanded. The factory owns this decision seam; each consumer owns its deploy jobs, commands, credentials, topology, and post-deploy convergence/no-op proof. Merge-target Verify remains full and does not consult this command.
|
|
64
|
+
|
|
57
65
|
For factory workflow, install the four canonical skills from the repository:
|
|
58
66
|
|
|
59
67
|
```bash
|
package/dist/index.d.ts
CHANGED
|
@@ -61,8 +61,8 @@ declare const boundaryReviewProofBaseSchema: z.ZodObject<{
|
|
|
61
61
|
}>;
|
|
62
62
|
producer: z.ZodString;
|
|
63
63
|
rung: z.ZodEnum<{
|
|
64
|
-
"independent-model": "independent-model";
|
|
65
64
|
oracle: "oracle";
|
|
65
|
+
"independent-model": "independent-model";
|
|
66
66
|
human: "human";
|
|
67
67
|
}>;
|
|
68
68
|
schemaVersion: z.ZodLiteral<1>;
|
|
@@ -105,8 +105,8 @@ declare const boundaryReviewProofSchema: z.ZodObject<{
|
|
|
105
105
|
}>;
|
|
106
106
|
producer: z.ZodString;
|
|
107
107
|
rung: z.ZodEnum<{
|
|
108
|
-
"independent-model": "independent-model";
|
|
109
108
|
oracle: "oracle";
|
|
109
|
+
"independent-model": "independent-model";
|
|
110
110
|
human: "human";
|
|
111
111
|
}>;
|
|
112
112
|
schemaVersion: z.ZodLiteral<1>;
|
|
@@ -145,8 +145,6 @@ interface HqIngestDependencies {
|
|
|
145
145
|
* `timeoutMs`: see the note there.
|
|
146
146
|
*/
|
|
147
147
|
journalFlushBudgetMs?: number;
|
|
148
|
-
/** @deprecated Legacy sidecars are now streamed directly; retained for API compatibility. */
|
|
149
|
-
sidecarReclaimMs?: number;
|
|
150
148
|
/**
|
|
151
149
|
* Setup budget for callers that own the process lifetime — honored AS GIVEN,
|
|
152
150
|
* above the `DEFAULT_HQ_INGEST_TIMEOUT_MS` ceiling that clamps `timeoutMs`.
|
|
@@ -184,12 +182,6 @@ interface HqSpoolEntryOutcome {
|
|
|
184
182
|
kind: string;
|
|
185
183
|
spool: string;
|
|
186
184
|
/**
|
|
187
|
-
* `migrated` belongs to the legacy JSONL journal only: the row was moved
|
|
188
|
-
* into the current spool without being delivered. The spool pass that runs
|
|
189
|
-
* after it in the same drain supersedes that line with a real outcome when
|
|
190
|
-
* it gets to the row; a `migrated` line that survives the run means the row
|
|
191
|
-
* is still waiting.
|
|
192
|
-
*
|
|
193
185
|
* `undeliverable` is the one terminal verdict (#445). Every other status
|
|
194
186
|
* describes a moment: HQ was unreachable, HQ refused this content today, the
|
|
195
187
|
* row moved. Retrying is meaningful for all of them. A wrong-origin entry is
|
|
@@ -198,13 +190,11 @@ interface HqSpoolEntryOutcome {
|
|
|
198
190
|
* run. Leaving it spooled asks the operator to retry something that provably
|
|
199
191
|
* cannot succeed, and the count it inflates is the one doctor goes red on.
|
|
200
192
|
*/
|
|
201
|
-
status: "delivered" | "duplicate" | "
|
|
193
|
+
status: "delivered" | "duplicate" | "rejected" | "undeliverable" | "unreachable";
|
|
202
194
|
}
|
|
203
195
|
interface HqSpoolFlushInput {
|
|
204
196
|
clientId: string;
|
|
205
197
|
clientSecret: string;
|
|
206
|
-
/** Repository root whose legacy `.factory-memory` spool is also drained. */
|
|
207
|
-
cwd: string;
|
|
208
198
|
/** The profile's HQ origin; entries recorded against another are refused. */
|
|
209
199
|
endpoint: string;
|
|
210
200
|
/** Operator-named spool directories; replaces the default two locations. */
|
|
@@ -239,13 +229,13 @@ interface HqSpoolFlushSummary {
|
|
|
239
229
|
interface HqSpoolWorkCount {
|
|
240
230
|
/**
|
|
241
231
|
* The earliest moment learned across pending spool files (their own write
|
|
242
|
-
* time)
|
|
232
|
+
* time). Absent only when
|
|
243
233
|
* `pending` is `0`, or when every timestamp source was unreadable within
|
|
244
234
|
* budget — an estimate for doctor's remediation message (#394), never a
|
|
245
235
|
* precise audit trail.
|
|
246
236
|
*/
|
|
247
237
|
oldestQueuedAt?: string;
|
|
248
|
-
/** Spooled events
|
|
238
|
+
/** Spooled events waiting in the locations below. */
|
|
249
239
|
pending: number;
|
|
250
240
|
/** Locations that exist and hold spooled work. */
|
|
251
241
|
spools: string[];
|
|
@@ -266,7 +256,7 @@ interface HqSpoolWorkCount {
|
|
|
266
256
|
* same locations `flushHqSpool` drains are inspected here, read-only: no
|
|
267
257
|
* directory is created, nothing is secured, and nothing is delivered.
|
|
268
258
|
*/
|
|
269
|
-
declare function countHqSpoolWork(input: Pick<HqSpoolFlushInput, "
|
|
259
|
+
declare function countHqSpoolWork(input: Pick<HqSpoolFlushInput, "explicitDirectories" | "repository">, dependencies?: {
|
|
270
260
|
budgetMs?: number;
|
|
271
261
|
env?: NodeJS.ProcessEnv;
|
|
272
262
|
}): Promise<HqSpoolWorkCount>;
|
|
@@ -275,7 +265,7 @@ interface HqSpoolOrphan {
|
|
|
275
265
|
/** The `hq-retry-spool` directory itself, ready to pass to `--dir`. */
|
|
276
266
|
directory: string;
|
|
277
267
|
oldestQueuedAt?: string;
|
|
278
|
-
/** Spooled events
|
|
268
|
+
/** Spooled events waiting there. */
|
|
279
269
|
pending: number;
|
|
280
270
|
/**
|
|
281
271
|
* The location exists but could not be listed. As everywhere else in this
|
|
@@ -554,8 +544,8 @@ declare const factoryProjectProfileSchema: z.ZodObject<{
|
|
|
554
544
|
name: z.ZodString;
|
|
555
545
|
scope: z.ZodOptional<z.ZodObject<{
|
|
556
546
|
classifications: z.ZodArray<z.ZodEnum<{
|
|
557
|
-
"docs/process-only": "docs/process-only";
|
|
558
547
|
trivial: "trivial";
|
|
548
|
+
"docs/process-only": "docs/process-only";
|
|
559
549
|
"non-trivial": "non-trivial";
|
|
560
550
|
}>>;
|
|
561
551
|
}, z.core.$strict>>;
|
|
@@ -1134,8 +1124,8 @@ declare const managedReadinessLedgerSchema: z.ZodObject<{
|
|
|
1134
1124
|
baseSha: z.ZodString;
|
|
1135
1125
|
blockingReasons: z.ZodArray<z.ZodString>;
|
|
1136
1126
|
classification: z.ZodEnum<{
|
|
1137
|
-
"docs/process-only": "docs/process-only";
|
|
1138
1127
|
trivial: "trivial";
|
|
1128
|
+
"docs/process-only": "docs/process-only";
|
|
1139
1129
|
"non-trivial": "non-trivial";
|
|
1140
1130
|
}>;
|
|
1141
1131
|
externalChecks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -1148,8 +1138,8 @@ declare const managedReadinessLedgerSchema: z.ZodObject<{
|
|
|
1148
1138
|
reason: z.ZodOptional<z.ZodString>;
|
|
1149
1139
|
scope: z.ZodOptional<z.ZodObject<{
|
|
1150
1140
|
classifications: z.ZodArray<z.ZodEnum<{
|
|
1151
|
-
"docs/process-only": "docs/process-only";
|
|
1152
1141
|
trivial: "trivial";
|
|
1142
|
+
"docs/process-only": "docs/process-only";
|
|
1153
1143
|
"non-trivial": "non-trivial";
|
|
1154
1144
|
}>>;
|
|
1155
1145
|
}, z.core.$strict>>;
|
|
@@ -1199,15 +1189,15 @@ declare const managedReadinessLedgerSchema: z.ZodObject<{
|
|
|
1199
1189
|
unknown: "unknown";
|
|
1200
1190
|
critical: "critical";
|
|
1201
1191
|
high: "high";
|
|
1202
|
-
medium: "medium";
|
|
1203
1192
|
low: "low";
|
|
1193
|
+
medium: "medium";
|
|
1204
1194
|
}>>;
|
|
1205
1195
|
highestOpenSeverity: z.ZodOptional<z.ZodEnum<{
|
|
1206
1196
|
unknown: "unknown";
|
|
1207
1197
|
critical: "critical";
|
|
1208
1198
|
high: "high";
|
|
1209
|
-
medium: "medium";
|
|
1210
1199
|
low: "low";
|
|
1200
|
+
medium: "medium";
|
|
1211
1201
|
}>>;
|
|
1212
1202
|
maxReviewCycles: z.ZodOptional<z.ZodNumber>;
|
|
1213
1203
|
nonBlockingFindings: z.ZodNumber;
|
|
@@ -1235,8 +1225,8 @@ declare const managedReadinessLedgerSchema: z.ZodObject<{
|
|
|
1235
1225
|
}>;
|
|
1236
1226
|
stage: z.ZodEnum<{
|
|
1237
1227
|
gate: "gate";
|
|
1238
|
-
"interior-complete": "interior-complete";
|
|
1239
1228
|
interior: "interior";
|
|
1229
|
+
"interior-complete": "interior-complete";
|
|
1240
1230
|
}>;
|
|
1241
1231
|
}, z.core.$strip>>;
|
|
1242
1232
|
reviewRuns: z.ZodOptional<z.ZodArray<z.ZodType<PrReviewResult, unknown, z.core.$ZodTypeInternals<PrReviewResult, unknown>>>>;
|
|
@@ -1372,6 +1362,7 @@ interface GitHubPullRequest {
|
|
|
1372
1362
|
baseRefName: string;
|
|
1373
1363
|
baseRefOid: string;
|
|
1374
1364
|
body: string;
|
|
1365
|
+
headRefName?: string;
|
|
1375
1366
|
headRefOid: string;
|
|
1376
1367
|
isDraft: boolean;
|
|
1377
1368
|
mergeStateStatus: string;
|
|
@@ -1527,7 +1518,7 @@ declare const impactStampSchema: z.ZodObject<{
|
|
|
1527
1518
|
conservative: "conservative";
|
|
1528
1519
|
}>;
|
|
1529
1520
|
reasons: z.ZodArray<z.ZodString>;
|
|
1530
|
-
stampVersion: z.ZodLiteral<
|
|
1521
|
+
stampVersion: z.ZodLiteral<3>;
|
|
1531
1522
|
targets: z.ZodArray<z.ZodObject<{
|
|
1532
1523
|
basis: z.ZodString;
|
|
1533
1524
|
impact: z.ZodEnum<{
|
|
@@ -1536,6 +1527,7 @@ declare const impactStampSchema: z.ZodObject<{
|
|
|
1536
1527
|
}>;
|
|
1537
1528
|
name: z.ZodString;
|
|
1538
1529
|
}, z.core.$strip>>;
|
|
1530
|
+
unsubscribedPaths: z.ZodArray<z.ZodString>;
|
|
1539
1531
|
}, z.core.$strip>;
|
|
1540
1532
|
type ImpactStamp = z.infer<typeof impactStampSchema>;
|
|
1541
1533
|
/**
|
|
@@ -1589,8 +1581,8 @@ declare const EVIDENCE_CHECK_TYPES: readonly ["review", "verify"];
|
|
|
1589
1581
|
type EvidenceCheckType = (typeof EVIDENCE_CHECK_TYPES)[number];
|
|
1590
1582
|
declare const requiredCheckScopeSchema: z.ZodObject<{
|
|
1591
1583
|
classifications: z.ZodArray<z.ZodEnum<{
|
|
1592
|
-
"docs/process-only": "docs/process-only";
|
|
1593
1584
|
trivial: "trivial";
|
|
1585
|
+
"docs/process-only": "docs/process-only";
|
|
1594
1586
|
"non-trivial": "non-trivial";
|
|
1595
1587
|
}>>;
|
|
1596
1588
|
}, z.core.$strict>;
|
|
@@ -1647,8 +1639,8 @@ declare const evidenceEnvelopeBaseSchema: z.ZodObject<{
|
|
|
1647
1639
|
producer: z.ZodString;
|
|
1648
1640
|
requestId: z.ZodOptional<z.ZodString>;
|
|
1649
1641
|
rung: z.ZodOptional<z.ZodEnum<{
|
|
1650
|
-
"independent-model": "independent-model";
|
|
1651
1642
|
oracle: "oracle";
|
|
1643
|
+
"independent-model": "independent-model";
|
|
1652
1644
|
human: "human";
|
|
1653
1645
|
}>>;
|
|
1654
1646
|
schemaVersion: z.ZodLiteral<1>;
|
|
@@ -1674,8 +1666,8 @@ declare const evidenceEnvelopeSchema: z.ZodObject<{
|
|
|
1674
1666
|
producer: z.ZodString;
|
|
1675
1667
|
requestId: z.ZodOptional<z.ZodString>;
|
|
1676
1668
|
rung: z.ZodOptional<z.ZodEnum<{
|
|
1677
|
-
"independent-model": "independent-model";
|
|
1678
1669
|
oracle: "oracle";
|
|
1670
|
+
"independent-model": "independent-model";
|
|
1679
1671
|
human: "human";
|
|
1680
1672
|
}>>;
|
|
1681
1673
|
schemaVersion: z.ZodLiteral<1>;
|
|
@@ -2187,9 +2179,9 @@ declare const retroEnvelopeV1Schema: z.ZodObject<{
|
|
|
2187
2179
|
kind: z.ZodLiteral<"retro-envelope">;
|
|
2188
2180
|
outcome: z.ZodOptional<z.ZodObject<{
|
|
2189
2181
|
status: z.ZodEnum<{
|
|
2190
|
-
blocked: "blocked";
|
|
2191
2182
|
success: "success";
|
|
2192
2183
|
fail: "fail";
|
|
2184
|
+
blocked: "blocked";
|
|
2193
2185
|
"ship-with-followups": "ship-with-followups";
|
|
2194
2186
|
}>;
|
|
2195
2187
|
verdict: z.ZodOptional<z.ZodString>;
|
|
@@ -2295,8 +2287,8 @@ declare const boundaryCheckProofSchema: z.ZodObject<{
|
|
|
2295
2287
|
wave: z.ZodString;
|
|
2296
2288
|
}, z.core.$strip>>;
|
|
2297
2289
|
demandedRung: z.ZodOptional<z.ZodEnum<{
|
|
2298
|
-
"independent-model": "independent-model";
|
|
2299
2290
|
oracle: "oracle";
|
|
2291
|
+
"independent-model": "independent-model";
|
|
2300
2292
|
human: "human";
|
|
2301
2293
|
}>>;
|
|
2302
2294
|
epicIssue: z.ZodNumber;
|
|
@@ -2311,8 +2303,8 @@ declare const boundaryCheckProofSchema: z.ZodObject<{
|
|
|
2311
2303
|
commentUrl: z.ZodOptional<z.ZodString>;
|
|
2312
2304
|
producer: z.ZodString;
|
|
2313
2305
|
rung: z.ZodEnum<{
|
|
2314
|
-
"independent-model": "independent-model";
|
|
2315
2306
|
oracle: "oracle";
|
|
2307
|
+
"independent-model": "independent-model";
|
|
2316
2308
|
human: "human";
|
|
2317
2309
|
}>;
|
|
2318
2310
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
@@ -2336,7 +2328,9 @@ type BoundaryCheckProofRecord = z.infer<typeof boundaryCheckProofSchema>;
|
|
|
2336
2328
|
//#endregion
|
|
2337
2329
|
//#region src/boundary-check.d.ts
|
|
2338
2330
|
interface BoundaryPullRequestRef {
|
|
2331
|
+
baseRefName?: string;
|
|
2339
2332
|
headRefOid?: string;
|
|
2333
|
+
headRefName?: string;
|
|
2340
2334
|
mergeCommitOid?: string;
|
|
2341
2335
|
number: number;
|
|
2342
2336
|
state: "OPEN" | "CLOSED" | "MERGED";
|
|
@@ -3339,8 +3333,8 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3339
3333
|
slotResolution: z.ZodObject<{
|
|
3340
3334
|
effort: z.ZodEnum<{
|
|
3341
3335
|
high: "high";
|
|
3342
|
-
medium: "medium";
|
|
3343
3336
|
low: "low";
|
|
3337
|
+
medium: "medium";
|
|
3344
3338
|
xhigh: "xhigh";
|
|
3345
3339
|
}>;
|
|
3346
3340
|
engine: z.ZodString;
|
|
@@ -3352,18 +3346,18 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3352
3346
|
}>;
|
|
3353
3347
|
model: z.ZodString;
|
|
3354
3348
|
tier: z.ZodEnum<{
|
|
3355
|
-
oracle: "oracle";
|
|
3356
3349
|
review: "review";
|
|
3357
3350
|
delegate: "delegate";
|
|
3351
|
+
oracle: "oracle";
|
|
3358
3352
|
workhorse: "workhorse";
|
|
3359
3353
|
scout: "scout";
|
|
3360
3354
|
}>;
|
|
3361
3355
|
}, z.core.$strict>;
|
|
3362
3356
|
startedAt: z.ZodString;
|
|
3363
3357
|
tier: z.ZodEnum<{
|
|
3364
|
-
oracle: "oracle";
|
|
3365
3358
|
review: "review";
|
|
3366
3359
|
delegate: "delegate";
|
|
3360
|
+
oracle: "oracle";
|
|
3367
3361
|
workhorse: "workhorse";
|
|
3368
3362
|
scout: "scout";
|
|
3369
3363
|
}>;
|
|
@@ -3418,8 +3412,8 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3418
3412
|
slotResolution: z.ZodObject<{
|
|
3419
3413
|
effort: z.ZodEnum<{
|
|
3420
3414
|
high: "high";
|
|
3421
|
-
medium: "medium";
|
|
3422
3415
|
low: "low";
|
|
3416
|
+
medium: "medium";
|
|
3423
3417
|
xhigh: "xhigh";
|
|
3424
3418
|
}>;
|
|
3425
3419
|
engine: z.ZodString;
|
|
@@ -3431,18 +3425,18 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3431
3425
|
}>;
|
|
3432
3426
|
model: z.ZodString;
|
|
3433
3427
|
tier: z.ZodEnum<{
|
|
3434
|
-
oracle: "oracle";
|
|
3435
3428
|
review: "review";
|
|
3436
3429
|
delegate: "delegate";
|
|
3430
|
+
oracle: "oracle";
|
|
3437
3431
|
workhorse: "workhorse";
|
|
3438
3432
|
scout: "scout";
|
|
3439
3433
|
}>;
|
|
3440
3434
|
}, z.core.$strict>;
|
|
3441
3435
|
startedAt: z.ZodString;
|
|
3442
3436
|
tier: z.ZodEnum<{
|
|
3443
|
-
oracle: "oracle";
|
|
3444
3437
|
review: "review";
|
|
3445
3438
|
delegate: "delegate";
|
|
3439
|
+
oracle: "oracle";
|
|
3446
3440
|
workhorse: "workhorse";
|
|
3447
3441
|
scout: "scout";
|
|
3448
3442
|
}>;
|
|
@@ -3488,8 +3482,8 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3488
3482
|
slotResolution: z.ZodObject<{
|
|
3489
3483
|
effort: z.ZodEnum<{
|
|
3490
3484
|
high: "high";
|
|
3491
|
-
medium: "medium";
|
|
3492
3485
|
low: "low";
|
|
3486
|
+
medium: "medium";
|
|
3493
3487
|
xhigh: "xhigh";
|
|
3494
3488
|
}>;
|
|
3495
3489
|
engine: z.ZodString;
|
|
@@ -3501,18 +3495,18 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3501
3495
|
}>;
|
|
3502
3496
|
model: z.ZodString;
|
|
3503
3497
|
tier: z.ZodEnum<{
|
|
3504
|
-
oracle: "oracle";
|
|
3505
3498
|
review: "review";
|
|
3506
3499
|
delegate: "delegate";
|
|
3500
|
+
oracle: "oracle";
|
|
3507
3501
|
workhorse: "workhorse";
|
|
3508
3502
|
scout: "scout";
|
|
3509
3503
|
}>;
|
|
3510
3504
|
}, z.core.$strict>;
|
|
3511
3505
|
startedAt: z.ZodString;
|
|
3512
3506
|
tier: z.ZodEnum<{
|
|
3513
|
-
oracle: "oracle";
|
|
3514
3507
|
review: "review";
|
|
3515
3508
|
delegate: "delegate";
|
|
3509
|
+
oracle: "oracle";
|
|
3516
3510
|
workhorse: "workhorse";
|
|
3517
3511
|
scout: "scout";
|
|
3518
3512
|
}>;
|
|
@@ -3557,15 +3551,15 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3557
3551
|
observedAt: string;
|
|
3558
3552
|
purpose: "review" | "code";
|
|
3559
3553
|
slotResolution: {
|
|
3560
|
-
effort: "high" | "
|
|
3554
|
+
effort: "high" | "low" | "medium" | "xhigh";
|
|
3561
3555
|
engine: string;
|
|
3562
3556
|
layerSource: "committedDefault" | "operatorSession" | "userConfig";
|
|
3563
3557
|
model: string;
|
|
3564
|
-
tier: "
|
|
3558
|
+
tier: "review" | "delegate" | "oracle" | "workhorse" | "scout";
|
|
3565
3559
|
fallbackTier?: "delegate" | undefined;
|
|
3566
3560
|
};
|
|
3567
3561
|
startedAt: string;
|
|
3568
|
-
tier: "
|
|
3562
|
+
tier: "review" | "delegate" | "oracle" | "workhorse" | "scout";
|
|
3569
3563
|
tokenUsage: {
|
|
3570
3564
|
source: "cursor-csv" | "codex-json" | "cursor-json" | "claude-json";
|
|
3571
3565
|
status: "available";
|
|
@@ -3924,26 +3918,28 @@ declare const boundaryManifestBaseSchema: z.ZodObject<{
|
|
|
3924
3918
|
boundary: z.ZodString;
|
|
3925
3919
|
closeout: z.ZodOptional<z.ZodObject<{
|
|
3926
3920
|
review: z.ZodEnum<{
|
|
3927
|
-
"independent-model": "independent-model";
|
|
3928
3921
|
oracle: "oracle";
|
|
3922
|
+
"independent-model": "independent-model";
|
|
3929
3923
|
human: "human";
|
|
3930
3924
|
}>;
|
|
3931
3925
|
}, z.core.$loose>>;
|
|
3932
3926
|
declaredBy: z.ZodString;
|
|
3927
|
+
integrationBranch: z.ZodOptional<z.ZodString>;
|
|
3933
3928
|
prs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3934
3929
|
schemaVersion: z.ZodLiteral<1>;
|
|
3935
3930
|
topology: z.ZodEnum<{
|
|
3936
|
-
"each-to-main": "each-to-main";
|
|
3937
3931
|
flagged: "flagged";
|
|
3932
|
+
"each-to-main": "each-to-main";
|
|
3938
3933
|
stacked: "stacked";
|
|
3934
|
+
"each-to-epic": "each-to-epic";
|
|
3939
3935
|
}>;
|
|
3940
3936
|
waves: z.ZodArray<z.ZodObject<{
|
|
3941
3937
|
autoMerge: z.ZodOptional<z.ZodBoolean>;
|
|
3942
3938
|
issues: z.ZodArray<z.ZodNumber>;
|
|
3943
3939
|
name: z.ZodString;
|
|
3944
3940
|
review: z.ZodEnum<{
|
|
3945
|
-
"independent-model": "independent-model";
|
|
3946
3941
|
oracle: "oracle";
|
|
3942
|
+
"independent-model": "independent-model";
|
|
3947
3943
|
human: "human";
|
|
3948
3944
|
}>;
|
|
3949
3945
|
}, z.core.$loose>>;
|
|
@@ -3952,26 +3948,28 @@ declare const boundaryManifestSchema: z.ZodObject<{
|
|
|
3952
3948
|
boundary: z.ZodString;
|
|
3953
3949
|
closeout: z.ZodOptional<z.ZodObject<{
|
|
3954
3950
|
review: z.ZodEnum<{
|
|
3955
|
-
"independent-model": "independent-model";
|
|
3956
3951
|
oracle: "oracle";
|
|
3952
|
+
"independent-model": "independent-model";
|
|
3957
3953
|
human: "human";
|
|
3958
3954
|
}>;
|
|
3959
3955
|
}, z.core.$loose>>;
|
|
3960
3956
|
declaredBy: z.ZodString;
|
|
3957
|
+
integrationBranch: z.ZodOptional<z.ZodString>;
|
|
3961
3958
|
prs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3962
3959
|
schemaVersion: z.ZodLiteral<1>;
|
|
3963
3960
|
topology: z.ZodEnum<{
|
|
3964
|
-
"each-to-main": "each-to-main";
|
|
3965
3961
|
flagged: "flagged";
|
|
3962
|
+
"each-to-main": "each-to-main";
|
|
3966
3963
|
stacked: "stacked";
|
|
3964
|
+
"each-to-epic": "each-to-epic";
|
|
3967
3965
|
}>;
|
|
3968
3966
|
waves: z.ZodArray<z.ZodObject<{
|
|
3969
3967
|
autoMerge: z.ZodOptional<z.ZodBoolean>;
|
|
3970
3968
|
issues: z.ZodArray<z.ZodNumber>;
|
|
3971
3969
|
name: z.ZodString;
|
|
3972
3970
|
review: z.ZodEnum<{
|
|
3973
|
-
"independent-model": "independent-model";
|
|
3974
3971
|
oracle: "oracle";
|
|
3972
|
+
"independent-model": "independent-model";
|
|
3975
3973
|
human: "human";
|
|
3976
3974
|
}>;
|
|
3977
3975
|
}, z.core.$loose>>;
|
|
@@ -4056,7 +4054,7 @@ declare const evaluateReadiness: (input: EvaluationInput) => {
|
|
|
4056
4054
|
ledger: {
|
|
4057
4055
|
baseSha: string;
|
|
4058
4056
|
blockingReasons: string[];
|
|
4059
|
-
classification: "docs/process-only" | "
|
|
4057
|
+
classification: "trivial" | "docs/process-only" | "non-trivial";
|
|
4060
4058
|
github: {
|
|
4061
4059
|
draft: boolean;
|
|
4062
4060
|
mergeStateStatus: string;
|
|
@@ -4105,7 +4103,7 @@ declare const evaluateReadiness: (input: EvaluationInput) => {
|
|
|
4105
4103
|
status: "satisfied" | "unmet" | "out-of-scope";
|
|
4106
4104
|
reason?: string | undefined;
|
|
4107
4105
|
scope?: {
|
|
4108
|
-
classifications: ("docs/process-only" | "
|
|
4106
|
+
classifications: ("trivial" | "docs/process-only" | "non-trivial")[];
|
|
4109
4107
|
} | undefined;
|
|
4110
4108
|
}[] | undefined;
|
|
4111
4109
|
mergeBaseSha?: string | undefined;
|
|
@@ -4121,8 +4119,8 @@ declare const evaluateReadiness: (input: EvaluationInput) => {
|
|
|
4121
4119
|
nonBlockingFindings: number;
|
|
4122
4120
|
openFindings: number;
|
|
4123
4121
|
windowExhausted: boolean;
|
|
4124
|
-
highestBlockingSeverity?: "unknown" | "critical" | "high" | "
|
|
4125
|
-
highestOpenSeverity?: "unknown" | "critical" | "high" | "
|
|
4122
|
+
highestBlockingSeverity?: "unknown" | "critical" | "high" | "low" | "medium" | undefined;
|
|
4123
|
+
highestOpenSeverity?: "unknown" | "critical" | "high" | "low" | "medium" | undefined;
|
|
4126
4124
|
maxReviewCycles?: number | undefined;
|
|
4127
4125
|
reviewCycle?: number | undefined;
|
|
4128
4126
|
staleRepeatFindings?: number | undefined;
|
|
@@ -4133,7 +4131,7 @@ declare const evaluateReadiness: (input: EvaluationInput) => {
|
|
|
4133
4131
|
interior: number;
|
|
4134
4132
|
};
|
|
4135
4133
|
nextAction: "run-gate-cycle" | "accept-nonblocking-findings" | "escalate-to-triage" | "ready-for-human" | "advance-to-gate" | "run-interior-cycle";
|
|
4136
|
-
stage: "gate" | "interior
|
|
4134
|
+
stage: "gate" | "interior" | "interior-complete";
|
|
4137
4135
|
forcedTransition?: "gate-cap-exhausted" | "interior-cap-reached" | undefined;
|
|
4138
4136
|
} | undefined;
|
|
4139
4137
|
reviewRuns?: PrReviewResult[] | undefined;
|