assertledger 1.1.0 → 1.1.1
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.fr.md +2 -2
- package/README.md +2 -2
- package/dist/build-info.json +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +11 -4
- package/dist/core/index.js.map +1 -1
- package/dist/proof-planner/carry-over.d.ts +21 -0
- package/dist/proof-planner/carry-over.d.ts.map +1 -0
- package/dist/proof-planner/carry-over.js +212 -0
- package/dist/proof-planner/carry-over.js.map +1 -0
- package/dist/proof-planner/index.d.ts +11 -0
- package/dist/proof-planner/index.d.ts.map +1 -0
- package/dist/proof-planner/index.js +11 -0
- package/dist/proof-planner/index.js.map +1 -0
- package/dist/proof-planner/model.d.ts +272 -0
- package/dist/proof-planner/model.d.ts.map +1 -0
- package/dist/proof-planner/model.js +215 -0
- package/dist/proof-planner/model.js.map +1 -0
- package/dist/proof-planner/plan.d.ts +140 -0
- package/dist/proof-planner/plan.d.ts.map +1 -0
- package/dist/proof-planner/plan.js +1124 -0
- package/dist/proof-planner/plan.js.map +1 -0
- package/dist/proof-planner/policy.d.ts +100 -0
- package/dist/proof-planner/policy.d.ts.map +1 -0
- package/dist/proof-planner/policy.js +407 -0
- package/dist/proof-planner/policy.js.map +1 -0
- package/dist/proof-planner/render.d.ts +4 -0
- package/dist/proof-planner/render.d.ts.map +1 -0
- package/dist/proof-planner/render.js +73 -0
- package/dist/proof-planner/render.js.map +1 -0
- package/docs/architecture.md +7 -0
- package/docs/migration-timeout-discovery-inconclusive.md +126 -0
- package/docs/proof-model.md +20 -2
- package/docs/proof-planner.md +368 -0
- package/docs/reference.md +3 -1
- package/package.json +4 -4
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { compareOrdinal, sortedUnique } from "./model.js";
|
|
2
|
+
import { isUnresolvedSignal, } from "./plan.js";
|
|
3
|
+
export function carryOverEvidence(previous, next) {
|
|
4
|
+
const reusable = [];
|
|
5
|
+
const mustProduce = [];
|
|
6
|
+
const sameBaseline = previous.subject.baseline === next.subject.baseline;
|
|
7
|
+
const sameRevision = previous.subject.revision === next.subject.revision;
|
|
8
|
+
const runtimeTree = sameRuntimeTree(previous, next);
|
|
9
|
+
// Evidence is not reused on the surfaces that an unresolved signal may concern, read in both
|
|
10
|
+
// plans: across revisions, one observed beside it or one the next plan observes; within one
|
|
11
|
+
// revision, only an observation the previous plan did not already have, since evidence produced
|
|
12
|
+
// beside an observation answers it. The planner uses the same notion of "unresolved".
|
|
13
|
+
const previousUnresolved = previous.signals.filter(isUnresolvedSignal);
|
|
14
|
+
const answered = new Set(previousUnresolved.map(observationKey));
|
|
15
|
+
const unresolved = [
|
|
16
|
+
...(sameRevision ? [] : previousUnresolved),
|
|
17
|
+
...next.signals.filter((signal) => isUnresolvedSignal(signal) && !(sameRevision && answered.has(observationKey(signal)))),
|
|
18
|
+
].map((signal) => ({ id: signal.id, surfaces: concernedInEither(previous, next, signal) }));
|
|
19
|
+
const unresolvedOn = (surface) => {
|
|
20
|
+
const blocking = unresolved.filter((entry) => surface === null || entry.surfaces === null || entry.surfaces.has(surface));
|
|
21
|
+
return blocking.length > 0
|
|
22
|
+
? `a signal is unresolved (${sortedUnique(blocking.map((entry) => entry.id)).join(", ")})`
|
|
23
|
+
: null;
|
|
24
|
+
};
|
|
25
|
+
// Evidence that answers observations answers only those it was produced for.
|
|
26
|
+
const answersOther = (requirement, earlier, surface) => {
|
|
27
|
+
const seen = observationsBehind(previous, earlier, surface);
|
|
28
|
+
const behind = observationsBehind(next, requirement, surface);
|
|
29
|
+
if (seen === null || behind === null)
|
|
30
|
+
return "an observation behind it is not in the plan";
|
|
31
|
+
return [...behind].some((key) => !seen.has(key))
|
|
32
|
+
? "it answers an observation the earlier evidence did not"
|
|
33
|
+
: null;
|
|
34
|
+
};
|
|
35
|
+
for (const requirement of next.requiredEvidence) {
|
|
36
|
+
const earlier = previous.requiredEvidence.find((candidate) => candidate.kind === requirement.kind &&
|
|
37
|
+
candidate.semanticDigest === requirement.semanticDigest);
|
|
38
|
+
const entry = (surfaces, reason) => ({
|
|
39
|
+
kind: requirement.kind,
|
|
40
|
+
binding: requirement.binding,
|
|
41
|
+
surfaces: sortedUnique(surfaces),
|
|
42
|
+
reason,
|
|
43
|
+
});
|
|
44
|
+
if (!earlier) {
|
|
45
|
+
mustProduce.push(entry(requirement.surfaces, "not required with the same meaning before"));
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
if (!sameBaseline) {
|
|
49
|
+
mustProduce.push(entry(requirement.surfaces, "the merge-base changed"));
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
if (requirement.binding === "runtime-tree") {
|
|
53
|
+
const blocker = runtimeTree
|
|
54
|
+
? (unresolvedOn(null) ?? answersOther(requirement, earlier, null))
|
|
55
|
+
: "runtime tree changed or unknown";
|
|
56
|
+
if (blocker === null)
|
|
57
|
+
reusable.push(entry(requirement.surfaces, "runtime tree unchanged"));
|
|
58
|
+
else
|
|
59
|
+
mustProduce.push(entry(requirement.surfaces, blocker));
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
// Revision-wide evidence: exact-revision kinds, a property of the revision itself, and
|
|
63
|
+
// surface-content kinds without a scope, which a new observation can still contradict.
|
|
64
|
+
if (requirement.binding === "exact-revision" || requirement.surfaces.length === 0) {
|
|
65
|
+
const blocker = !sameRevision
|
|
66
|
+
? "bound to the exact revision"
|
|
67
|
+
: requirement.binding === "exact-revision"
|
|
68
|
+
? null
|
|
69
|
+
: (unresolvedOn(null) ?? answersOther(requirement, earlier, null));
|
|
70
|
+
if (blocker === null)
|
|
71
|
+
reusable.push(entry(requirement.surfaces, "same revision"));
|
|
72
|
+
else
|
|
73
|
+
mustProduce.push(entry(requirement.surfaces, blocker));
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
const kept = [];
|
|
77
|
+
const changed = new Map();
|
|
78
|
+
for (const surface of requirement.surfaces) {
|
|
79
|
+
const reason = surfaceReuseBlocker(previous, next, requirement, earlier, surface, runtimeTree) ??
|
|
80
|
+
unresolvedOn(surface) ??
|
|
81
|
+
answersOther(requirement, earlier, surface);
|
|
82
|
+
if (reason === null)
|
|
83
|
+
kept.push(surface);
|
|
84
|
+
else
|
|
85
|
+
changed.set(reason, [...(changed.get(reason) ?? []), surface]);
|
|
86
|
+
}
|
|
87
|
+
if (kept.length > 0)
|
|
88
|
+
reusable.push(entry(kept, "scoped surfaces and their tests unchanged"));
|
|
89
|
+
for (const [reason, surfaces] of changed)
|
|
90
|
+
mustProduce.push(entry(surfaces, reason));
|
|
91
|
+
}
|
|
92
|
+
const order = (left, right) => compareOrdinal(`${left.kind}|${left.reason}`, `${right.kind}|${right.reason}`);
|
|
93
|
+
return {
|
|
94
|
+
previousRevision: previous.subject.revision,
|
|
95
|
+
nextRevision: next.subject.revision,
|
|
96
|
+
reusable: reusable.sort(order),
|
|
97
|
+
mustProduce: mustProduce.sort(order),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Surfaces an unresolved signal may concern, or null for all of them. A failing proof surface
|
|
102
|
+
* concerns what it exercises; a failure that cannot be mapped, an execution context, or a proof
|
|
103
|
+
* surface that does not list what it exercises, concerns everything.
|
|
104
|
+
*/
|
|
105
|
+
function concernedSurfaces(plan, signal) {
|
|
106
|
+
if (signal.surfaces.length === 0)
|
|
107
|
+
return null;
|
|
108
|
+
const concerned = new Set(signal.surfaces);
|
|
109
|
+
for (const id of signal.surfaces) {
|
|
110
|
+
const known = plan.subject.surfaces.find((entry) => entry.id === id);
|
|
111
|
+
if (!known || known.role === "execution-context")
|
|
112
|
+
return null;
|
|
113
|
+
if (known.role !== "test" && known.role !== "proof-infrastructure")
|
|
114
|
+
continue;
|
|
115
|
+
if (known.exercises === null)
|
|
116
|
+
return null;
|
|
117
|
+
for (const exercised of known.exercises)
|
|
118
|
+
concerned.add(exercised);
|
|
119
|
+
}
|
|
120
|
+
return concerned;
|
|
121
|
+
}
|
|
122
|
+
/** What a signal may concern in either plan: everything as soon as one of them cannot map it. */
|
|
123
|
+
function concernedInEither(previous, next, signal) {
|
|
124
|
+
const before = concernedSurfaces(previous, signal);
|
|
125
|
+
const after = concernedSurfaces(next, signal);
|
|
126
|
+
// Where the two sets differ, what exercises that surface changed, which blocks reuse on its own.
|
|
127
|
+
return before === null || after === null ? null : new Set([...before, ...after]);
|
|
128
|
+
}
|
|
129
|
+
/** One observation: evidence produced for one report never answers another. */
|
|
130
|
+
function observationKey(signal) {
|
|
131
|
+
return JSON.stringify([
|
|
132
|
+
signal.id,
|
|
133
|
+
signal.revision,
|
|
134
|
+
signal.signal,
|
|
135
|
+
signal.classification,
|
|
136
|
+
signal.exercises,
|
|
137
|
+
[...signal.basis].sort(),
|
|
138
|
+
[...signal.surfaces].sort(),
|
|
139
|
+
]);
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Observations behind a requirement on a surface, or behind all of it for null. Null when a fact
|
|
143
|
+
* names a signal the plan does not list, since what it observed cannot be compared.
|
|
144
|
+
*/
|
|
145
|
+
function observationsBehind(plan, requirement, surface) {
|
|
146
|
+
const keys = new Set();
|
|
147
|
+
for (const fact of plan.facts) {
|
|
148
|
+
if (!fact.id.startsWith("observed:") || !requirement.because.includes(fact.id))
|
|
149
|
+
continue;
|
|
150
|
+
// A fact merges the surfaces of every signal behind it: scope each observation by its own.
|
|
151
|
+
for (const ref of fact.refs) {
|
|
152
|
+
const signal = plan.signals.find((entry) => entry.id === ref);
|
|
153
|
+
if (!signal)
|
|
154
|
+
return null;
|
|
155
|
+
const scope = signal.surfaces;
|
|
156
|
+
if (surface !== null && scope.length > 0 && !scope.includes(surface))
|
|
157
|
+
continue;
|
|
158
|
+
keys.add(observationKey(signal));
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return keys;
|
|
162
|
+
}
|
|
163
|
+
function sameRuntimeTree(previous, next) {
|
|
164
|
+
const before = previous.subject.runtimeTreeDigest;
|
|
165
|
+
const after = next.subject.runtimeTreeDigest;
|
|
166
|
+
return before !== null && after !== null && before === after;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Only documentation-only evidence about a surface both plans call documentation ignores the
|
|
170
|
+
* runtime tree. A gate delta review justifies a budget with durations measured on the code the
|
|
171
|
+
* gate runs, and a documentation claim scoped to a runtime surface describes its behavior.
|
|
172
|
+
*/
|
|
173
|
+
function dependsOnRuntimeTree(requirement, before, after) {
|
|
174
|
+
return (before.role !== "documentation" ||
|
|
175
|
+
after.role !== "documentation" ||
|
|
176
|
+
!requirement.subjects.every((subject) => subject === "documentation"));
|
|
177
|
+
}
|
|
178
|
+
function surfaceReuseBlocker(previous, next, requirement, earlier, surface, runtimeTree) {
|
|
179
|
+
if (!earlier.surfaces.includes(surface))
|
|
180
|
+
return "surface newly in scope";
|
|
181
|
+
const before = previous.subject.surfaces.find((entry) => entry.id === surface);
|
|
182
|
+
const after = next.subject.surfaces.find((entry) => entry.id === surface);
|
|
183
|
+
if (!before?.contentDigest || !after?.contentDigest)
|
|
184
|
+
return "surface digest unknown";
|
|
185
|
+
if (before.contentDigest !== after.contentDigest)
|
|
186
|
+
return "surface content changed";
|
|
187
|
+
if (dependsOnRuntimeTree(requirement, before, after) && !runtimeTree) {
|
|
188
|
+
return "runtime tree changed or unknown";
|
|
189
|
+
}
|
|
190
|
+
const testsBefore = exercisers(previous.subject.surfaces, surface);
|
|
191
|
+
const testsAfter = exercisers(next.subject.surfaces, surface);
|
|
192
|
+
const key = (tests) => tests.map((test) => `${test.id}=${test.contentDigest ?? "unknown"}`).join("|");
|
|
193
|
+
if ([...testsBefore, ...testsAfter].some((test) => test.contentDigest === null) ||
|
|
194
|
+
key(testsBefore) !== key(testsAfter)) {
|
|
195
|
+
return "a test or proof surface exercising the surface changed";
|
|
196
|
+
}
|
|
197
|
+
return null;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Proof surfaces that exercise `surface`: a test without an `exercises` list exercises everything;
|
|
201
|
+
* a proof-infrastructure surface counts where it names the surface.
|
|
202
|
+
*/
|
|
203
|
+
function exercisers(surfaces, surface) {
|
|
204
|
+
return surfaces
|
|
205
|
+
.filter((entry) => (entry.role === "test" &&
|
|
206
|
+
(entry.exercises === null || entry.exercises.includes(surface))) ||
|
|
207
|
+
(entry.role === "proof-infrastructure" &&
|
|
208
|
+
entry.exercises !== null &&
|
|
209
|
+
entry.exercises.includes(surface)))
|
|
210
|
+
.sort((left, right) => compareOrdinal(left.id, right.id));
|
|
211
|
+
}
|
|
212
|
+
//# sourceMappingURL=carry-over.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"carry-over.js","sourceRoot":"","sources":["../../src/proof-planner/carry-over.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAwB,YAAY,EAAE,MAAM,YAAY,CAAC;AAChF,OAAO,EAGL,kBAAkB,GAGnB,MAAM,WAAW,CAAC;AAqBnB,MAAM,UAAU,iBAAiB,CAAC,QAAuB,EAAE,IAAmB;IAC5E,MAAM,QAAQ,GAAqB,EAAE,CAAC;IACtC,MAAM,WAAW,GAAqB,EAAE,CAAC;IACzC,MAAM,YAAY,GAAG,QAAQ,CAAC,OAAO,CAAC,QAAQ,KAAK,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;IACzE,MAAM,YAAY,GAAG,QAAQ,CAAC,OAAO,CAAC,QAAQ,KAAK,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;IACzE,MAAM,WAAW,GAAG,eAAe,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IACpD,6FAA6F;IAC7F,4FAA4F;IAC5F,gGAAgG;IAChG,sFAAsF;IACtF,MAAM,kBAAkB,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;IACvE,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,kBAAkB,CAAC,GAAG,CAAC,cAAc,CAAC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-0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal proof planner. It decides which evidence is proportionate for a change; AssertLedger
|
|
3
|
+
* decides whether that evidence exists and is valid. Deliberately not exported from the package
|
|
4
|
+
* entry points (see docs/proof-planner.md for the extraction criteria).
|
|
5
|
+
*/
|
|
6
|
+
export * from "./carry-over.js";
|
|
7
|
+
export * from "./model.js";
|
|
8
|
+
export * from "./plan.js";
|
|
9
|
+
export * from "./policy.js";
|
|
10
|
+
export * from "./render.js";
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/proof-planner/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal proof planner. It decides which evidence is proportionate for a change; AssertLedger
|
|
3
|
+
* decides whether that evidence exists and is valid. Deliberately not exported from the package
|
|
4
|
+
* entry points (see docs/proof-planner.md for the extraction criteria).
|
|
5
|
+
*/
|
|
6
|
+
export * from "./carry-over.js";
|
|
7
|
+
export * from "./model.js";
|
|
8
|
+
export * from "./plan.js";
|
|
9
|
+
export * from "./policy.js";
|
|
10
|
+
export * from "./render.js";
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/proof-planner/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
export declare const PROOF_PLANNER_SCHEMA_VERSION: "1.0.0";
|
|
3
|
+
export declare class ProofPlannerError extends Error {
|
|
4
|
+
readonly code: string;
|
|
5
|
+
constructor(code: string, detail?: string);
|
|
6
|
+
}
|
|
7
|
+
export declare const ASSURANCE_LEVELS: readonly ["P0", "P1", "P2", "P3", "P4", "P5"];
|
|
8
|
+
export type AssuranceLevel = (typeof ASSURANCE_LEVELS)[number];
|
|
9
|
+
export declare const SURFACE_ROLES: readonly ["product", "execution-context", "evaluation", "test", "proof-infrastructure", "documentation"];
|
|
10
|
+
export type SurfaceRole = (typeof SURFACE_ROLES)[number];
|
|
11
|
+
export declare const SURFACE_REACHES: readonly ["direct", "transitive"];
|
|
12
|
+
export declare const SURFACE_RUNTIMES: readonly ["none", "build", "offline-analysis", "live"];
|
|
13
|
+
export declare const BOUNDARIES: readonly ["protocol", "persistence", "replay", "analysis", "decision", "admission", "security", "public-api", "benchmark", "holdout"];
|
|
14
|
+
export type Boundary = (typeof BOUNDARIES)[number];
|
|
15
|
+
export declare const BEHAVIOR_CHANGES: readonly ["none", "suspected", "fix", "feature"];
|
|
16
|
+
export declare const COVERAGES: readonly ["tested", "untested", "unknown"];
|
|
17
|
+
export declare const CLAIM_KINDS: readonly ["behavior", "equivalence", "invariant", "compatibility", "empirical", "documentation"];
|
|
18
|
+
export declare const CLAIM_CRITICALITIES: readonly ["low", "standard", "high", "critical"];
|
|
19
|
+
export declare const CLAIM_SCOPES: readonly ["local", "component", "system"];
|
|
20
|
+
export declare const PRODUCT_SIGNALS: readonly ["UNEXPECTED_BEHAVIOR", "UNPLANNED_IMPACT", "UNKNOWN_DEPENDENCY", "LIVE_RUNTIME_TOUCHED", "CORPUS_DIVERGENCE", "WITNESS_NOT_CAUSAL", "REGRESSION"];
|
|
21
|
+
export declare const INFRASTRUCTURE_SIGNALS: readonly ["TIMEOUT", "ENVIRONMENT_FAILURE", "TOOLING_FAILURE"];
|
|
22
|
+
export type ProductSignal = (typeof PRODUCT_SIGNALS)[number];
|
|
23
|
+
export type InfrastructureSignal = (typeof INFRASTRUCTURE_SIGNALS)[number];
|
|
24
|
+
export type SignalName = ProductSignal | InfrastructureSignal;
|
|
25
|
+
export declare const ATTRIBUTION_BASES: readonly ["REPRODUCES_ON_BASELINE", "PASSES_ON_SAME_REVISION", "OUTSIDE_IMPACT", "INFRASTRUCTURE_ERROR_REPORTED", "DECLARED_ENVIRONMENT_FACTOR"];
|
|
26
|
+
export type AttributionBasis = (typeof ATTRIBUTION_BASES)[number];
|
|
27
|
+
/** What a piece of evidence is about. Surface roles map onto these subjects. */
|
|
28
|
+
export declare const EVIDENCE_SUBJECTS: readonly ["product", "evaluation", "proof-infrastructure", "documentation"];
|
|
29
|
+
export type EvidenceSubject = (typeof EVIDENCE_SUBJECTS)[number];
|
|
30
|
+
export declare const EVIDENCE_WEIGHTS: readonly ["targeted", "broad", "ceremony"];
|
|
31
|
+
export type EvidenceWeight = (typeof EVIDENCE_WEIGHTS)[number];
|
|
32
|
+
/**
|
|
33
|
+
* What a piece of evidence stays valid for.
|
|
34
|
+
* - exact-revision: only the revision it was produced on.
|
|
35
|
+
* - surface-content: each scoped surface, while that surface, the test and proof-infrastructure
|
|
36
|
+
* surfaces that exercise it, the baseline and (for every kind that is not documentation-only)
|
|
37
|
+
* the runtime tree keep their digests. Without a scope it is revision-wide: exact-revision.
|
|
38
|
+
* - runtime-tree: any revision with the same baseline and runtime tree digest.
|
|
39
|
+
*/
|
|
40
|
+
export declare const EVIDENCE_BINDINGS: readonly ["exact-revision", "surface-content", "runtime-tree"];
|
|
41
|
+
export type EvidenceBinding = (typeof EVIDENCE_BINDINGS)[number];
|
|
42
|
+
export declare const EVIDENCE_VERIFICATIONS: readonly ["executed", "attested"];
|
|
43
|
+
export declare const EvidenceKindIdSchema: z.ZodString;
|
|
44
|
+
export declare const SurfaceSchema: z.ZodObject<{
|
|
45
|
+
id: z.ZodString;
|
|
46
|
+
role: z.ZodEnum<{
|
|
47
|
+
documentation: "documentation";
|
|
48
|
+
evaluation: "evaluation";
|
|
49
|
+
"execution-context": "execution-context";
|
|
50
|
+
product: "product";
|
|
51
|
+
"proof-infrastructure": "proof-infrastructure";
|
|
52
|
+
test: "test";
|
|
53
|
+
}>;
|
|
54
|
+
reach: z.ZodEnum<{
|
|
55
|
+
direct: "direct";
|
|
56
|
+
transitive: "transitive";
|
|
57
|
+
}>;
|
|
58
|
+
runtime: z.ZodEnum<{
|
|
59
|
+
build: "build";
|
|
60
|
+
live: "live";
|
|
61
|
+
none: "none";
|
|
62
|
+
"offline-analysis": "offline-analysis";
|
|
63
|
+
}>;
|
|
64
|
+
boundaries: z.ZodArray<z.ZodEnum<{
|
|
65
|
+
admission: "admission";
|
|
66
|
+
analysis: "analysis";
|
|
67
|
+
benchmark: "benchmark";
|
|
68
|
+
decision: "decision";
|
|
69
|
+
holdout: "holdout";
|
|
70
|
+
persistence: "persistence";
|
|
71
|
+
protocol: "protocol";
|
|
72
|
+
"public-api": "public-api";
|
|
73
|
+
replay: "replay";
|
|
74
|
+
security: "security";
|
|
75
|
+
}>>;
|
|
76
|
+
behaviorChange: z.ZodEnum<{
|
|
77
|
+
feature: "feature";
|
|
78
|
+
fix: "fix";
|
|
79
|
+
none: "none";
|
|
80
|
+
suspected: "suspected";
|
|
81
|
+
}>;
|
|
82
|
+
coverage: z.ZodEnum<{
|
|
83
|
+
tested: "tested";
|
|
84
|
+
unknown: "unknown";
|
|
85
|
+
untested: "untested";
|
|
86
|
+
}>;
|
|
87
|
+
environmentSensitive: z.ZodBoolean;
|
|
88
|
+
contentDigest: z.ZodOptional<z.ZodString>;
|
|
89
|
+
exercises: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
90
|
+
}, z.core.$strict>;
|
|
91
|
+
export type Surface = z.infer<typeof SurfaceSchema>;
|
|
92
|
+
export declare const ChangeImpactSchema: z.ZodObject<{
|
|
93
|
+
schemaVersion: z.ZodLiteral<"1.0.0">;
|
|
94
|
+
revision: z.ZodObject<{
|
|
95
|
+
id: z.ZodString;
|
|
96
|
+
baseline: z.ZodString;
|
|
97
|
+
runtimeTreeDigest: z.ZodOptional<z.ZodString>;
|
|
98
|
+
}, z.core.$strict>;
|
|
99
|
+
surfaces: z.ZodArray<z.ZodObject<{
|
|
100
|
+
id: z.ZodString;
|
|
101
|
+
role: z.ZodEnum<{
|
|
102
|
+
documentation: "documentation";
|
|
103
|
+
evaluation: "evaluation";
|
|
104
|
+
"execution-context": "execution-context";
|
|
105
|
+
product: "product";
|
|
106
|
+
"proof-infrastructure": "proof-infrastructure";
|
|
107
|
+
test: "test";
|
|
108
|
+
}>;
|
|
109
|
+
reach: z.ZodEnum<{
|
|
110
|
+
direct: "direct";
|
|
111
|
+
transitive: "transitive";
|
|
112
|
+
}>;
|
|
113
|
+
runtime: z.ZodEnum<{
|
|
114
|
+
build: "build";
|
|
115
|
+
live: "live";
|
|
116
|
+
none: "none";
|
|
117
|
+
"offline-analysis": "offline-analysis";
|
|
118
|
+
}>;
|
|
119
|
+
boundaries: z.ZodArray<z.ZodEnum<{
|
|
120
|
+
admission: "admission";
|
|
121
|
+
analysis: "analysis";
|
|
122
|
+
benchmark: "benchmark";
|
|
123
|
+
decision: "decision";
|
|
124
|
+
holdout: "holdout";
|
|
125
|
+
persistence: "persistence";
|
|
126
|
+
protocol: "protocol";
|
|
127
|
+
"public-api": "public-api";
|
|
128
|
+
replay: "replay";
|
|
129
|
+
security: "security";
|
|
130
|
+
}>>;
|
|
131
|
+
behaviorChange: z.ZodEnum<{
|
|
132
|
+
feature: "feature";
|
|
133
|
+
fix: "fix";
|
|
134
|
+
none: "none";
|
|
135
|
+
suspected: "suspected";
|
|
136
|
+
}>;
|
|
137
|
+
coverage: z.ZodEnum<{
|
|
138
|
+
tested: "tested";
|
|
139
|
+
unknown: "unknown";
|
|
140
|
+
untested: "untested";
|
|
141
|
+
}>;
|
|
142
|
+
environmentSensitive: z.ZodBoolean;
|
|
143
|
+
contentDigest: z.ZodOptional<z.ZodString>;
|
|
144
|
+
exercises: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
145
|
+
}, z.core.$strict>>;
|
|
146
|
+
analysis: z.ZodObject<{
|
|
147
|
+
method: z.ZodEnum<{
|
|
148
|
+
declared: "declared";
|
|
149
|
+
"static-graph": "static-graph";
|
|
150
|
+
}>;
|
|
151
|
+
completeness: z.ZodEnum<{
|
|
152
|
+
complete: "complete";
|
|
153
|
+
partial: "partial";
|
|
154
|
+
unknown: "unknown";
|
|
155
|
+
}>;
|
|
156
|
+
uncertainty: z.ZodEnum<{
|
|
157
|
+
high: "high";
|
|
158
|
+
low: "low";
|
|
159
|
+
medium: "medium";
|
|
160
|
+
}>;
|
|
161
|
+
unknowns: z.ZodArray<z.ZodObject<{
|
|
162
|
+
description: z.ZodString;
|
|
163
|
+
surfaces: z.ZodArray<z.ZodString>;
|
|
164
|
+
}, z.core.$strict>>;
|
|
165
|
+
omittedSurfaceCount: z.ZodInt;
|
|
166
|
+
}, z.core.$strict>;
|
|
167
|
+
reversibility: z.ZodEnum<{
|
|
168
|
+
costly: "costly";
|
|
169
|
+
irreversible: "irreversible";
|
|
170
|
+
reversible: "reversible";
|
|
171
|
+
trivial: "trivial";
|
|
172
|
+
}>;
|
|
173
|
+
causalWitness: z.ZodEnum<{
|
|
174
|
+
available: "available";
|
|
175
|
+
feasible: "feasible";
|
|
176
|
+
infeasible: "infeasible";
|
|
177
|
+
"not-applicable": "not-applicable";
|
|
178
|
+
}>;
|
|
179
|
+
}, z.core.$strict>;
|
|
180
|
+
export type ChangeImpact = z.infer<typeof ChangeImpactSchema>;
|
|
181
|
+
export declare const AssuranceClaimSchema: z.ZodObject<{
|
|
182
|
+
id: z.ZodString;
|
|
183
|
+
statement: z.ZodString;
|
|
184
|
+
kind: z.ZodEnum<{
|
|
185
|
+
behavior: "behavior";
|
|
186
|
+
compatibility: "compatibility";
|
|
187
|
+
documentation: "documentation";
|
|
188
|
+
empirical: "empirical";
|
|
189
|
+
equivalence: "equivalence";
|
|
190
|
+
invariant: "invariant";
|
|
191
|
+
}>;
|
|
192
|
+
criticality: z.ZodEnum<{
|
|
193
|
+
critical: "critical";
|
|
194
|
+
high: "high";
|
|
195
|
+
low: "low";
|
|
196
|
+
standard: "standard";
|
|
197
|
+
}>;
|
|
198
|
+
scope: z.ZodEnum<{
|
|
199
|
+
component: "component";
|
|
200
|
+
local: "local";
|
|
201
|
+
system: "system";
|
|
202
|
+
}>;
|
|
203
|
+
surfaces: z.ZodArray<z.ZodString>;
|
|
204
|
+
}, z.core.$strict>;
|
|
205
|
+
export type AssuranceClaim = z.infer<typeof AssuranceClaimSchema>;
|
|
206
|
+
export declare const ProofSignalSchema: z.ZodObject<{
|
|
207
|
+
id: z.ZodString;
|
|
208
|
+
revision: z.ZodString;
|
|
209
|
+
baseline: z.ZodOptional<z.ZodString>;
|
|
210
|
+
runtimeTreeDigest: z.ZodOptional<z.ZodString>;
|
|
211
|
+
signal: z.ZodEnum<{
|
|
212
|
+
CORPUS_DIVERGENCE: "CORPUS_DIVERGENCE";
|
|
213
|
+
ENVIRONMENT_FAILURE: "ENVIRONMENT_FAILURE";
|
|
214
|
+
LIVE_RUNTIME_TOUCHED: "LIVE_RUNTIME_TOUCHED";
|
|
215
|
+
REGRESSION: "REGRESSION";
|
|
216
|
+
TIMEOUT: "TIMEOUT";
|
|
217
|
+
TOOLING_FAILURE: "TOOLING_FAILURE";
|
|
218
|
+
UNEXPECTED_BEHAVIOR: "UNEXPECTED_BEHAVIOR";
|
|
219
|
+
UNKNOWN_DEPENDENCY: "UNKNOWN_DEPENDENCY";
|
|
220
|
+
UNPLANNED_IMPACT: "UNPLANNED_IMPACT";
|
|
221
|
+
WITNESS_NOT_CAUSAL: "WITNESS_NOT_CAUSAL";
|
|
222
|
+
}>;
|
|
223
|
+
surfaces: z.ZodArray<z.ZodString>;
|
|
224
|
+
exercisesImpactedSurfaces: z.ZodEnum<{
|
|
225
|
+
no: "no";
|
|
226
|
+
unknown: "unknown";
|
|
227
|
+
yes: "yes";
|
|
228
|
+
}>;
|
|
229
|
+
attribution: z.ZodArray<z.ZodEnum<{
|
|
230
|
+
DECLARED_ENVIRONMENT_FACTOR: "DECLARED_ENVIRONMENT_FACTOR";
|
|
231
|
+
INFRASTRUCTURE_ERROR_REPORTED: "INFRASTRUCTURE_ERROR_REPORTED";
|
|
232
|
+
OUTSIDE_IMPACT: "OUTSIDE_IMPACT";
|
|
233
|
+
PASSES_ON_SAME_REVISION: "PASSES_ON_SAME_REVISION";
|
|
234
|
+
REPRODUCES_ON_BASELINE: "REPRODUCES_ON_BASELINE";
|
|
235
|
+
}>>;
|
|
236
|
+
detail: z.ZodString;
|
|
237
|
+
}, z.core.$strict>;
|
|
238
|
+
export type ProofSignal = z.infer<typeof ProofSignalSchema>;
|
|
239
|
+
export declare const EvidenceKindSpecSchema: z.ZodObject<{
|
|
240
|
+
id: z.ZodString;
|
|
241
|
+
title: z.ZodString;
|
|
242
|
+
description: z.ZodString;
|
|
243
|
+
weight: z.ZodEnum<{
|
|
244
|
+
broad: "broad";
|
|
245
|
+
ceremony: "ceremony";
|
|
246
|
+
targeted: "targeted";
|
|
247
|
+
}>;
|
|
248
|
+
binding: z.ZodEnum<{
|
|
249
|
+
"exact-revision": "exact-revision";
|
|
250
|
+
"runtime-tree": "runtime-tree";
|
|
251
|
+
"surface-content": "surface-content";
|
|
252
|
+
}>;
|
|
253
|
+
subjects: z.ZodArray<z.ZodEnum<{
|
|
254
|
+
documentation: "documentation";
|
|
255
|
+
evaluation: "evaluation";
|
|
256
|
+
product: "product";
|
|
257
|
+
"proof-infrastructure": "proof-infrastructure";
|
|
258
|
+
}>>;
|
|
259
|
+
verification: z.ZodEnum<{
|
|
260
|
+
attested: "attested";
|
|
261
|
+
executed: "executed";
|
|
262
|
+
}>;
|
|
263
|
+
semanticsVersion: z.ZodInt;
|
|
264
|
+
}, z.core.$strict>;
|
|
265
|
+
export type EvidenceKindSpec = z.infer<typeof EvidenceKindSpecSchema>;
|
|
266
|
+
export declare function subjectOfRole(role: SurfaceRole): EvidenceSubject;
|
|
267
|
+
export declare function levelIndex(level: AssuranceLevel): number;
|
|
268
|
+
export declare function levelAt(index: number): AssuranceLevel;
|
|
269
|
+
/** Ordinal (UTF-16 code unit) comparison; never locale-dependent. */
|
|
270
|
+
export declare function compareOrdinal(left: string, right: string): number;
|
|
271
|
+
export declare function sortedUnique<T extends string>(values: Iterable<T>): T[];
|
|
272
|
+
//# sourceMappingURL=model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/proof-planner/model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,4BAA4B,EAAG,OAAgB,CAAC;AAE7D,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,YAAY,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAIxC;CACF;AAED,eAAO,MAAM,gBAAgB,YAAI,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAC;AAC9E,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D,eAAO,MAAM,aAAa,YACxB,SAAS,EACT,mBAAmB,EACnB,YAAY,EACZ,MAAM,EACN,sBAAsB,EACtB,eAAe,CACP,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AACzD,eAAO,MAAM,eAAe,YAAI,QAAQ,EAAE,YAAY,CAAU,CAAC;AACjE,eAAO,MAAM,gBAAgB,YAAI,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,CAAU,CAAC;AACvF,eAAO,MAAM,UAAU,YACrB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