@gate-forge/core 0.7.1 → 0.8.0
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/dist/classifier/bind.d.ts +2 -0
- package/dist/classifier/bind.d.ts.map +1 -1
- package/dist/classifier/bind.js +8 -0
- package/dist/classifier/bind.js.map +1 -1
- package/dist/classifier/classify.d.ts +2 -0
- package/dist/classifier/classify.d.ts.map +1 -1
- package/dist/classifier/classify.js +127 -2
- package/dist/classifier/classify.js.map +1 -1
- package/dist/classifier/index.d.ts +2 -2
- package/dist/classifier/index.d.ts.map +1 -1
- package/dist/classifier/index.js +1 -1
- package/dist/classifier/index.js.map +1 -1
- package/dist/classifier/schema.d.ts +54 -0
- package/dist/classifier/schema.d.ts.map +1 -1
- package/dist/classifier/schema.js +17 -0
- package/dist/classifier/schema.js.map +1 -1
- package/dist/config/index.d.ts +173 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +296 -1
- package/dist/config/index.js.map +1 -1
- package/dist/graph/schema.d.ts +34 -0
- package/dist/graph/schema.d.ts.map +1 -1
- package/dist/index.d.ts +80 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +58 -6
- package/dist/index.js.map +1 -1
- package/dist/mapping/resolve.d.ts +22 -1
- package/dist/mapping/resolve.d.ts.map +1 -1
- package/dist/mapping/resolve.js +71 -25
- package/dist/mapping/resolve.js.map +1 -1
- package/dist/policy/evaluate.d.ts +30 -0
- package/dist/policy/evaluate.d.ts.map +1 -1
- package/dist/policy/evaluate.js +22 -12
- package/dist/policy/evaluate.js.map +1 -1
- package/dist/quarantine/index.d.ts +82 -0
- package/dist/quarantine/index.d.ts.map +1 -0
- package/dist/quarantine/index.js +194 -0
- package/dist/quarantine/index.js.map +1 -0
- package/dist/receipt/index.d.ts +65 -1
- package/dist/receipt/index.d.ts.map +1 -1
- package/dist/receipt/index.js +115 -1
- package/dist/receipt/index.js.map +1 -1
- package/dist/report/human-message.d.ts +33 -0
- package/dist/report/human-message.d.ts.map +1 -0
- package/dist/report/human-message.js +33 -0
- package/dist/report/human-message.js.map +1 -0
- package/dist/report/index.d.ts +183 -9
- package/dist/report/index.d.ts.map +1 -1
- package/dist/report/index.js +296 -22
- package/dist/report/index.js.map +1 -1
- package/dist/schemas/adoption.d.ts +2 -0
- package/dist/schemas/adoption.d.ts.map +1 -1
- package/dist/schemas/adoption.js +6 -0
- package/dist/schemas/adoption.js.map +1 -1
- package/dist/schemas/behavior-catalog.d.ts +12 -0
- package/dist/schemas/behavior-catalog.d.ts.map +1 -1
- package/dist/schemas/behavior-evidence.d.ts +40 -0
- package/dist/schemas/behavior-evidence.d.ts.map +1 -1
- package/dist/schemas/behavior-evidence.js +9 -0
- package/dist/schemas/behavior-evidence.js.map +1 -1
- package/dist/schemas/behavior-policy.d.ts +26 -0
- package/dist/schemas/behavior-policy.d.ts.map +1 -1
- package/dist/schemas/behavior-policy.js +37 -1
- package/dist/schemas/behavior-policy.js.map +1 -1
- package/dist/schemas/execution-result.d.ts +17 -5
- package/dist/schemas/execution-result.d.ts.map +1 -1
- package/dist/schemas/execution-result.js +57 -2
- package/dist/schemas/execution-result.js.map +1 -1
- package/dist/schemas/gate-receipt.d.ts +25 -2
- package/dist/schemas/gate-receipt.d.ts.map +1 -1
- package/dist/schemas/gate-receipt.js +181 -2
- package/dist/schemas/gate-receipt.js.map +1 -1
- package/dist/schemas/index.d.ts +2 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +2 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/policy.d.ts +19 -0
- package/dist/schemas/policy.d.ts.map +1 -1
- package/dist/schemas/policy.js +36 -0
- package/dist/schemas/policy.js.map +1 -1
- package/dist/schemas/quarantine.d.ts +25 -0
- package/dist/schemas/quarantine.d.ts.map +1 -0
- package/dist/schemas/quarantine.js +34 -0
- package/dist/schemas/quarantine.js.map +1 -0
- package/dist/schemas/queue-observer.d.ts +195 -0
- package/dist/schemas/queue-observer.d.ts.map +1 -0
- package/dist/schemas/queue-observer.js +190 -0
- package/dist/schemas/queue-observer.js.map +1 -0
- package/dist/schemas/run-record.d.ts +57 -0
- package/dist/schemas/run-record.d.ts.map +1 -0
- package/dist/schemas/run-record.js +108 -0
- package/dist/schemas/run-record.js.map +1 -0
- package/dist/schemas/runtime-config.d.ts +67 -0
- package/dist/schemas/runtime-config.d.ts.map +1 -1
- package/dist/schemas/runtime-config.js +75 -1
- package/dist/schemas/runtime-config.js.map +1 -1
- package/dist/schemas/signature-profile.d.ts +99 -0
- package/dist/schemas/signature-profile.d.ts.map +1 -0
- package/dist/schemas/signature-profile.js +197 -0
- package/dist/schemas/signature-profile.js.map +1 -0
- package/dist/schemas/test-map.d.ts +4 -0
- package/dist/schemas/test-map.d.ts.map +1 -1
- package/dist/schemas/test-map.js +12 -0
- package/dist/schemas/test-map.js.map +1 -1
- package/dist/schemas/verdict.d.ts +19 -4
- package/dist/schemas/verdict.d.ts.map +1 -1
- package/dist/schemas/verdict.js +38 -4
- package/dist/schemas/verdict.js.map +1 -1
- package/dist/strictness.d.ts +102 -0
- package/dist/strictness.d.ts.map +1 -0
- package/dist/strictness.js +92 -0
- package/dist/strictness.js.map +1 -0
- package/dist/supervision/index.js +6 -6
- package/dist/supervision/index.js.map +1 -1
- package/dist/twin-paths.d.ts +125 -0
- package/dist/twin-paths.d.ts.map +1 -0
- package/dist/twin-paths.js +233 -0
- package/dist/twin-paths.js.map +1 -0
- package/dist/verdict/behavior.d.ts.map +1 -1
- package/dist/verdict/behavior.js +284 -10
- package/dist/verdict/behavior.js.map +1 -1
- package/dist/verdict/cause.d.ts.map +1 -1
- package/dist/verdict/cause.js +18 -0
- package/dist/verdict/cause.js.map +1 -1
- package/dist/verdict/evaluate.d.ts +54 -0
- package/dist/verdict/evaluate.d.ts.map +1 -1
- package/dist/verdict/evaluate.js +278 -12
- package/dist/verdict/evaluate.js.map +1 -1
- package/dist/verdict/index.d.ts +3 -3
- package/dist/verdict/index.d.ts.map +1 -1
- package/dist/verdict/index.js +3 -3
- package/dist/verdict/index.js.map +1 -1
- package/dist/verdict/pack-verifiers.d.ts +17 -3
- package/dist/verdict/pack-verifiers.d.ts.map +1 -1
- package/dist/verdict/pack-verifiers.js +47 -8
- package/dist/verdict/pack-verifiers.js.map +1 -1
- package/dist/verdict/registry.d.ts +19 -0
- package/dist/verdict/registry.d.ts.map +1 -1
- package/dist/verdict/registry.js +21 -0
- package/dist/verdict/registry.js.map +1 -1
- package/package.json +1 -1
|
@@ -57,6 +57,15 @@ export const ExecutedOutcomeSchema = z
|
|
|
57
57
|
attempt: z.number().int().min(1),
|
|
58
58
|
/** True when the instance was an expected failure (never proves behavior). */
|
|
59
59
|
expectedFailure: z.boolean(),
|
|
60
|
+
/**
|
|
61
|
+
* The id the runner itself gave this instance while it ran (e.g.
|
|
62
|
+
* Playwright's per-run test id). Natively claimed evidence is stamped
|
|
63
|
+
* with it, and it can differ from the enumerated catalog id (the
|
|
64
|
+
* trusted config lives in another directory), so a test-only re-seal
|
|
65
|
+
* needs it to attribute a carried test's records. Absent when the
|
|
66
|
+
* runner reported none.
|
|
67
|
+
*/
|
|
68
|
+
runnerTestId: z.string().min(1).optional(),
|
|
60
69
|
})
|
|
61
70
|
.strict();
|
|
62
71
|
/** One typed supervision finding (plan §5.4 run rows). */
|
|
@@ -109,6 +118,27 @@ export const TracedTestSchema = z
|
|
|
109
118
|
* The sealed execution result. Strict: unknown keys are rejected so a
|
|
110
119
|
* hostile run-state edit cannot smuggle extra authority in.
|
|
111
120
|
*/
|
|
121
|
+
/**
|
|
122
|
+
* One timing-chaos release decision (E63): what the observation proxy
|
|
123
|
+
* did to one proxied response. The route key is method + pathname, so
|
|
124
|
+
* the record can never carry a query value, a body or a credential.
|
|
125
|
+
*/
|
|
126
|
+
const ChaosScheduleEntrySchema = z
|
|
127
|
+
.object({
|
|
128
|
+
/** Supervisor-issued test id the plan released under (never a credential). */
|
|
129
|
+
session: z.string().min(1),
|
|
130
|
+
/** `METHOD /pathname` (query stripped). */
|
|
131
|
+
routeKey: z.string().min(1),
|
|
132
|
+
/** 1-based index of the request under its route key. */
|
|
133
|
+
k: z.number().int().min(1),
|
|
134
|
+
/** The planned release offset: a pure function of seed/session/route/k. */
|
|
135
|
+
plannedDelayMs: z.number().int().min(0),
|
|
136
|
+
/** Milliseconds the response was actually held back. */
|
|
137
|
+
delayMs: z.number().int().min(0),
|
|
138
|
+
/** True when the plan released this response before the previous one. */
|
|
139
|
+
releasedBefore: z.boolean(),
|
|
140
|
+
})
|
|
141
|
+
.strict();
|
|
112
142
|
export const ExecutionResultSchema = z
|
|
113
143
|
.object({
|
|
114
144
|
schemaVersion: SchemaVersionField,
|
|
@@ -125,8 +155,13 @@ export const ExecutionResultSchema = z
|
|
|
125
155
|
.object({
|
|
126
156
|
/** Runner the selection executes under. */
|
|
127
157
|
runner: z.string().min(1),
|
|
128
|
-
/**
|
|
129
|
-
|
|
158
|
+
/**
|
|
159
|
+
* Selection mode. `full-relevant-suite` is the whole relevant
|
|
160
|
+
* suite, `mapped-selection` a diff-linked slice, and
|
|
161
|
+
* `named-selection` a hand-picked `--test` list — which is only
|
|
162
|
+
* ever reported (`--result-only`), never sealed into a receipt.
|
|
163
|
+
*/
|
|
164
|
+
mode: z.enum(['full-relevant-suite', 'mapped-selection', 'named-selection']),
|
|
130
165
|
/** Exact logical keys the run was expected to cover (sorted). */
|
|
131
166
|
logicalKeys: z.array(z.string().min(1)),
|
|
132
167
|
})
|
|
@@ -183,6 +218,26 @@ export const ExecutionResultSchema = z
|
|
|
183
218
|
browsers: z.record(z.string().min(1), z.string()),
|
|
184
219
|
/** 64-hex domain-separated environment identity (node/platform/arch/engines). */
|
|
185
220
|
environmentIdentity: z.string().regex(HEX64, 'environmentIdentity must be 64-char lowercase hex'),
|
|
221
|
+
/**
|
|
222
|
+
* Timing chaos (E63): the seeded release plan this run executed
|
|
223
|
+
* under, plus the schedule the proxy actually used. Additive and
|
|
224
|
+
* optional, so every run without `--chaos` stays byte-identical.
|
|
225
|
+
* A chaos run is a FINDING tool: it never seals a receipt, so this
|
|
226
|
+
* label explains a red run instead of authorizing anything.
|
|
227
|
+
*/
|
|
228
|
+
chaos: z
|
|
229
|
+
.object({
|
|
230
|
+
/** The `--chaos <seed>` the owner replayed. */
|
|
231
|
+
seed: z.number().int().min(0),
|
|
232
|
+
/** Upper bound of every applied delay, in whole milliseconds. */
|
|
233
|
+
maxDelayMs: z.number().int().min(0),
|
|
234
|
+
/** Whether a later response may be released before an earlier one. */
|
|
235
|
+
reorder: z.boolean(),
|
|
236
|
+
/** Per-response release decisions (method + pathname, k, delay). */
|
|
237
|
+
schedule: z.array(ChaosScheduleEntrySchema),
|
|
238
|
+
})
|
|
239
|
+
.strict()
|
|
240
|
+
.optional(),
|
|
186
241
|
/** Run start instant (ISO-8601). */
|
|
187
242
|
startedAt: z.string().datetime(),
|
|
188
243
|
/** Run end instant (ISO-8601). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-result.js","sourceRoot":"","sources":["../../src/schemas/execution-result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,4EAA4E;AAC5E,MAAM,CAAC,MAAM,uBAAuB,GAAG,+BAA+B,CAAC;AAEvE,qEAAqE;AACrE,MAAM,CAAC,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AAEzD,kEAAkE;AAClE,MAAM,KAAK,GAAG,gBAAgB,CAAC;AAE/B,gEAAgE;AAChE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC;KACnC,MAAM,CAAC;IACN,iCAAiC;IACjC,UAAU,EAAE,CAAC,CAAC,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EAAE;KACxD,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -33,8 +33,8 @@ import { z } from 'zod';
|
|
|
33
33
|
* what the old seal process certified).
|
|
34
34
|
*/
|
|
35
35
|
export declare const ReceiptScopeSchema: z.ZodEnum<{
|
|
36
|
-
full: "full";
|
|
37
36
|
changed: "changed";
|
|
37
|
+
full: "full";
|
|
38
38
|
}>;
|
|
39
39
|
/** Inferred receipt-scope shape. */
|
|
40
40
|
export type ReceiptScope = z.infer<typeof ReceiptScopeSchema>;
|
|
@@ -64,8 +64,8 @@ export declare const GateReceiptSchema: z.ZodObject<{
|
|
|
64
64
|
trustedPolicyDigest: z.ZodString;
|
|
65
65
|
approvedPolicyDigest: z.ZodOptional<z.ZodString>;
|
|
66
66
|
scope: z.ZodOptional<z.ZodEnum<{
|
|
67
|
-
full: "full";
|
|
68
67
|
changed: "changed";
|
|
68
|
+
full: "full";
|
|
69
69
|
}>>;
|
|
70
70
|
coveredObligationFingerprints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
71
71
|
invocation: z.ZodString;
|
|
@@ -76,10 +76,33 @@ export declare const GateReceiptSchema: z.ZodObject<{
|
|
|
76
76
|
behaviorCatalogDigest: z.ZodString;
|
|
77
77
|
requiredCaseSetDigest: z.ZodString;
|
|
78
78
|
caseExecutionDigest: z.ZodString;
|
|
79
|
+
engine: z.ZodOptional<z.ZodObject<{
|
|
80
|
+
version: z.ZodString;
|
|
81
|
+
source: z.ZodString;
|
|
82
|
+
unpublished: z.ZodBoolean;
|
|
83
|
+
}, z.core.$strict>>;
|
|
84
|
+
receiptStage: z.ZodOptional<z.ZodEnum<{
|
|
85
|
+
"pre-push": "pre-push";
|
|
86
|
+
"pre-commit": "pre-commit";
|
|
87
|
+
ci: "ci";
|
|
88
|
+
}>>;
|
|
89
|
+
carriedFrom: z.ZodOptional<z.ZodString>;
|
|
90
|
+
parentReceiptDigest: z.ZodOptional<z.ZodString>;
|
|
91
|
+
resealedFrom: z.ZodOptional<z.ZodString>;
|
|
92
|
+
resealedFromKind: z.ZodOptional<z.ZodEnum<{
|
|
93
|
+
receipt: "receipt";
|
|
94
|
+
"run-record": "run-record";
|
|
95
|
+
}>>;
|
|
96
|
+
carriedTests: z.ZodOptional<z.ZodNumber>;
|
|
97
|
+
rerunTests: z.ZodOptional<z.ZodNumber>;
|
|
98
|
+
changeClass: z.ZodOptional<z.ZodLiteral<"test-only">>;
|
|
99
|
+
changedPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
100
|
+
resealDisregarded: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
79
101
|
engineBundleDigest: z.ZodString;
|
|
80
102
|
executionBoundaryDigest: z.ZodString;
|
|
81
103
|
targetArtifactDigest: z.ZodString;
|
|
82
104
|
evidenceAttestationDigest: z.ZodNullable<z.ZodString>;
|
|
105
|
+
carriedEvidenceDigest: z.ZodOptional<z.ZodString>;
|
|
83
106
|
verdictSummary: z.ZodObject<{
|
|
84
107
|
total: z.ZodNumber;
|
|
85
108
|
satisfied: z.ZodNumber;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gate-receipt.d.ts","sourceRoot":"","sources":["../../src/schemas/gate-receipt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB;;;EAA8B,CAAC;AAE9D,oCAAoC;AACpC,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,mDAAmD;AACnD,eAAO,MAAM,2BAA2B;;;;;kBAmBpC,CAAC;AAEL,8CAA8C;AAC9C,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAGhF;;;GAGG;AACH,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"gate-receipt.d.ts","sourceRoot":"","sources":["../../src/schemas/gate-receipt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB;;;EAA8B,CAAC;AAE9D,oCAAoC;AACpC,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,mDAAmD;AACnD,eAAO,MAAM,2BAA2B;;;;;kBAmBpC,CAAC;AAEL,8CAA8C;AAC9C,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAGhF;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAgW1B,CAAC;AAEL,mCAAmC;AACnC,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -158,9 +158,78 @@ export const GateReceiptSchema = z
|
|
|
158
158
|
*/
|
|
159
159
|
caseExecutionDigest: z.string().regex(HEX64, 'caseExecutionDigest must be 64-char lowercase hex'),
|
|
160
160
|
/**
|
|
161
|
-
*
|
|
162
|
-
*
|
|
161
|
+
* ADDITIVE engine identity for comparing the installed CLI version
|
|
162
|
+
* with the version that sealed this receipt. Optional so receipts
|
|
163
|
+
* issued before this field retain their existing verification behavior.
|
|
163
164
|
*/
|
|
165
|
+
engine: z
|
|
166
|
+
.object({
|
|
167
|
+
version: z.string().min(1),
|
|
168
|
+
source: z.string().min(1),
|
|
169
|
+
unpublished: z.boolean(),
|
|
170
|
+
})
|
|
171
|
+
.strict()
|
|
172
|
+
.optional(),
|
|
173
|
+
/** Additive stage that the installation configured for receipt enforcement. */
|
|
174
|
+
receiptStage: z.enum(['pre-push', 'pre-commit', 'ci']).optional(),
|
|
175
|
+
/** Commit sha of the full-scope receipt carried into this candidate. */
|
|
176
|
+
carriedFrom: z.string().regex(/^[0-9a-f]{40}$/, 'carriedFrom must be a 40-char lowercase sha1 hex').optional(),
|
|
177
|
+
/** Digest of the authenticated parent receipt whose proof was carried. */
|
|
178
|
+
parentReceiptDigest: z.string().regex(HEX64, 'parentReceiptDigest must be 64-char lowercase hex').optional(),
|
|
179
|
+
/**
|
|
180
|
+
* ADDITIVE test-only re-seal binding: the 64-hex digest of the
|
|
181
|
+
* VERIFIED parent receipt this run re-sealed from. Equal to
|
|
182
|
+
* `parentReceiptDigest` (which stays the carried-proof binding) and
|
|
183
|
+
* present only on a re-sealed receipt — a run that re-ran exactly
|
|
184
|
+
* the tests a test-only change can affect and carried the rest from
|
|
185
|
+
* the parent. The recomputation is the consumer's job: CI (and the
|
|
186
|
+
* broker) diff the two sealed trees themselves and recompute the
|
|
187
|
+
* classification, never trusting the claimed change class.
|
|
188
|
+
*/
|
|
189
|
+
resealedFrom: z.string().regex(HEX64, 'resealedFrom must be 64-char lowercase hex').optional(),
|
|
190
|
+
/**
|
|
191
|
+
* ADDITIVE: WHICH kind of parent document `resealedFrom` names —
|
|
192
|
+
* `receipt` (a verified gate receipt) or `run-record` (a whole-suite
|
|
193
|
+
* run record, the only parent a run that sealed no receipt can
|
|
194
|
+
* have). Absent reads as `receipt`, so every re-sealed receipt
|
|
195
|
+
* sealed before this field existed keeps verifying unchanged. A
|
|
196
|
+
* `run-record` re-seal carries NO `parentReceiptDigest` (there is no
|
|
197
|
+
* parent receipt to name) and the consumer recomputes the run
|
|
198
|
+
* record exactly like a parent receipt.
|
|
199
|
+
*/
|
|
200
|
+
resealedFromKind: z.enum(['receipt', 'run-record']).optional(),
|
|
201
|
+
/**
|
|
202
|
+
* ADDITIVE: how many test outcomes this receipt carries unchanged
|
|
203
|
+
* from the parent receipt (digest-bound to the parent's execution
|
|
204
|
+
* result and evidence attestation). Absent on every other seal.
|
|
205
|
+
*/
|
|
206
|
+
carriedTests: z.number().int().min(0).optional(),
|
|
207
|
+
/** ADDITIVE: how many tests this invocation re-ran with fresh evidence. */
|
|
208
|
+
rerunTests: z.number().int().min(0).optional(),
|
|
209
|
+
/**
|
|
210
|
+
* ADDITIVE change classification. Only one value exists today
|
|
211
|
+
* (`test-only`); a receipt that carries it MUST carry the re-seal
|
|
212
|
+
* fields above, and a receipt without it carries none of them.
|
|
213
|
+
*/
|
|
214
|
+
changeClass: z.literal('test-only').optional(),
|
|
215
|
+
/**
|
|
216
|
+
* ADDITIVE: the changed repository-relative paths Gateforge itself
|
|
217
|
+
* computed from the two sealed trees (sorted, duplicate-free) — the
|
|
218
|
+
* claim CI recomputes. A CI recomputation that differs from this
|
|
219
|
+
* list rejects the receipt (EVIDENCE_STALE).
|
|
220
|
+
*/
|
|
221
|
+
changedPaths: z.array(z.string().min(1)).optional(),
|
|
222
|
+
/**
|
|
223
|
+
* ADDITIVE: the changed paths the OWNER declaration
|
|
224
|
+
* `enforcement.resealRuntimeFiles` kept out of the classification —
|
|
225
|
+
* runtime state the run itself rewrites, which no sealed commit
|
|
226
|
+
* tracks. Present only when at least one path was disregarded, and
|
|
227
|
+
* bound by the receipt MAC like every other re-seal field: the
|
|
228
|
+
* consumer recomputes the list from the same globs and the two
|
|
229
|
+
* commit trees, and any difference is `EVIDENCE_STALE`.
|
|
230
|
+
*/
|
|
231
|
+
resealDisregarded: z.array(z.string().min(1)).optional(),
|
|
232
|
+
/** 64-hex digest binding the approved engine/policy bundle version. */
|
|
164
233
|
engineBundleDigest: z.string().regex(HEX64, 'engineBundleDigest must be 64-char lowercase hex'),
|
|
165
234
|
/**
|
|
166
235
|
* 64-hex digest binding the controller-issued record of the active
|
|
@@ -180,6 +249,18 @@ export const GateReceiptSchema = z
|
|
|
180
249
|
* be clean when no evidence was required).
|
|
181
250
|
*/
|
|
182
251
|
evidenceAttestationDigest: z.string().regex(HEX64, 'evidenceAttestationDigest must be 64-char lowercase hex').nullable(),
|
|
252
|
+
/**
|
|
253
|
+
* ADDITIVE: canonical digest of the EVIDENCE UNION this re-seal
|
|
254
|
+
* sealed — the parent run's carried witness-issued records and
|
|
255
|
+
* claims together with the re-run's own, exactly as they stand in
|
|
256
|
+
* the run state. A re-seal carries a test's outcomes AND the
|
|
257
|
+
* evidence those outcomes were witnessed with; this field binds
|
|
258
|
+
* that second half, so a consumer recomputes the union from the
|
|
259
|
+
* retained parent documents and demands the state evidence equal it
|
|
260
|
+
* (any difference is `EVIDENCE_STALE`). MAC-bound like every other
|
|
261
|
+
* re-seal field.
|
|
262
|
+
*/
|
|
263
|
+
carriedEvidenceDigest: z.string().regex(HEX64, 'carriedEvidenceDigest must be 64-char lowercase hex').optional(),
|
|
183
264
|
/** Final verdict summary (blocking must have been 0 at issuance). */
|
|
184
265
|
verdictSummary: ReceiptVerdictSummarySchema,
|
|
185
266
|
/** Issuance instant (ISO-8601). */
|
|
@@ -189,6 +270,104 @@ export const GateReceiptSchema = z
|
|
|
189
270
|
})
|
|
190
271
|
.strict()
|
|
191
272
|
.superRefine((receipt, ctx) => {
|
|
273
|
+
if ((receipt.carriedFrom === undefined) !== (receipt.parentReceiptDigest === undefined)) {
|
|
274
|
+
ctx.addIssue({
|
|
275
|
+
code: 'custom',
|
|
276
|
+
path: ['parentReceiptDigest'],
|
|
277
|
+
message: 'carriedFrom and parentReceiptDigest must be present together',
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
// Re-seal coherence (fail closed): the re-seal fields stand or fall
|
|
281
|
+
// together, and a `test-only` change class is a CLAIM a consumer
|
|
282
|
+
// must recompute — it never certifies itself. A receipt naming some
|
|
283
|
+
// of them is malformed, never half-believed.
|
|
284
|
+
const resealFields = [receipt.resealedFrom, receipt.carriedTests, receipt.rerunTests, receipt.changeClass];
|
|
285
|
+
const presentResealFields = resealFields.filter((field) => field !== undefined).length;
|
|
286
|
+
if (presentResealFields > 0 && presentResealFields < resealFields.length) {
|
|
287
|
+
ctx.addIssue({
|
|
288
|
+
code: 'custom',
|
|
289
|
+
path: ['resealedFrom'],
|
|
290
|
+
message: 'resealedFrom, carriedTests, rerunTests and changeClass must be present together',
|
|
291
|
+
});
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
if (receipt.resealedFromKind !== undefined && presentResealFields !== resealFields.length) {
|
|
295
|
+
ctx.addIssue({
|
|
296
|
+
code: 'custom',
|
|
297
|
+
path: ['resealedFromKind'],
|
|
298
|
+
message: 'resealedFromKind is a re-seal binding and stands or falls with the re-seal fields',
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
if (receipt.resealDisregarded !== undefined && presentResealFields !== resealFields.length) {
|
|
302
|
+
ctx.addIssue({
|
|
303
|
+
code: 'custom',
|
|
304
|
+
path: ['resealDisregarded'],
|
|
305
|
+
message: 'resealDisregarded is a re-seal binding and stands or falls with the re-seal fields',
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
// The carried-EVIDENCE binding is a re-seal binding: a receipt that
|
|
309
|
+
// carries one half of a re-seal's proof without the other is
|
|
310
|
+
// malformed, never half-believed.
|
|
311
|
+
if (receipt.carriedEvidenceDigest !== undefined && presentResealFields !== resealFields.length) {
|
|
312
|
+
ctx.addIssue({
|
|
313
|
+
code: 'custom',
|
|
314
|
+
path: ['carriedEvidenceDigest'],
|
|
315
|
+
message: 'carriedEvidenceDigest is a re-seal binding and stands or falls with the re-seal fields',
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
if (presentResealFields === resealFields.length) {
|
|
319
|
+
// A `run-record` parent is NOT a receipt: `resealedFrom` then
|
|
320
|
+
// names the run record's own digest and no carried-receipt binding
|
|
321
|
+
// may be claimed. A `receipt` parent keeps the identity rule.
|
|
322
|
+
if (receipt.resealedFromKind === 'run-record') {
|
|
323
|
+
if (receipt.parentReceiptDigest !== undefined || receipt.carriedFrom !== undefined) {
|
|
324
|
+
ctx.addIssue({
|
|
325
|
+
code: 'custom',
|
|
326
|
+
path: ['parentReceiptDigest'],
|
|
327
|
+
message: 'a run-record re-seal names no parent receipt, so it carries no parentReceiptDigest',
|
|
328
|
+
});
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
else if (receipt.resealedFrom !== receipt.parentReceiptDigest) {
|
|
333
|
+
ctx.addIssue({
|
|
334
|
+
code: 'custom',
|
|
335
|
+
path: ['resealedFrom'],
|
|
336
|
+
message: 'resealedFrom must equal the parentReceiptDigest it re-sealed from',
|
|
337
|
+
});
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
340
|
+
const paths = receipt.changedPaths ?? [];
|
|
341
|
+
const sortedPaths = [...paths].sort();
|
|
342
|
+
for (let index = 0; index < paths.length; index += 1) {
|
|
343
|
+
if (paths[index] !== sortedPaths[index]) {
|
|
344
|
+
ctx.addIssue({
|
|
345
|
+
code: 'custom',
|
|
346
|
+
path: ['changedPaths', index],
|
|
347
|
+
message: "changedPaths must be sorted; expected '" + String(sortedPaths[index]) + "' at index " + String(index),
|
|
348
|
+
});
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
// The disregarded list is a CLAIM the consumer recomputes entry
|
|
353
|
+
// for entry, so it is sorted exactly like `changedPaths`: an
|
|
354
|
+
// unordered claim could never be reproduced.
|
|
355
|
+
const disregarded = receipt.resealDisregarded ?? [];
|
|
356
|
+
const sortedDisregarded = [...disregarded].sort();
|
|
357
|
+
for (let index = 0; index < disregarded.length; index += 1) {
|
|
358
|
+
if (disregarded[index] !== sortedDisregarded[index]) {
|
|
359
|
+
ctx.addIssue({
|
|
360
|
+
code: 'custom',
|
|
361
|
+
path: ['resealDisregarded', index],
|
|
362
|
+
message: "resealDisregarded must be sorted; expected '" +
|
|
363
|
+
String(sortedDisregarded[index]) +
|
|
364
|
+
"' at index " +
|
|
365
|
+
String(index),
|
|
366
|
+
});
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
192
371
|
// Scope/coverage coherence (fail closed): the covered set exists only
|
|
193
372
|
// for changed-scope receipts, and a changed-scope receipt without one
|
|
194
373
|
// would claim authority over an unnamed slice. Ordering/duplication
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gate-receipt.js","sourceRoot":"","sources":["../../src/schemas/gate-receipt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAErD,gDAAgD;AAChD,MAAM,KAAK,GAAG,gBAAgB,CAAC;AAE/B;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;AAK9D,mDAAmD;AACnD,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC;KACzC,MAAM,CAAC;IACN,uCAAuC;IACvC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,sCAAsC;IACtC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAClC,wEAAwE;IACxE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/B,wEAAwE;IACxE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAClC,CAAC;KACD,MAAM,EAAE;KACR,WAAW,CAAC,CAAC,OAAO,EAAE,GAAG,EAAE,EAAE;IAC5B,IAAI,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,MAAM,GAAG,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C,OAAO,EACL,0DAA0D,GAAG,QAAQ;wBACrE,aAAa,GAAG,KAAK,GAAG,SAAS,GAAG,OAAO,GAAG,GAAG;iBACpD,CAAC,CAAC;gBACH,OAAO;YACT,CAAC;YACD,IAAI,KAAK,GAAG,CAAC,IAAI,OAAO,KAAK,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC;gBAChD,GAAG,CAAC,QAAQ,CAAC;oBACX,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,+BAA+B,EAAE,KAAK,CAAC;oBAC9C,OAAO,EAAE,kCAAkC,OAAO,GAAG;iBACtD,CAAC,CAAC;gBACH,OAAO;YACT,CAAC;QACH,CAAC;QACD,OAAO;IACT,CAAC;IACD,IAAI,OAAO,CAAC,6BAA6B,KAAK,SAAS,EAAE,CAAC;QACxD,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,+BAA+B,CAAC;YACvC,OAAO,EAAE,wEAAwE;SAClF,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC,CAAC"}
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -15,8 +15,10 @@ export * from './run-manifest.js';
|
|
|
15
15
|
export * from './verdict.js';
|
|
16
16
|
export * from './coverage-policy.js';
|
|
17
17
|
export * from './behavior-policy.js';
|
|
18
|
+
export * from './signature-profile.js';
|
|
18
19
|
export * from './behavior-catalog.js';
|
|
19
20
|
export * from './behavior-evidence.js';
|
|
21
|
+
export * from './queue-observer.js';
|
|
20
22
|
export * from './test-catalog.js';
|
|
21
23
|
export * from './runner-adapter.js';
|
|
22
24
|
export * from './plugin.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC"}
|
package/dist/schemas/index.js
CHANGED
|
@@ -15,8 +15,10 @@ export * from './run-manifest.js';
|
|
|
15
15
|
export * from './verdict.js';
|
|
16
16
|
export * from './coverage-policy.js';
|
|
17
17
|
export * from './behavior-policy.js';
|
|
18
|
+
export * from './signature-profile.js';
|
|
18
19
|
export * from './behavior-catalog.js';
|
|
19
20
|
export * from './behavior-evidence.js';
|
|
21
|
+
export * from './queue-observer.js';
|
|
20
22
|
export * from './test-catalog.js';
|
|
21
23
|
export * from './runner-adapter.js';
|
|
22
24
|
export * from './plugin.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC"}
|
package/dist/schemas/policy.d.ts
CHANGED
|
@@ -46,6 +46,19 @@ export declare const PolicySchema: z.ZodObject<{
|
|
|
46
46
|
}, z.core.$strict>;
|
|
47
47
|
/** Inferred single-policy shape. */
|
|
48
48
|
export type Policy = z.infer<typeof PolicySchema>;
|
|
49
|
+
/**
|
|
50
|
+
* Document-level policy options (plan Phase 4c, E60). Additive and
|
|
51
|
+
* opt-in: a document with no `options` section is byte-for-byte and
|
|
52
|
+
* behavior-for-behavior today's document.
|
|
53
|
+
*/
|
|
54
|
+
export declare const PolicyFileOptionsSchema: z.ZodObject<{
|
|
55
|
+
'http.endpoint.requireObservation': z.ZodDefault<z.ZodEnum<{
|
|
56
|
+
consumed: "consumed";
|
|
57
|
+
all: "all";
|
|
58
|
+
}>>;
|
|
59
|
+
}, z.core.$strict>;
|
|
60
|
+
/** Inferred policy-options shape. */
|
|
61
|
+
export type PolicyFileOptions = z.infer<typeof PolicyFileOptionsSchema>;
|
|
49
62
|
/** The policies document loaded from the path in `.gateforge.yml`. */
|
|
50
63
|
export declare const PolicyFileSchema: z.ZodObject<{
|
|
51
64
|
schemaVersion: z.ZodLiteral<1>;
|
|
@@ -67,6 +80,12 @@ export declare const PolicyFileSchema: z.ZodObject<{
|
|
|
67
80
|
}, z.core.$strict>;
|
|
68
81
|
require: z.ZodArray<z.ZodString>;
|
|
69
82
|
}, z.core.$strict>>;
|
|
83
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
84
|
+
'http.endpoint.requireObservation': z.ZodDefault<z.ZodEnum<{
|
|
85
|
+
consumed: "consumed";
|
|
86
|
+
all: "all";
|
|
87
|
+
}>>;
|
|
88
|
+
}, z.core.$strict>>;
|
|
70
89
|
}, z.core.$strict>;
|
|
71
90
|
/** Inferred policies-document shape. */
|
|
72
91
|
export type PolicyFile = z.infer<typeof PolicyFileSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../src/schemas/policy.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;GAIG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;kBAalB,CAAC;AAEZ,qCAAqC;AACrC,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,6EAA6E;AAC7E,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;kBASd,CAAC;AAEZ,oCAAoC;AACpC,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD,sEAAsE;AACtE,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../src/schemas/policy.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;GAIG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;kBAalB,CAAC;AAEZ,qCAAqC;AACrC,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,6EAA6E;AAC7E,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;kBASd,CAAC;AAEZ,oCAAoC;AACpC,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;;;kBAwBzB,CAAC;AAEZ,qCAAqC;AACrC,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,sEAAsE;AACtE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;kBAYlB,CAAC;AAEZ,wCAAwC;AACxC,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
package/dist/schemas/policy.js
CHANGED
|
@@ -35,12 +35,48 @@ export const PolicySchema = z
|
|
|
35
35
|
require: z.array(ContractNameSchema).min(1),
|
|
36
36
|
})
|
|
37
37
|
.strict();
|
|
38
|
+
/**
|
|
39
|
+
* Document-level policy options (plan Phase 4c, E60). Additive and
|
|
40
|
+
* opt-in: a document with no `options` section is byte-for-byte and
|
|
41
|
+
* behavior-for-behavior today's document.
|
|
42
|
+
*/
|
|
43
|
+
export const PolicyFileOptionsSchema = z
|
|
44
|
+
.object({
|
|
45
|
+
/**
|
|
46
|
+
* Which `http.endpoint` resources owe the observation contracts
|
|
47
|
+
* (`http:request-observed` / `http:response-status-ok`) demanded by a
|
|
48
|
+
* `consumed: true` policy:
|
|
49
|
+
* - `consumed` (default, today's behavior): only endpoints the
|
|
50
|
+
* frontend statically consumes. A route no UI calls owes nothing,
|
|
51
|
+
* so a new untested route is invisible to the gate.
|
|
52
|
+
* - `all`: EVERY discovered endpoint owes them, so a new route with
|
|
53
|
+
* no test blocks (`TEST_MAPPING_MISSING`) until it is mapped or
|
|
54
|
+
* the baseline is adopted. Existing debt is handled by the
|
|
55
|
+
* adopted baseline, so this makes NEW routes visible without
|
|
56
|
+
* re-litigating old ones.
|
|
57
|
+
*
|
|
58
|
+
* The key lives in `.gateforge/policies.yml`, the pinned trusted
|
|
59
|
+
* policy document: widening (or narrowing) the observation scope
|
|
60
|
+
* is an owner-approved policy revision, never an agent-editable
|
|
61
|
+
* toggle. The value only ever changes WHICH endpoint resources a
|
|
62
|
+
* declared policy selects — it never adds a contract, a cause code
|
|
63
|
+
* or an exit code.
|
|
64
|
+
*/
|
|
65
|
+
'http.endpoint.requireObservation': z.enum(['consumed', 'all']).default('consumed'),
|
|
66
|
+
})
|
|
67
|
+
.strict();
|
|
38
68
|
/** The policies document loaded from the path in `.gateforge.yml`. */
|
|
39
69
|
export const PolicyFileSchema = z
|
|
40
70
|
.object({
|
|
41
71
|
schemaVersion: SchemaVersionField,
|
|
42
72
|
/** Policy list, evaluated in order. */
|
|
43
73
|
policies: z.array(PolicySchema).min(1),
|
|
74
|
+
/**
|
|
75
|
+
* Document-level options (plan Phase 4c, E60). ABSENT = every
|
|
76
|
+
* option at its default, so a document without the section behaves
|
|
77
|
+
* exactly as it did before the option existed.
|
|
78
|
+
*/
|
|
79
|
+
options: PolicyFileOptionsSchema.optional(),
|
|
44
80
|
})
|
|
45
81
|
.strict();
|
|
46
82
|
//# sourceMappingURL=policy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policy.js","sourceRoot":"","sources":["../../src/schemas/policy.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAElG;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC;KAC9B,MAAM,CAAC;IACN,8CAA8C;IAC9C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAClC,yBAAyB;IACzB,QAAQ,EAAE,cAAc,CAAC,QAAQ,EAAE;IACnC,sBAAsB;IACtB,KAAK,EAAE,WAAW,CAAC,QAAQ,EAAE;IAC7B,4IAA4I;IAC5I,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAA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from the required
|
|
4
|
+
* set.
|
|
5
|
+
*
|
|
6
|
+
* All four attribution fields are mandatory — a quarantine without an
|
|
7
|
+
* owner, an approver or a reason is a fail-closed configuration error,
|
|
8
|
+
* never a partially-applied exception (the waiver trust pattern). A
|
|
9
|
+
* quarantined test NEVER proves anything and NEVER blocks: it is
|
|
10
|
+
* removed from the required set before the run, and an obligation only
|
|
11
|
+
* it covered stays `missing`.
|
|
12
|
+
*/
|
|
13
|
+
import { z } from 'zod';
|
|
14
|
+
/** One owner's quarantine of exactly one test (logical key). */
|
|
15
|
+
export declare const QuarantineSchema: z.ZodObject<{
|
|
16
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
17
|
+
testKey: z.ZodString;
|
|
18
|
+
owner: z.ZodString;
|
|
19
|
+
approver: z.ZodString;
|
|
20
|
+
reason: z.ZodString;
|
|
21
|
+
expiresAt: z.ZodISODateTime;
|
|
22
|
+
}, z.core.$strict>;
|
|
23
|
+
/** Inferred quarantine shape. */
|
|
24
|
+
export type Quarantine = z.infer<typeof QuarantineSchema>;
|
|
25
|
+
//# sourceMappingURL=quarantine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quarantine.d.ts","sourceRoot":"","sources":["../../src/schemas/quarantine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,gEAAgE;AAChE,eAAO,MAAM,gBAAgB;;;;;;;kBAiBlB,CAAC;AAEZ,iCAAiC;AACjC,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flaky-test quarantine schema: an
|
|
3
|
+
* owner-approved, ALWAYS-EXPIRING removal of one test from the required
|
|
4
|
+
* set.
|
|
5
|
+
*
|
|
6
|
+
* All four attribution fields are mandatory — a quarantine without an
|
|
7
|
+
* owner, an approver or a reason is a fail-closed configuration error,
|
|
8
|
+
* never a partially-applied exception (the waiver trust pattern). A
|
|
9
|
+
* quarantined test NEVER proves anything and NEVER blocks: it is
|
|
10
|
+
* removed from the required set before the run, and an obligation only
|
|
11
|
+
* it covered stays `missing`.
|
|
12
|
+
*/
|
|
13
|
+
import { z } from 'zod';
|
|
14
|
+
import { SchemaVersionField } from './common.js';
|
|
15
|
+
/** One owner's quarantine of exactly one test (logical key). */
|
|
16
|
+
export const QuarantineSchema = z
|
|
17
|
+
.object({
|
|
18
|
+
schemaVersion: SchemaVersionField,
|
|
19
|
+
/**
|
|
20
|
+
* The quarantined test's stable logical key
|
|
21
|
+
* (`<file>#<title path>`), exactly as the test catalog reports it.
|
|
22
|
+
*/
|
|
23
|
+
testKey: z.string().min(1),
|
|
24
|
+
/** Person/team accountable for the flaky test. */
|
|
25
|
+
owner: z.string().min(1),
|
|
26
|
+
/** Named approver who accepted the flake. */
|
|
27
|
+
approver: z.string().min(1),
|
|
28
|
+
/** Why the test is quarantined (flake evidence, tracking issue). */
|
|
29
|
+
reason: z.string().min(1),
|
|
30
|
+
/** Expiry instant (ISO-8601); after this the quarantine blocks. */
|
|
31
|
+
expiresAt: z.iso.datetime(),
|
|
32
|
+
})
|
|
33
|
+
.strict();
|
|
34
|
+
//# sourceMappingURL=quarantine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quarantine.js","sourceRoot":"","sources":["../../src/schemas/quarantine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,gEAAgE;AAChE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC;KAC9B,MAAM,CAAC;IACN,aAAa,EAAE,kBAAkB;IACjC;;;OAGG;IACH,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,kDAAkD;IAClD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,6CAA6C;IAC7C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,oEAAoE;IACpE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,mEAAmE;IACnE,SAAS,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE;CAC5B,CAAC;KACD,MAAM,EAAE,CAAC"}
|