@jevitate/cli 0.28.0 → 0.29.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/README.md +1 -1
- package/dist/approval-provenance.d.ts +9 -1
- package/dist/approval-provenance.js +12 -4
- package/dist/approval-provenance.js.map +1 -1
- package/dist/author-journey-cli.js +1 -1
- package/dist/author-journey-cli.js.map +1 -1
- package/dist/bin.js +12663 -8284
- package/dist/bin.js.map +1 -1
- package/dist/build-info.generated.js +3 -3
- package/dist/catalog-analysis.js +3 -2
- package/dist/catalog-analysis.js.map +1 -1
- package/dist/catalog-bundle.js +2 -2
- package/dist/catalog-bundle.js.map +1 -1
- package/dist/check-plan.js +12 -0
- package/dist/check-plan.js.map +1 -1
- package/dist/demo-aspect-cli.d.ts +10 -0
- package/dist/demo-aspect-cli.js +4 -1
- package/dist/demo-aspect-cli.js.map +1 -1
- package/dist/engine.d.ts +8 -1
- package/dist/engine.js +16 -2
- package/dist/engine.js.map +1 -1
- package/dist/explore-adversarial.js +4 -0
- package/dist/explore-adversarial.js.map +1 -1
- package/dist/explore-cli/feature-strategy.js +1 -0
- package/dist/explore-cli/feature-strategy.js.map +1 -1
- package/dist/explore-cli/run.js +7 -0
- package/dist/explore-cli/run.js.map +1 -1
- package/dist/explore-feature.d.ts +2 -0
- package/dist/explore-feature.js +15 -8
- package/dist/explore-feature.js.map +1 -1
- package/dist/explore-goal.js +12 -0
- package/dist/explore-goal.js.map +1 -1
- package/dist/explore-specs.js +2 -2
- package/dist/explore-specs.js.map +1 -1
- package/dist/heal-probe-guard.d.ts +7 -3
- package/dist/heal-probe-guard.js +8 -2
- package/dist/heal-probe-guard.js.map +1 -1
- package/dist/http-probe.js +2 -2
- package/dist/http-probe.js.map +1 -1
- package/dist/journey-annotate-api.d.ts +5 -0
- package/dist/journey-annotate-api.js +49 -24
- package/dist/journey-annotate-api.js.map +1 -1
- package/dist/journey-annotate-cli.js +4 -1
- package/dist/journey-annotate-cli.js.map +1 -1
- package/dist/journey-api.d.ts +46 -7
- package/dist/journey-api.js +111 -43
- package/dist/journey-api.js.map +1 -1
- package/dist/journey-chain.d.ts +0 -6
- package/dist/journey-chain.js +36 -5
- package/dist/journey-chain.js.map +1 -1
- package/dist/journey-cli/chain.js +6 -0
- package/dist/journey-cli/chain.js.map +1 -1
- package/dist/journey-cli/lint.js +10 -3
- package/dist/journey-cli/lint.js.map +1 -1
- package/dist/journey-cli/run.js +39 -4
- package/dist/journey-cli/run.js.map +1 -1
- package/dist/journey-cli/verify.d.ts +8 -1
- package/dist/journey-cli/verify.js +111 -14
- package/dist/journey-cli/verify.js.map +1 -1
- package/dist/journey-cli-readiness.js +2 -0
- package/dist/journey-cli-readiness.js.map +1 -1
- package/dist/journey-demo-cli.js +2 -0
- package/dist/journey-demo-cli.js.map +1 -1
- package/dist/journey-network-checks.d.ts +4 -0
- package/dist/journey-network-checks.js +6 -2
- package/dist/journey-network-checks.js.map +1 -1
- package/dist/journey-prefix.d.ts +2 -0
- package/dist/journey-prefix.js +20 -1
- package/dist/journey-prefix.js.map +1 -1
- package/dist/journey-proof-context.d.ts +7 -1
- package/dist/journey-proof-context.js +19 -1
- package/dist/journey-proof-context.js.map +1 -1
- package/dist/journey-proof-waiver-cli.js +6 -3
- package/dist/journey-proof-waiver-cli.js.map +1 -1
- package/dist/journey-readiness.js +4 -0
- package/dist/journey-readiness.js.map +1 -1
- package/dist/journey-review-api.js +23 -0
- package/dist/journey-review-api.js.map +1 -1
- package/dist/journey-review.d.ts +30 -10
- package/dist/journey-review.js +33 -39
- package/dist/journey-review.js.map +1 -1
- package/dist/journey-run-record.d.ts +91 -0
- package/dist/journey-run-record.js +239 -0
- package/dist/journey-run-record.js.map +1 -0
- package/dist/journey-stale-api.d.ts +7 -0
- package/dist/journey-stale-api.js +50 -6
- package/dist/journey-stale-api.js.map +1 -1
- package/dist/journey-verify-checkpoint.d.ts +656 -0
- package/dist/journey-verify-checkpoint.js +923 -0
- package/dist/journey-verify-checkpoint.js.map +1 -0
- package/dist/journey-verify.d.ts +84 -3
- package/dist/journey-verify.js +1387 -110
- package/dist/journey-verify.js.map +1 -1
- package/dist/kill-signal.d.ts +24 -2
- package/dist/kill-signal.js +39 -11
- package/dist/kill-signal.js.map +1 -1
- package/dist/load-api.js +31 -2
- package/dist/load-api.js.map +1 -1
- package/dist/load-cli.js +6 -0
- package/dist/load-cli.js.map +1 -1
- package/dist/logs-retention.js +28 -3
- package/dist/logs-retention.js.map +1 -1
- package/dist/mask-values.d.ts +5 -0
- package/dist/mask-values.js +12 -0
- package/dist/mask-values.js.map +1 -0
- package/dist/mcp-api.d.ts +2 -0
- package/dist/mcp-api.js +19 -3
- package/dist/mcp-api.js.map +1 -1
- package/dist/mcp-cli-runner.d.ts +7 -1
- package/dist/mcp-cli-runner.js +30 -3
- package/dist/mcp-cli-runner.js.map +1 -1
- package/dist/mcp-cli-tools.d.ts +9 -1
- package/dist/mcp-cli-tools.js +29 -4
- package/dist/mcp-cli-tools.js.map +1 -1
- package/dist/mcp-paths.js +11 -0
- package/dist/mcp-paths.js.map +1 -1
- package/dist/mcp-run-guard.d.ts +79 -0
- package/dist/mcp-run-guard.js +371 -0
- package/dist/mcp-run-guard.js.map +1 -0
- package/dist/mcp-tools/cli.js +1 -1
- package/dist/mcp-tools/cli.js.map +1 -1
- package/dist/mcp-tools/findings.js +12 -1
- package/dist/mcp-tools/findings.js.map +1 -1
- package/dist/mcp-tools/journey.js +25 -8
- package/dist/mcp-tools/journey.js.map +1 -1
- package/dist/mission-fixtures.d.ts +3 -1
- package/dist/mission-fixtures.js +23 -6
- package/dist/mission-fixtures.js.map +1 -1
- package/dist/mutation-proof-policy.d.ts +2 -0
- package/dist/mutation-proof-policy.js +2 -2
- package/dist/mutation-proof-policy.js.map +1 -1
- package/dist/program.d.ts +6 -0
- package/dist/program.js +6 -9
- package/dist/program.js.map +1 -1
- package/dist/project-dir.d.ts +5 -1
- package/dist/project-dir.js +54 -5
- package/dist/project-dir.js.map +1 -1
- package/dist/readiness.js +3 -1
- package/dist/readiness.js.map +1 -1
- package/dist/regression-api.d.ts +5 -0
- package/dist/regression-api.js +17 -10
- package/dist/regression-api.js.map +1 -1
- package/dist/regression-cli.js +14 -1
- package/dist/regression-cli.js.map +1 -1
- package/dist/report-api.js +6 -0
- package/dist/report-api.js.map +1 -1
- package/dist/resource-preflight.d.ts +2 -1
- package/dist/resource-preflight.js +2 -1
- package/dist/resource-preflight.js.map +1 -1
- package/dist/secret-params.d.ts +82 -0
- package/dist/secret-params.js +234 -0
- package/dist/secret-params.js.map +1 -0
- package/dist/self-heal-adapter.d.ts +2 -2
- package/dist/self-heal-adapter.js +7 -9
- package/dist/self-heal-adapter.js.map +1 -1
- package/dist/source-cli.js +3 -1
- package/dist/source-cli.js.map +1 -1
- package/dist/source-run-api.d.ts +2 -0
- package/dist/source-run-api.js +21 -2
- package/dist/source-run-api.js.map +1 -1
- package/dist/target-config.d.ts +39 -0
- package/dist/target-config.js +76 -1
- package/dist/target-config.js.map +1 -1
- package/dist/terminal-result.d.ts +181 -0
- package/dist/terminal-result.js +609 -0
- package/dist/terminal-result.js.map +1 -0
- package/dist/usability-capture.js +2 -2
- package/dist/usability-capture.js.map +1 -1
- package/dist/ux-usability/hang.js +2 -0
- package/dist/ux-usability/hang.js.map +1 -1
- package/dist/ux-usability.js +6 -0
- package/dist/ux-usability.js.map +1 -1
- package/dist/verify-fix-api.d.ts +43 -0
- package/dist/verify-fix-api.js +138 -10
- package/dist/verify-fix-api.js.map +1 -1
- package/dist/verify-fix-cli.d.ts +6 -1
- package/dist/verify-fix-cli.js +65 -11
- package/dist/verify-fix-cli.js.map +1 -1
- package/package.json +9 -9
- package/skills/jevitate-run-journey/SKILL.md +23 -3
|
@@ -0,0 +1,656 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type Journey, type JourneyAssertionSite, type JourneyMutation, type MutationFailedSite, type MutationPlan, type MutationProofVerdict, type MutationRunResult, type ReplayPace, type TargetedProof } from "@jevitate/journey";
|
|
3
|
+
/**
|
|
4
|
+
* #787: the durable progress of `journey verify --mutate`, one small file per Journey and journey
|
|
5
|
+
* store under `<project>/.jevitate/logs/verify-progress/`, replaced atomically as the proof moves.
|
|
6
|
+
* A "pair" here is one planned mutation with all its replays (first, relaxed, control, targeted),
|
|
7
|
+
* since that is the unit of work a proof finishes: `pairs` in the plan are site↔mutation links.
|
|
8
|
+
*
|
|
9
|
+
* What it stores is what a resumed verdict needs and nothing the app or the operator wrote: outcome
|
|
10
|
+
* classes, structured failed sites, site keys, mutation ids, timings and counts. Never a `reason`, a
|
|
11
|
+
* blocked write's path, hook text, a parameter value or a Journey value. Hooks, params, origins and
|
|
12
|
+
* browser settings are bound by HMAC-SHA-256 under a random key kept in `~/.jevitate/` (0600), never in
|
|
13
|
+
* the project: a plain hash of a short secret parameter could be guessed offline from this file. The
|
|
14
|
+
* same key signs the file, so a change by someone who can write to `.jevitate/` but cannot read the
|
|
15
|
+
* home key refuses the resume. The MAC proves the file came from this user's own runs; it does not
|
|
16
|
+
* stop that user's own processes, which can read the key, nor a rollback to an older genuine file.
|
|
17
|
+
*/
|
|
18
|
+
/** How old a reused result may be. An app changes under an old result, and nothing here can see that. */
|
|
19
|
+
export declare const CHECKPOINT_MAX_AGE_MS: number;
|
|
20
|
+
/** What a refused targeted proof says when its own wording, which is not stored, is gone. */
|
|
21
|
+
export declare const REFUSAL_NOT_KEPT = "refused before the resume; its wording is not kept in the checkpoint";
|
|
22
|
+
/** What a retry's error says on a reused pair: errors can quote the app, so only their count is stored. */
|
|
23
|
+
export declare const RETRY_REASON_NOT_KEPT = "not kept in the checkpoint";
|
|
24
|
+
/**
|
|
25
|
+
* The replay kinds this build knows how to re-check. A kind is a record's name, not a field, so a new kind of
|
|
26
|
+
* replay in the proof adds a name here and a `runReplay` call; a file naming any other kind is refused.
|
|
27
|
+
*/
|
|
28
|
+
export declare const REPLAY_RECORD_KINDS: readonly string[];
|
|
29
|
+
/** Why a replay may have decided another, by class: no site, request or page text. */
|
|
30
|
+
declare const ISOLATION_NOTES: readonly ["write-open", "independence-write-open", "control-write-open", "base-write-open", "state-crossed", "state-stuck", "independence-errored", "siblings-undecided"];
|
|
31
|
+
export type IsolationNote = (typeof ISOLATION_NOTES)[number];
|
|
32
|
+
declare const pairRecord: z.ZodObject<{
|
|
33
|
+
id: z.ZodString;
|
|
34
|
+
kind: z.ZodEnum<{
|
|
35
|
+
skip: "skip";
|
|
36
|
+
"block-write": "block-write";
|
|
37
|
+
"stale-value": "stale-value";
|
|
38
|
+
"swap-param": "swap-param";
|
|
39
|
+
"truncate-param": "truncate-param";
|
|
40
|
+
"guard-param": "guard-param";
|
|
41
|
+
}>;
|
|
42
|
+
step: z.ZodNumber;
|
|
43
|
+
param: z.ZodOptional<z.ZodString>;
|
|
44
|
+
source: z.ZodOptional<z.ZodEnum<{
|
|
45
|
+
reviewed: "reviewed";
|
|
46
|
+
option: "option";
|
|
47
|
+
generated: "generated";
|
|
48
|
+
}>>;
|
|
49
|
+
outcome: z.ZodEnum<{
|
|
50
|
+
error: "error";
|
|
51
|
+
failed: "failed";
|
|
52
|
+
passed: "passed";
|
|
53
|
+
"not-applied": "not-applied";
|
|
54
|
+
}>;
|
|
55
|
+
failedSites: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
56
|
+
where: z.ZodLiteral<"step">;
|
|
57
|
+
step: z.ZodNumber;
|
|
58
|
+
postcondition: z.ZodBoolean;
|
|
59
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
60
|
+
where: z.ZodLiteral<"step-request">;
|
|
61
|
+
step: z.ZodNumber;
|
|
62
|
+
checkIndex: z.ZodNumber;
|
|
63
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
64
|
+
where: z.ZodLiteral<"end-state">;
|
|
65
|
+
index: z.ZodNumber;
|
|
66
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
67
|
+
where: z.ZodLiteral<"unevaluable">;
|
|
68
|
+
}, z.core.$strict>], "where">>;
|
|
69
|
+
waitsCut: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
70
|
+
relaxed: z.ZodOptional<z.ZodObject<{
|
|
71
|
+
outcome: z.ZodEnum<{
|
|
72
|
+
error: "error";
|
|
73
|
+
failed: "failed";
|
|
74
|
+
passed: "passed";
|
|
75
|
+
"not-applied": "not-applied";
|
|
76
|
+
}>;
|
|
77
|
+
failedSites: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
78
|
+
where: z.ZodLiteral<"step">;
|
|
79
|
+
step: z.ZodNumber;
|
|
80
|
+
postcondition: z.ZodBoolean;
|
|
81
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
82
|
+
where: z.ZodLiteral<"step-request">;
|
|
83
|
+
step: z.ZodNumber;
|
|
84
|
+
checkIndex: z.ZodNumber;
|
|
85
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
86
|
+
where: z.ZodLiteral<"end-state">;
|
|
87
|
+
index: z.ZodNumber;
|
|
88
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
89
|
+
where: z.ZodLiteral<"unevaluable">;
|
|
90
|
+
}, z.core.$strict>], "where">>;
|
|
91
|
+
waitsCut: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
92
|
+
atBaseTime: z.ZodOptional<z.ZodObject<{
|
|
93
|
+
outcome: z.ZodEnum<{
|
|
94
|
+
error: "error";
|
|
95
|
+
failed: "failed";
|
|
96
|
+
passed: "passed";
|
|
97
|
+
"not-applied": "not-applied";
|
|
98
|
+
}>;
|
|
99
|
+
failedSites: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
100
|
+
where: z.ZodLiteral<"step">;
|
|
101
|
+
step: z.ZodNumber;
|
|
102
|
+
postcondition: z.ZodBoolean;
|
|
103
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
104
|
+
where: z.ZodLiteral<"step-request">;
|
|
105
|
+
step: z.ZodNumber;
|
|
106
|
+
checkIndex: z.ZodNumber;
|
|
107
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
108
|
+
where: z.ZodLiteral<"end-state">;
|
|
109
|
+
index: z.ZodNumber;
|
|
110
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
111
|
+
where: z.ZodLiteral<"unevaluable">;
|
|
112
|
+
}, z.core.$strict>], "where">>;
|
|
113
|
+
}, z.core.$strict>>;
|
|
114
|
+
}, z.core.$strict>>;
|
|
115
|
+
control: z.ZodOptional<z.ZodEnum<{
|
|
116
|
+
error: "error";
|
|
117
|
+
failed: "failed";
|
|
118
|
+
passed: "passed";
|
|
119
|
+
"not-applied": "not-applied";
|
|
120
|
+
}>>;
|
|
121
|
+
controlSkipped: z.ZodOptional<z.ZodLiteral<true>>;
|
|
122
|
+
atBaseTime: z.ZodOptional<z.ZodObject<{
|
|
123
|
+
outcome: z.ZodEnum<{
|
|
124
|
+
error: "error";
|
|
125
|
+
failed: "failed";
|
|
126
|
+
passed: "passed";
|
|
127
|
+
"not-applied": "not-applied";
|
|
128
|
+
}>;
|
|
129
|
+
failedSites: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
130
|
+
where: z.ZodLiteral<"step">;
|
|
131
|
+
step: z.ZodNumber;
|
|
132
|
+
postcondition: z.ZodBoolean;
|
|
133
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
134
|
+
where: z.ZodLiteral<"step-request">;
|
|
135
|
+
step: z.ZodNumber;
|
|
136
|
+
checkIndex: z.ZodNumber;
|
|
137
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
138
|
+
where: z.ZodLiteral<"end-state">;
|
|
139
|
+
index: z.ZodNumber;
|
|
140
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
141
|
+
where: z.ZodLiteral<"unevaluable">;
|
|
142
|
+
}, z.core.$strict>], "where">>;
|
|
143
|
+
}, z.core.$strict>>;
|
|
144
|
+
targeted: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
145
|
+
site: z.ZodString;
|
|
146
|
+
relaxedSites: z.ZodArray<z.ZodString>;
|
|
147
|
+
outcome: z.ZodEnum<{
|
|
148
|
+
error: "error";
|
|
149
|
+
failed: "failed";
|
|
150
|
+
passed: "passed";
|
|
151
|
+
"not-applied": "not-applied";
|
|
152
|
+
}>;
|
|
153
|
+
failedSites: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
154
|
+
where: z.ZodLiteral<"step">;
|
|
155
|
+
step: z.ZodNumber;
|
|
156
|
+
postcondition: z.ZodBoolean;
|
|
157
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
158
|
+
where: z.ZodLiteral<"step-request">;
|
|
159
|
+
step: z.ZodNumber;
|
|
160
|
+
checkIndex: z.ZodNumber;
|
|
161
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
162
|
+
where: z.ZodLiteral<"end-state">;
|
|
163
|
+
index: z.ZodNumber;
|
|
164
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
165
|
+
where: z.ZodLiteral<"unevaluable">;
|
|
166
|
+
}, z.core.$strict>], "where">>;
|
|
167
|
+
refused: z.ZodOptional<z.ZodEnum<{
|
|
168
|
+
other: "other";
|
|
169
|
+
"relaxation-bound": "relaxation-bound";
|
|
170
|
+
}>>;
|
|
171
|
+
control: z.ZodOptional<z.ZodEnum<{
|
|
172
|
+
error: "error";
|
|
173
|
+
failed: "failed";
|
|
174
|
+
passed: "passed";
|
|
175
|
+
"not-applied": "not-applied";
|
|
176
|
+
}>>;
|
|
177
|
+
declared: z.ZodOptional<z.ZodLiteral<true>>;
|
|
178
|
+
}, z.core.$strict>>>;
|
|
179
|
+
retries: z.ZodNumber;
|
|
180
|
+
finishedAt: z.ZodString;
|
|
181
|
+
replays: z.ZodArray<z.ZodObject<{
|
|
182
|
+
kind: z.ZodString;
|
|
183
|
+
outcome: z.ZodEnum<{
|
|
184
|
+
error: "error";
|
|
185
|
+
failed: "failed";
|
|
186
|
+
passed: "passed";
|
|
187
|
+
"not-applied": "not-applied";
|
|
188
|
+
}>;
|
|
189
|
+
failedSites: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
190
|
+
where: z.ZodLiteral<"step">;
|
|
191
|
+
step: z.ZodNumber;
|
|
192
|
+
postcondition: z.ZodBoolean;
|
|
193
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
194
|
+
where: z.ZodLiteral<"step-request">;
|
|
195
|
+
step: z.ZodNumber;
|
|
196
|
+
checkIndex: z.ZodNumber;
|
|
197
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
198
|
+
where: z.ZodLiteral<"end-state">;
|
|
199
|
+
index: z.ZodNumber;
|
|
200
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
201
|
+
where: z.ZodLiteral<"unevaluable">;
|
|
202
|
+
}, z.core.$strict>], "where">>;
|
|
203
|
+
reachedMs: z.ZodArray<z.ZodNullable<z.ZodNumber>>;
|
|
204
|
+
endStateReachedMs: z.ZodOptional<z.ZodNumber>;
|
|
205
|
+
writesInFlightAtClose: z.ZodNumber;
|
|
206
|
+
}, z.core.$strict>>;
|
|
207
|
+
}, z.core.$strict>;
|
|
208
|
+
declare const bodySchema: z.ZodObject<{
|
|
209
|
+
schema: z.ZodLiteral<2>;
|
|
210
|
+
journeyId: z.ZodString;
|
|
211
|
+
journeyHash: z.ZodString;
|
|
212
|
+
planDigest: z.ZodString;
|
|
213
|
+
bindings: z.ZodObject<{
|
|
214
|
+
params: z.ZodString;
|
|
215
|
+
hook: z.ZodString;
|
|
216
|
+
origin: z.ZodString;
|
|
217
|
+
browser: z.ZodString;
|
|
218
|
+
}, z.core.$strict>;
|
|
219
|
+
build: z.ZodObject<{
|
|
220
|
+
version: z.ZodString;
|
|
221
|
+
commit: z.ZodString;
|
|
222
|
+
builtAt: z.ZodString;
|
|
223
|
+
tree: z.ZodString;
|
|
224
|
+
}, z.core.$strict>;
|
|
225
|
+
total: z.ZodNumber;
|
|
226
|
+
completed: z.ZodArray<z.ZodObject<{
|
|
227
|
+
id: z.ZodString;
|
|
228
|
+
kind: z.ZodEnum<{
|
|
229
|
+
skip: "skip";
|
|
230
|
+
"block-write": "block-write";
|
|
231
|
+
"stale-value": "stale-value";
|
|
232
|
+
"swap-param": "swap-param";
|
|
233
|
+
"truncate-param": "truncate-param";
|
|
234
|
+
"guard-param": "guard-param";
|
|
235
|
+
}>;
|
|
236
|
+
step: z.ZodNumber;
|
|
237
|
+
param: z.ZodOptional<z.ZodString>;
|
|
238
|
+
source: z.ZodOptional<z.ZodEnum<{
|
|
239
|
+
reviewed: "reviewed";
|
|
240
|
+
option: "option";
|
|
241
|
+
generated: "generated";
|
|
242
|
+
}>>;
|
|
243
|
+
outcome: z.ZodEnum<{
|
|
244
|
+
error: "error";
|
|
245
|
+
failed: "failed";
|
|
246
|
+
passed: "passed";
|
|
247
|
+
"not-applied": "not-applied";
|
|
248
|
+
}>;
|
|
249
|
+
failedSites: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
250
|
+
where: z.ZodLiteral<"step">;
|
|
251
|
+
step: z.ZodNumber;
|
|
252
|
+
postcondition: z.ZodBoolean;
|
|
253
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
254
|
+
where: z.ZodLiteral<"step-request">;
|
|
255
|
+
step: z.ZodNumber;
|
|
256
|
+
checkIndex: z.ZodNumber;
|
|
257
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
258
|
+
where: z.ZodLiteral<"end-state">;
|
|
259
|
+
index: z.ZodNumber;
|
|
260
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
261
|
+
where: z.ZodLiteral<"unevaluable">;
|
|
262
|
+
}, z.core.$strict>], "where">>;
|
|
263
|
+
waitsCut: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
264
|
+
relaxed: z.ZodOptional<z.ZodObject<{
|
|
265
|
+
outcome: z.ZodEnum<{
|
|
266
|
+
error: "error";
|
|
267
|
+
failed: "failed";
|
|
268
|
+
passed: "passed";
|
|
269
|
+
"not-applied": "not-applied";
|
|
270
|
+
}>;
|
|
271
|
+
failedSites: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
272
|
+
where: z.ZodLiteral<"step">;
|
|
273
|
+
step: z.ZodNumber;
|
|
274
|
+
postcondition: z.ZodBoolean;
|
|
275
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
276
|
+
where: z.ZodLiteral<"step-request">;
|
|
277
|
+
step: z.ZodNumber;
|
|
278
|
+
checkIndex: z.ZodNumber;
|
|
279
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
280
|
+
where: z.ZodLiteral<"end-state">;
|
|
281
|
+
index: z.ZodNumber;
|
|
282
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
283
|
+
where: z.ZodLiteral<"unevaluable">;
|
|
284
|
+
}, z.core.$strict>], "where">>;
|
|
285
|
+
waitsCut: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
286
|
+
atBaseTime: z.ZodOptional<z.ZodObject<{
|
|
287
|
+
outcome: z.ZodEnum<{
|
|
288
|
+
error: "error";
|
|
289
|
+
failed: "failed";
|
|
290
|
+
passed: "passed";
|
|
291
|
+
"not-applied": "not-applied";
|
|
292
|
+
}>;
|
|
293
|
+
failedSites: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
294
|
+
where: z.ZodLiteral<"step">;
|
|
295
|
+
step: z.ZodNumber;
|
|
296
|
+
postcondition: z.ZodBoolean;
|
|
297
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
298
|
+
where: z.ZodLiteral<"step-request">;
|
|
299
|
+
step: z.ZodNumber;
|
|
300
|
+
checkIndex: z.ZodNumber;
|
|
301
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
302
|
+
where: z.ZodLiteral<"end-state">;
|
|
303
|
+
index: z.ZodNumber;
|
|
304
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
305
|
+
where: z.ZodLiteral<"unevaluable">;
|
|
306
|
+
}, z.core.$strict>], "where">>;
|
|
307
|
+
}, z.core.$strict>>;
|
|
308
|
+
}, z.core.$strict>>;
|
|
309
|
+
control: z.ZodOptional<z.ZodEnum<{
|
|
310
|
+
error: "error";
|
|
311
|
+
failed: "failed";
|
|
312
|
+
passed: "passed";
|
|
313
|
+
"not-applied": "not-applied";
|
|
314
|
+
}>>;
|
|
315
|
+
controlSkipped: z.ZodOptional<z.ZodLiteral<true>>;
|
|
316
|
+
atBaseTime: z.ZodOptional<z.ZodObject<{
|
|
317
|
+
outcome: z.ZodEnum<{
|
|
318
|
+
error: "error";
|
|
319
|
+
failed: "failed";
|
|
320
|
+
passed: "passed";
|
|
321
|
+
"not-applied": "not-applied";
|
|
322
|
+
}>;
|
|
323
|
+
failedSites: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
324
|
+
where: z.ZodLiteral<"step">;
|
|
325
|
+
step: z.ZodNumber;
|
|
326
|
+
postcondition: z.ZodBoolean;
|
|
327
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
328
|
+
where: z.ZodLiteral<"step-request">;
|
|
329
|
+
step: z.ZodNumber;
|
|
330
|
+
checkIndex: z.ZodNumber;
|
|
331
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
332
|
+
where: z.ZodLiteral<"end-state">;
|
|
333
|
+
index: z.ZodNumber;
|
|
334
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
335
|
+
where: z.ZodLiteral<"unevaluable">;
|
|
336
|
+
}, z.core.$strict>], "where">>;
|
|
337
|
+
}, z.core.$strict>>;
|
|
338
|
+
targeted: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
339
|
+
site: z.ZodString;
|
|
340
|
+
relaxedSites: z.ZodArray<z.ZodString>;
|
|
341
|
+
outcome: z.ZodEnum<{
|
|
342
|
+
error: "error";
|
|
343
|
+
failed: "failed";
|
|
344
|
+
passed: "passed";
|
|
345
|
+
"not-applied": "not-applied";
|
|
346
|
+
}>;
|
|
347
|
+
failedSites: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
348
|
+
where: z.ZodLiteral<"step">;
|
|
349
|
+
step: z.ZodNumber;
|
|
350
|
+
postcondition: z.ZodBoolean;
|
|
351
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
352
|
+
where: z.ZodLiteral<"step-request">;
|
|
353
|
+
step: z.ZodNumber;
|
|
354
|
+
checkIndex: z.ZodNumber;
|
|
355
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
356
|
+
where: z.ZodLiteral<"end-state">;
|
|
357
|
+
index: z.ZodNumber;
|
|
358
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
359
|
+
where: z.ZodLiteral<"unevaluable">;
|
|
360
|
+
}, z.core.$strict>], "where">>;
|
|
361
|
+
refused: z.ZodOptional<z.ZodEnum<{
|
|
362
|
+
other: "other";
|
|
363
|
+
"relaxation-bound": "relaxation-bound";
|
|
364
|
+
}>>;
|
|
365
|
+
control: z.ZodOptional<z.ZodEnum<{
|
|
366
|
+
error: "error";
|
|
367
|
+
failed: "failed";
|
|
368
|
+
passed: "passed";
|
|
369
|
+
"not-applied": "not-applied";
|
|
370
|
+
}>>;
|
|
371
|
+
declared: z.ZodOptional<z.ZodLiteral<true>>;
|
|
372
|
+
}, z.core.$strict>>>;
|
|
373
|
+
retries: z.ZodNumber;
|
|
374
|
+
finishedAt: z.ZodString;
|
|
375
|
+
replays: z.ZodArray<z.ZodObject<{
|
|
376
|
+
kind: z.ZodString;
|
|
377
|
+
outcome: z.ZodEnum<{
|
|
378
|
+
error: "error";
|
|
379
|
+
failed: "failed";
|
|
380
|
+
passed: "passed";
|
|
381
|
+
"not-applied": "not-applied";
|
|
382
|
+
}>;
|
|
383
|
+
failedSites: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
384
|
+
where: z.ZodLiteral<"step">;
|
|
385
|
+
step: z.ZodNumber;
|
|
386
|
+
postcondition: z.ZodBoolean;
|
|
387
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
388
|
+
where: z.ZodLiteral<"step-request">;
|
|
389
|
+
step: z.ZodNumber;
|
|
390
|
+
checkIndex: z.ZodNumber;
|
|
391
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
392
|
+
where: z.ZodLiteral<"end-state">;
|
|
393
|
+
index: z.ZodNumber;
|
|
394
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
395
|
+
where: z.ZodLiteral<"unevaluable">;
|
|
396
|
+
}, z.core.$strict>], "where">>;
|
|
397
|
+
reachedMs: z.ZodArray<z.ZodNullable<z.ZodNumber>>;
|
|
398
|
+
endStateReachedMs: z.ZodOptional<z.ZodNumber>;
|
|
399
|
+
writesInFlightAtClose: z.ZodNumber;
|
|
400
|
+
}, z.core.$strict>>;
|
|
401
|
+
}, z.core.$strict>>;
|
|
402
|
+
phase: z.ZodEnum<{
|
|
403
|
+
base: "base";
|
|
404
|
+
independence: "independence";
|
|
405
|
+
pairs: "pairs";
|
|
406
|
+
disagreements: "disagreements";
|
|
407
|
+
closing: "closing";
|
|
408
|
+
}>;
|
|
409
|
+
independence: z.ZodNullable<z.ZodEnum<{
|
|
410
|
+
passed: "passed";
|
|
411
|
+
"hold-breaks-claim": "hold-breaks-claim";
|
|
412
|
+
}>>;
|
|
413
|
+
currentPair: z.ZodNullable<z.ZodString>;
|
|
414
|
+
replay: z.ZodNumber;
|
|
415
|
+
startedAt: z.ZodString;
|
|
416
|
+
updatedAt: z.ZodString;
|
|
417
|
+
state: z.ZodEnum<{
|
|
418
|
+
running: "running";
|
|
419
|
+
interrupted: "interrupted";
|
|
420
|
+
finished: "finished";
|
|
421
|
+
}>;
|
|
422
|
+
verdict: z.ZodOptional<z.ZodEnum<{
|
|
423
|
+
inconclusive: "inconclusive";
|
|
424
|
+
proven: "proven";
|
|
425
|
+
insensitive: "insensitive";
|
|
426
|
+
}>>;
|
|
427
|
+
errorGap: z.ZodOptional<z.ZodLiteral<true>>;
|
|
428
|
+
reusedPairs: z.ZodNumber;
|
|
429
|
+
taint: z.ZodObject<{
|
|
430
|
+
restoreFailed: z.ZodBoolean;
|
|
431
|
+
notIsolatedBy: z.ZodNullable<z.ZodString>;
|
|
432
|
+
isolation: z.ZodNullable<z.ZodEnum<{
|
|
433
|
+
"write-open": "write-open";
|
|
434
|
+
"independence-write-open": "independence-write-open";
|
|
435
|
+
"control-write-open": "control-write-open";
|
|
436
|
+
"base-write-open": "base-write-open";
|
|
437
|
+
"state-crossed": "state-crossed";
|
|
438
|
+
"state-stuck": "state-stuck";
|
|
439
|
+
"independence-errored": "independence-errored";
|
|
440
|
+
"siblings-undecided": "siblings-undecided";
|
|
441
|
+
}>>;
|
|
442
|
+
}, z.core.$strict>;
|
|
443
|
+
verifier: z.ZodObject<{
|
|
444
|
+
pid: z.ZodNumber;
|
|
445
|
+
startToken: z.ZodString;
|
|
446
|
+
host: z.ZodString;
|
|
447
|
+
}, z.core.$strict>;
|
|
448
|
+
}, z.core.$strict>;
|
|
449
|
+
export type CheckpointBody = z.infer<typeof bodySchema>;
|
|
450
|
+
export type CheckpointPair = z.infer<typeof pairRecord>;
|
|
451
|
+
export type CheckpointReplay = CheckpointPair["replays"][number];
|
|
452
|
+
/** Why a resume was refused. Each is checked before any browser opens, but for `base-failed`, `pace` and `isolation`, which need the re-measured base. */
|
|
453
|
+
export type ResumeRefusalReason = "no-checkpoint" | "not-regular-file" | "corrupt" | "integrity" | "key-unavailable" | "finished" | "live-verifier" | "other-host" | "journey-hash" | "mutation-plan" | "params" | "hook" | "origin" | "browser" | "cli-build" | "too-old" | "unknown-record" | "not-writable" | "base-failed" | "pace" | "isolation";
|
|
454
|
+
/**
|
|
455
|
+
* A resume that will not run. It never starts over, and a plain `--mutate` is the way to begin again.
|
|
456
|
+
* Refused before its claim, the checkpoint stays as it was. `base-failed`, `pace` and `isolation` come
|
|
457
|
+
* after the claim wrote it: its finished results stand, but it no longer says `finished`, and an
|
|
458
|
+
* `independence-errored` note is gone. That is harmless: the next resume runs the independence replay again.
|
|
459
|
+
*/
|
|
460
|
+
export declare class JourneyVerifyResumeRefusedError extends Error {
|
|
461
|
+
readonly reason: ResumeRefusalReason;
|
|
462
|
+
readonly code = "E_JOURNEY_VERIFY_RESUME_REFUSED";
|
|
463
|
+
constructor(reason: ResumeRefusalReason, detail: string);
|
|
464
|
+
}
|
|
465
|
+
/** What a proof's checkpoint is bound to, from the command that runs it. Everything but `build` is only ever digested. */
|
|
466
|
+
export interface ProofCheckpointRequest {
|
|
467
|
+
readonly path: string;
|
|
468
|
+
readonly keyFile: string;
|
|
469
|
+
readonly resume: boolean;
|
|
470
|
+
readonly build: CheckpointBody["build"];
|
|
471
|
+
readonly config: {
|
|
472
|
+
readonly hook: unknown;
|
|
473
|
+
readonly origin: unknown;
|
|
474
|
+
readonly browser: unknown;
|
|
475
|
+
};
|
|
476
|
+
/** A short, value-free line for the operator: why this run keeps no progress, or what it replaced or reused. */
|
|
477
|
+
readonly onNotice?: (text: string) => void;
|
|
478
|
+
}
|
|
479
|
+
/** What the hooks' results can depend on that this process can see: their text and limits, and the fixture files' bytes. A script a hook runs is not read. */
|
|
480
|
+
export declare function hookBindingOf(flags: {
|
|
481
|
+
readonly fixtures?: string;
|
|
482
|
+
readonly before?: string;
|
|
483
|
+
readonly after?: string;
|
|
484
|
+
readonly allowShellHooks?: boolean;
|
|
485
|
+
readonly hookTimeoutMs?: string;
|
|
486
|
+
readonly fixtureIdentity?: readonly string[];
|
|
487
|
+
}, environmentFixtures: string | undefined): unknown;
|
|
488
|
+
/** The browser's settings and the session a replay starts from: the file's bytes too, since the same path can hold another login. */
|
|
489
|
+
export declare function browserBindingOf(browser: unknown, emulation: unknown, storageState: string | undefined, secretFields: readonly string[] | undefined): unknown;
|
|
490
|
+
/** `<project or home>/logs/verify-progress/<id>.<store>.json`. The store's digest keeps two stores' same-named Journeys apart. */
|
|
491
|
+
export declare function verifyCheckpointPath(dataRoot: string, journeysDir: string, id: string): string;
|
|
492
|
+
/** `~/.jevitate/verify-checkpoint.key`: outside every project, so no repo or artifact can carry it. */
|
|
493
|
+
export declare function checkpointKeyPath(): string;
|
|
494
|
+
/** A deterministic text for a value: object keys sorted, `undefined` dropped, as JSON has it. */
|
|
495
|
+
export declare function canonicalJson(value: unknown): string;
|
|
496
|
+
/** The plan's ids and shape. It holds names and never a value, so it is a plain hash: a reader with no key can compare it. */
|
|
497
|
+
export declare function mutationPlanDigest(plan: MutationPlan): string;
|
|
498
|
+
export type VerifierState = "live" | "exited" | "stale";
|
|
499
|
+
/** This process, by pid and the kernel's start time for it: a reused pid has another start time. */
|
|
500
|
+
export declare function currentVerifierIdentity(): CheckpointBody["verifier"];
|
|
501
|
+
/**
|
|
502
|
+
* live: the recorded process runs, with the recorded start token, and its proof has not ended. exited:
|
|
503
|
+
* the proof ended, or the process is gone. stale: a process runs under that pid with another start token
|
|
504
|
+
* (the pid was reused), or the record is from another host, where this one cannot check it.
|
|
505
|
+
* Where the platform gives no start time (token "0"), a running pid counts as live: age ends that.
|
|
506
|
+
*/
|
|
507
|
+
export declare function verifierStateOf(body: Pick<CheckpointBody, "state" | "verifier">, startOf?: (pid: number) => string | undefined): VerifierState;
|
|
508
|
+
/** True when a live verifier is still writing this receipt: `logs prune` leaves it, however old. */
|
|
509
|
+
export declare function isLiveVerifyReceipt(path: string): boolean;
|
|
510
|
+
/**
|
|
511
|
+
* The one isolation note a resume can answer: it says the independence replay gave no reading, not that
|
|
512
|
+
* state crossed. A resume never reuses that replay's answer and runs it against the base it re-measures,
|
|
513
|
+
* so dropping the note leaves that fresh run to decide; if it errors too, the note comes back.
|
|
514
|
+
*/
|
|
515
|
+
export declare const isRepairableIsolation: (taint: CheckpointBody["taint"]) => boolean;
|
|
516
|
+
export interface ResumeState {
|
|
517
|
+
readonly pairs: ReadonlyMap<string, CheckpointPair>;
|
|
518
|
+
readonly restoreFailed: boolean;
|
|
519
|
+
readonly notIsolatedBy: string | null;
|
|
520
|
+
/** Why a replay may have decided another. Absent or null with `notIsolatedBy` set: a replay closed with a write open. */
|
|
521
|
+
readonly isolation?: IsolationNote | null;
|
|
522
|
+
}
|
|
523
|
+
/** One proof's writer. A failed write never ends a proof: the next one writes everything again. */
|
|
524
|
+
export declare class ProofCheckpointSession {
|
|
525
|
+
#private;
|
|
526
|
+
readonly path: string;
|
|
527
|
+
readonly key: Buffer;
|
|
528
|
+
readonly onNotice: (text: string) => void;
|
|
529
|
+
constructor(path: string, key: Buffer, body: CheckpointBody, onNotice: (text: string) => void);
|
|
530
|
+
get body(): CheckpointBody;
|
|
531
|
+
replayStarted(replay: number): void;
|
|
532
|
+
independence(independence: NonNullable<CheckpointBody["independence"]>): void;
|
|
533
|
+
phase(phase: CheckpointBody["phase"]): void;
|
|
534
|
+
startPair(id: string): void;
|
|
535
|
+
/** A pair run again after it errored takes its own place, so `completed` stays in the plan's order. */
|
|
536
|
+
finishPair(pair: CheckpointPair): void;
|
|
537
|
+
/**
|
|
538
|
+
* Written the moment it happens: a taint that dies with the process could turn a resumed proof `proven`.
|
|
539
|
+
* So if it cannot be written (a full disk), the older file without it must not stay resumable. A later
|
|
540
|
+
* write that succeeds carries the taint, since each write holds the whole body.
|
|
541
|
+
*/
|
|
542
|
+
taint(change: Partial<CheckpointBody["taint"]>): void;
|
|
543
|
+
finish(verdict: MutationProofVerdict, errorGap: boolean): void;
|
|
544
|
+
/** The proof ended with no verdict, in a process that may go on (an MCP server), so its pid no longer says anything. */
|
|
545
|
+
interrupted(): void;
|
|
546
|
+
}
|
|
547
|
+
export interface OpenedCheckpoint {
|
|
548
|
+
readonly session?: ProofCheckpointSession;
|
|
549
|
+
readonly resume?: ResumeState;
|
|
550
|
+
}
|
|
551
|
+
/**
|
|
552
|
+
* Claims the checkpoint for this run, before any browser. A resume returns the results it may reuse or
|
|
553
|
+
* refuses by name. A fresh run replaces an ended checkpoint and leaves a live verifier's alone, going
|
|
554
|
+
* on without progress of its own, since a proof that ran before this file existed must still run.
|
|
555
|
+
*/
|
|
556
|
+
export declare function openProofCheckpoint(req: ProofCheckpointRequest, proof: {
|
|
557
|
+
readonly journey: Journey;
|
|
558
|
+
readonly journeyHash: string;
|
|
559
|
+
readonly plan: MutationPlan;
|
|
560
|
+
readonly params: Readonly<Record<string, string>>;
|
|
561
|
+
readonly sites: readonly JourneyAssertionSite[];
|
|
562
|
+
}): Promise<OpenedCheckpoint>;
|
|
563
|
+
/** A finished pair's result as `journey-verify` reports it, field by field: anything not named here cannot reach the file. */
|
|
564
|
+
export interface FinishedPair {
|
|
565
|
+
readonly id: string;
|
|
566
|
+
readonly kind: JourneyMutation["kind"];
|
|
567
|
+
readonly step: number;
|
|
568
|
+
readonly param?: string;
|
|
569
|
+
readonly source?: JourneyMutation["source"];
|
|
570
|
+
readonly outcome: MutationRunResult["outcome"];
|
|
571
|
+
readonly failedSites: readonly MutationFailedSite[];
|
|
572
|
+
readonly waitsCut?: readonly string[];
|
|
573
|
+
readonly relaxed?: {
|
|
574
|
+
readonly outcome: MutationRunResult["outcome"];
|
|
575
|
+
readonly failedSites: readonly MutationFailedSite[];
|
|
576
|
+
readonly waitsCut?: readonly string[];
|
|
577
|
+
readonly atBaseTime?: MutationRunResult["atBaseTime"];
|
|
578
|
+
};
|
|
579
|
+
readonly control?: MutationRunResult["outcome"];
|
|
580
|
+
readonly controlSkipped?: true;
|
|
581
|
+
readonly atBaseTime?: MutationRunResult["atBaseTime"];
|
|
582
|
+
readonly targeted?: readonly TargetedProof[];
|
|
583
|
+
readonly retries?: readonly unknown[];
|
|
584
|
+
}
|
|
585
|
+
export declare function checkpointPairOf(pair: FinishedPair, replays: readonly CheckpointReplay[]): CheckpointPair;
|
|
586
|
+
/** One replay in the file's form, by kind. Named fields only, so a `reason` on the run cannot reach the file. */
|
|
587
|
+
export declare function checkpointReplayOf(kind: string, run: {
|
|
588
|
+
readonly outcome: MutationRunResult["outcome"];
|
|
589
|
+
readonly failedSites: readonly MutationFailedSite[];
|
|
590
|
+
readonly reachedMs?: readonly (number | undefined)[];
|
|
591
|
+
readonly endStateReachedMs?: number;
|
|
592
|
+
}, writesInFlightAtClose: number): CheckpointReplay;
|
|
593
|
+
/** The result `classifyMutation` and `mutationProofVerdict` read, as the uninterrupted proof gave them. */
|
|
594
|
+
export declare function reusedProofFields(pair: CheckpointPair): Pick<MutationRunResult, "outcome" | "failedSites"> & Partial<Pick<MutationRunResult, "waitsCut" | "relaxed" | "targeted" | "control" | "atBaseTime">>;
|
|
595
|
+
/**
|
|
596
|
+
* The reused results against a base measured just now. A reused replay was paced to the base of its own
|
|
597
|
+
* run. Under the rule (`evidenceRefusal`) its failure is evidence only if it got there no sooner than an
|
|
598
|
+
* unmutated replay passes that site, and the replay that says so now is the re-measured one. So each
|
|
599
|
+
* reused failure is read again against the new pace, by the same functions the proof uses: reached
|
|
600
|
+
* sooner than the new base, or newly thin with no control that answered for it, refuses the whole resume.
|
|
601
|
+
* A failed replay already cut needs nothing: it counts for nothing either way. A faster base only
|
|
602
|
+
* leaves a reused replay more room. Every record goes through the same loop whatever its kind, controls
|
|
603
|
+
* included. Writes left open are compared as the proof compares them.
|
|
604
|
+
*/
|
|
605
|
+
export declare function resumeRefusalAgainstBase(state: ResumeState, plan: MutationPlan, sites: readonly JourneyAssertionSite[], pace: ReplayPace, baseWritesInFlightAtClose: number): JourneyVerifyResumeRefusedError | undefined;
|
|
606
|
+
export interface VerifyProgressStatus {
|
|
607
|
+
readonly journeyId: string;
|
|
608
|
+
readonly path: string;
|
|
609
|
+
/** valid: the keyed check passed. unverified: readable, but this user has no key to check it with. */
|
|
610
|
+
readonly receipt: "none" | "valid" | "unverified" | "corrupt" | "integrity-failed" | "not-regular-file";
|
|
611
|
+
readonly detail?: string;
|
|
612
|
+
readonly verifier: VerifierState | "none";
|
|
613
|
+
readonly resume: {
|
|
614
|
+
readonly possible: boolean;
|
|
615
|
+
readonly refusal?: ResumeRefusalReason;
|
|
616
|
+
};
|
|
617
|
+
readonly progress?: {
|
|
618
|
+
readonly state: CheckpointBody["state"];
|
|
619
|
+
readonly verdict?: MutationProofVerdict;
|
|
620
|
+
readonly phase: CheckpointBody["phase"];
|
|
621
|
+
/** Pairs finished that a resume keeps. */
|
|
622
|
+
readonly completed: number;
|
|
623
|
+
/** Pairs that ran but that a resume would run again: errored, or short of a control. Zero once a proof takes no resume. */
|
|
624
|
+
readonly toRunAgain: number;
|
|
625
|
+
readonly total: number;
|
|
626
|
+
readonly currentPair: string | null;
|
|
627
|
+
readonly replay: number;
|
|
628
|
+
readonly reusedPairs: number;
|
|
629
|
+
readonly journeyHash: string;
|
|
630
|
+
readonly planDigest: string;
|
|
631
|
+
readonly startedAt: string;
|
|
632
|
+
readonly updatedAt: string;
|
|
633
|
+
readonly lastResultClass: MutationRunResult["outcome"] | null;
|
|
634
|
+
readonly completedPairs: readonly {
|
|
635
|
+
readonly id: string;
|
|
636
|
+
readonly resultClass: MutationRunResult["outcome"];
|
|
637
|
+
readonly finishedAt: string;
|
|
638
|
+
}[];
|
|
639
|
+
readonly verifierPid: number;
|
|
640
|
+
readonly verifierStartToken: string;
|
|
641
|
+
readonly build: CheckpointBody["build"];
|
|
642
|
+
readonly taint: {
|
|
643
|
+
readonly restoreFailed: boolean;
|
|
644
|
+
readonly notIsolated: boolean;
|
|
645
|
+
};
|
|
646
|
+
};
|
|
647
|
+
}
|
|
648
|
+
/**
|
|
649
|
+
* `journey verify <id> --status`: reads the file and asks the OS about one pid. No browser, no hook, no
|
|
650
|
+
* Journey and nothing of the app's. A key is read when there is one and never created. `resume` answers
|
|
651
|
+
* what can be answered without the run's flags, so `possible: true` still leaves the config checks.
|
|
652
|
+
*/
|
|
653
|
+
export declare function readVerifyProgress(path: string, keyFile: string, journeyId: string): VerifyProgressStatus;
|
|
654
|
+
/** One human line for `--status`. */
|
|
655
|
+
export declare function verifyProgressLine(s: VerifyProgressStatus): string;
|
|
656
|
+
export {};
|