@riddledc/riddle-proof 0.8.83 → 0.8.85
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 +247 -29
- package/capabilities.json +17 -0
- package/dist/advanced/engine-harness.js +2 -2
- package/dist/advanced/index.d.cts +1 -1
- package/dist/advanced/index.d.ts +1 -1
- package/dist/advanced/index.js +4 -4
- package/dist/advanced/proof-run-engine.d.cts +1 -1
- package/dist/advanced/proof-run-engine.d.ts +1 -1
- package/dist/advanced/runner.js +2 -2
- package/dist/change-proof.cjs +22 -260
- package/dist/change-proof.d.cts +1 -1
- package/dist/change-proof.d.ts +1 -1
- package/dist/change-proof.js +2 -2
- package/dist/checked-meaning.cjs +67 -0
- package/dist/checked-meaning.d.cts +2 -0
- package/dist/checked-meaning.d.ts +2 -0
- package/dist/checked-meaning.js +41 -0
- package/dist/{chunk-QYZ3GKCP.js → chunk-AFARUBE4.js} +12 -11
- package/dist/chunk-J2SIQGQI.js +71 -0
- package/dist/{chunk-7OAETQU3.js → chunk-JZKLCY5G.js} +1 -1
- package/dist/chunk-KB7FYRBG.js +46 -0
- package/dist/chunk-NWLKJ2WI.js +31 -0
- package/dist/{chunk-LR4UYJDY.js → chunk-O2AO726C.js} +1 -1
- package/dist/chunk-ODLGSEP2.js +43 -0
- package/dist/chunk-OHDNCXRM.js +17 -0
- package/dist/cli/index.js +7 -7
- package/dist/cli.cjs +265 -1122
- package/dist/cli.d.cts +0 -1
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +7 -7
- package/dist/engine-harness.js +2 -2
- package/dist/grounded-evidence.cjs +95 -0
- package/dist/grounded-evidence.d.cts +2 -0
- package/dist/grounded-evidence.d.ts +2 -0
- package/dist/grounded-evidence.js +69 -0
- package/dist/index.cjs +318 -1539
- package/dist/index.d.cts +9 -3
- package/dist/index.d.ts +9 -3
- package/dist/index.js +136 -16
- package/dist/pr-comment.cjs +17 -107
- package/dist/pr-comment.d.cts +1 -1
- package/dist/pr-comment.d.ts +1 -1
- package/dist/pr-comment.js +3 -3
- package/dist/{proof-run-engine-MiKZt9oY.d.ts → proof-run-engine-BqRoA3Do.d.ts} +3 -3
- package/dist/{proof-run-engine-Baiv6l3A.d.cts → proof-run-engine-DpChFR5H.d.cts} +3 -3
- package/dist/proof-run-engine.d.cts +1 -1
- package/dist/proof-run-engine.d.ts +1 -1
- package/dist/receipts.cjs +10 -255
- package/dist/receipts.d.cts +7 -115
- package/dist/receipts.d.ts +7 -115
- package/dist/receipts.js +1 -1
- package/dist/riddle-client.cjs +23 -695
- package/dist/riddle-client.d.cts +1 -188
- package/dist/riddle-client.d.ts +1 -188
- package/dist/riddle-client.js +5 -2
- package/dist/runner.js +2 -2
- package/dist/runtime/index.cjs +23 -695
- package/dist/runtime/index.d.cts +1 -5
- package/dist/runtime/index.d.ts +1 -5
- package/dist/runtime/index.js +5 -2
- package/dist/runtime/riddle-client.cjs +23 -695
- package/dist/runtime/riddle-client.d.cts +1 -5
- package/dist/runtime/riddle-client.d.ts +1 -5
- package/dist/runtime/riddle-client.js +5 -2
- package/dist/semantic-certificate.cjs +23 -582
- package/dist/semantic-certificate.d.cts +2 -191
- package/dist/semantic-certificate.d.ts +2 -191
- package/dist/semantic-certificate.js +15 -3
- package/package.json +28 -5
- package/runtime/lib/riddle_core_call.mjs +3 -806
- package/dist/chunk-5IFZSUPF.js +0 -644
- package/dist/chunk-DB5ZHRUP.js +0 -585
- package/dist/chunk-MEVVL4TI.js +0 -258
- package/dist/{chunk-WLUMLHII.js → chunk-BID7CKMM.js} +9 -9
- package/dist/{chunk-YH7ADFY4.js → chunk-IVSP24XI.js} +3 -3
package/dist/change-proof.cjs
CHANGED
|
@@ -15,6 +15,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
}
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
18
19
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
20
|
|
|
20
21
|
// src/change-proof.ts
|
|
@@ -47,255 +48,16 @@ var RIDDLE_PROOF_PROFILE_STATUSES = [
|
|
|
47
48
|
];
|
|
48
49
|
|
|
49
50
|
// src/receipts.ts
|
|
50
|
-
var
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
return value.trim();
|
|
61
|
-
}
|
|
62
|
-
function normalizedSourceIdentity(value) {
|
|
63
|
-
if (!isRecord(value)) return {};
|
|
64
|
-
return {
|
|
65
|
-
git_revision: typeof value.git_revision === "string" && value.git_revision.trim() ? value.git_revision.trim() : void 0,
|
|
66
|
-
repository: typeof value.repository === "string" && value.repository.trim() ? value.repository.trim() : void 0,
|
|
67
|
-
dirty: typeof value.dirty === "boolean" ? value.dirty : void 0,
|
|
68
|
-
label: typeof value.label === "string" && value.label.trim() ? value.label.trim() : void 0
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
function parseRiddlePreviewReceipt(value) {
|
|
72
|
-
if (!isRecord(value)) throw new Error("Preview receipt must be an object.");
|
|
73
|
-
if (value.version !== RIDDLE_PREVIEW_RECEIPT_VERSION) {
|
|
74
|
-
throw new Error(`Unsupported Preview receipt version ${String(value.version || "missing")}.`);
|
|
75
|
-
}
|
|
76
|
-
if (!isRecord(value.source)) throw new Error("Preview receipt source must be an object.");
|
|
77
|
-
const expiresAt = requiredString(value, "expires_at", "preview receipt");
|
|
78
|
-
const publishedAt = requiredString(value, "published_at", "preview receipt");
|
|
79
|
-
const contentDigest = requiredString(value, "content_digest", "preview receipt");
|
|
80
|
-
if (!contentDigest.startsWith("sha256:") || contentDigest.length <= "sha256:".length) {
|
|
81
|
-
throw new Error("preview receipt.content_digest must be a sha256 digest.");
|
|
82
|
-
}
|
|
83
|
-
if (!Number.isFinite(Date.parse(expiresAt)) || !Number.isFinite(Date.parse(publishedAt))) {
|
|
84
|
-
throw new Error("Preview receipt timestamps must be valid ISO date strings.");
|
|
85
|
-
}
|
|
86
|
-
return {
|
|
87
|
-
version: RIDDLE_PREVIEW_RECEIPT_VERSION,
|
|
88
|
-
preview_id: requiredString(value, "preview_id", "preview receipt"),
|
|
89
|
-
url: requiredString(value, "url", "preview receipt"),
|
|
90
|
-
expires_at: expiresAt,
|
|
91
|
-
content_digest: contentDigest,
|
|
92
|
-
source: normalizedSourceIdentity(value.source),
|
|
93
|
-
published_at: publishedAt
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
function comparableArtifactName(value) {
|
|
97
|
-
return (value || "").split(/[/?#]/).pop()?.toLowerCase().replace(/\.(png|jpe?g|gif|webp|avif|svg)$/u, "").replace(/[^a-z0-9_-]+/gu, "-").replace(/^-+|-+$/g, "") || "";
|
|
98
|
-
}
|
|
99
|
-
function artifactMatchesLabel(artifact, label) {
|
|
100
|
-
const expected = comparableArtifactName(label);
|
|
101
|
-
if (!expected) return false;
|
|
102
|
-
return [artifact.name, artifact.url, artifact.path].map(comparableArtifactName).some((name) => name === expected || name.endsWith(`-${expected}`));
|
|
103
|
-
}
|
|
104
|
-
function artifactLooksLikeScreenshot(ref) {
|
|
105
|
-
const text = [ref.name, ref.url, ref.path, ref.kind, ref.content_type].filter(Boolean).join(" ").toLowerCase();
|
|
106
|
-
return /screenshot|\bimage\b/.test(text) || /\.(png|jpe?g|gif|webp|avif|svg)(\?|#|$)/.test(text);
|
|
107
|
-
}
|
|
108
|
-
function finalScreenshotLabels(result) {
|
|
109
|
-
const explicit = result.artifacts.canonical_screenshots || [];
|
|
110
|
-
if (explicit.length) return explicit;
|
|
111
|
-
const fromEvidence = (result.evidence?.viewports || []).map((viewport) => viewport.screenshot_label).filter((label) => typeof label === "string" && Boolean(label.trim()));
|
|
112
|
-
if (fromEvidence.length) return fromEvidence;
|
|
113
|
-
return (result.artifacts.screenshots || []).slice(0, 1);
|
|
114
|
-
}
|
|
115
|
-
function setupScreenshotLabels(result) {
|
|
116
|
-
const explicit = result.artifacts.setup_screenshots || [];
|
|
117
|
-
if (explicit.length) return explicit;
|
|
118
|
-
return (result.evidence?.viewports || []).flatMap(
|
|
119
|
-
(viewport) => (viewport.setup_action_results || []).filter((action) => action.action === "screenshot" && action.ok !== false && typeof action.screenshot_label === "string").map((action) => String(action.screenshot_label))
|
|
120
|
-
);
|
|
121
|
-
}
|
|
122
|
-
function observationArtifactFromRef(ref, canonicalLabels, setupLabels) {
|
|
123
|
-
const base = {
|
|
124
|
-
name: ref.name,
|
|
125
|
-
role: ref.role || "artifact",
|
|
126
|
-
url: ref.url,
|
|
127
|
-
path: ref.path,
|
|
128
|
-
kind: ref.kind,
|
|
129
|
-
content_type: ref.content_type,
|
|
130
|
-
source: ref.source
|
|
131
|
-
};
|
|
132
|
-
if (!artifactLooksLikeScreenshot(ref)) return base;
|
|
133
|
-
if (canonicalLabels.some((label) => artifactMatchesLabel(base, label))) {
|
|
134
|
-
return { ...base, role: "canonical_screenshot" };
|
|
135
|
-
}
|
|
136
|
-
if (setupLabels.some((label) => artifactMatchesLabel(base, label))) {
|
|
137
|
-
return { ...base, role: "setup_screenshot" };
|
|
138
|
-
}
|
|
139
|
-
return { ...base, role: "diagnostic" };
|
|
140
|
-
}
|
|
141
|
-
function profileObservationArtifacts(result) {
|
|
142
|
-
const canonicalLabels = finalScreenshotLabels(result);
|
|
143
|
-
const setupLabels = setupScreenshotLabels(result);
|
|
144
|
-
const artifacts = [];
|
|
145
|
-
const seen = /* @__PURE__ */ new Set();
|
|
146
|
-
const add = (artifact) => {
|
|
147
|
-
const key = artifact.url || artifact.path || `${artifact.role}:${artifact.name}`;
|
|
148
|
-
if (!artifact.name || seen.has(key)) return;
|
|
149
|
-
seen.add(key);
|
|
150
|
-
artifacts.push(artifact);
|
|
151
|
-
};
|
|
152
|
-
for (const ref of result.artifacts.riddle_artifacts || []) {
|
|
153
|
-
add(observationArtifactFromRef(ref, canonicalLabels, setupLabels));
|
|
154
|
-
}
|
|
155
|
-
for (const label of canonicalLabels) {
|
|
156
|
-
if (!artifacts.some((artifact) => artifactMatchesLabel(artifact, label))) {
|
|
157
|
-
add({ name: label, path: label, role: "canonical_screenshot", kind: "image" });
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
for (const label of setupLabels) {
|
|
161
|
-
if (!artifacts.some((artifact) => artifactMatchesLabel(artifact, label))) {
|
|
162
|
-
add({ name: label, path: label, role: "setup_screenshot", kind: "image" });
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
for (const label of result.artifacts.screenshots || []) {
|
|
166
|
-
if (!artifacts.some((artifact) => artifactMatchesLabel(artifact, label))) {
|
|
167
|
-
add({ name: label, path: label, role: "diagnostic", kind: "image" });
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
return artifacts;
|
|
171
|
-
}
|
|
172
|
-
function mergeObservationArtifacts(profileArtifacts, suppliedArtifacts) {
|
|
173
|
-
const artifacts = [...profileArtifacts];
|
|
174
|
-
for (const supplied of suppliedArtifacts) {
|
|
175
|
-
const suppliedNames = [supplied.name, supplied.url, supplied.path].map(comparableArtifactName).filter(Boolean);
|
|
176
|
-
const existingIndex = artifacts.findIndex((artifact) => {
|
|
177
|
-
if (supplied.url && artifact.url === supplied.url) return true;
|
|
178
|
-
if (supplied.path && artifact.path === supplied.path) return true;
|
|
179
|
-
return [artifact.name, artifact.url, artifact.path].map(comparableArtifactName).some((name) => name && suppliedNames.includes(name));
|
|
180
|
-
});
|
|
181
|
-
if (existingIndex < 0) {
|
|
182
|
-
artifacts.push(supplied);
|
|
183
|
-
continue;
|
|
184
|
-
}
|
|
185
|
-
const existing = artifacts[existingIndex];
|
|
186
|
-
const role = supplied.role === "canonical_screenshot" || supplied.role === "setup_screenshot" ? supplied.role : existing.role === "canonical_screenshot" || existing.role === "setup_screenshot" ? existing.role : supplied.role === "artifact" ? existing.role : supplied.role;
|
|
187
|
-
artifacts[existingIndex] = {
|
|
188
|
-
...existing,
|
|
189
|
-
...supplied,
|
|
190
|
-
role
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
return artifacts;
|
|
194
|
-
}
|
|
195
|
-
function defaultObservationId(role, capturedAt) {
|
|
196
|
-
return `obs_${role}_${capturedAt.replace(/[^0-9]/g, "").slice(0, 17) || "unknown"}`;
|
|
197
|
-
}
|
|
198
|
-
function profileCheckCounts(result) {
|
|
199
|
-
const counts = { total: result.checks.length, passed: 0, failed: 0, skipped: 0, needs_human_review: 0 };
|
|
200
|
-
for (const check of result.checks) {
|
|
201
|
-
if (check.status === "passed") counts.passed += 1;
|
|
202
|
-
if (check.status === "failed") counts.failed += 1;
|
|
203
|
-
if (check.status === "skipped") counts.skipped += 1;
|
|
204
|
-
if (check.status === "needs_human_review") counts.needs_human_review += 1;
|
|
205
|
-
}
|
|
206
|
-
return counts;
|
|
207
|
-
}
|
|
208
|
-
function createRiddleProofObservationReceipt(input) {
|
|
209
|
-
const capturedAt = input.captured_at || input.profile_result?.captured_at || (/* @__PURE__ */ new Date()).toISOString();
|
|
210
|
-
const profileArtifacts = input.profile_result ? profileObservationArtifacts(input.profile_result) : [];
|
|
211
|
-
const requestedCanonical = input.canonical_screenshot ? { ...input.canonical_screenshot, role: "canonical_screenshot" } : void 0;
|
|
212
|
-
const artifacts = mergeObservationArtifacts(
|
|
213
|
-
profileArtifacts,
|
|
214
|
-
[...input.artifacts || [], ...requestedCanonical ? [requestedCanonical] : []]
|
|
215
|
-
);
|
|
216
|
-
const canonicalScreenshot = requestedCanonical ? artifacts.find((artifact) => artifact.role === "canonical_screenshot" && artifactMatchesLabel(artifact, requestedCanonical.name)) || requestedCanonical : artifacts.find((artifact) => artifact.role === "canonical_screenshot");
|
|
217
|
-
const target = input.target.kind === "preview" && input.target.preview ? { ...input.target, preview: parseRiddlePreviewReceipt(input.target.preview) } : input.target;
|
|
218
|
-
return {
|
|
219
|
-
version: RIDDLE_PROOF_OBSERVATION_RECEIPT_VERSION,
|
|
220
|
-
observation_id: input.observation_id || defaultObservationId(input.comparison_role, capturedAt),
|
|
221
|
-
comparison_role: input.comparison_role,
|
|
222
|
-
executor: input.executor,
|
|
223
|
-
target,
|
|
224
|
-
source: normalizedSourceIdentity(input.source || input.target.preview?.source),
|
|
225
|
-
captured_at: capturedAt,
|
|
226
|
-
artifacts,
|
|
227
|
-
canonical_screenshot: canonicalScreenshot,
|
|
228
|
-
profile_summary: input.profile_result ? {
|
|
229
|
-
profile_name: input.profile_result.profile_name,
|
|
230
|
-
status: input.profile_result.status,
|
|
231
|
-
summary: input.profile_result.summary,
|
|
232
|
-
route: input.profile_result.route,
|
|
233
|
-
checks: profileCheckCounts(input.profile_result)
|
|
234
|
-
} : void 0,
|
|
235
|
-
proof: input.profile_result ? {
|
|
236
|
-
profile_name: input.profile_result.profile_name,
|
|
237
|
-
result: input.profile_result
|
|
238
|
-
} : void 0,
|
|
239
|
-
publication: input.publication,
|
|
240
|
-
execution: input.execution,
|
|
241
|
-
metadata: input.metadata
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
function parseRiddleProofObservationReceipt(value) {
|
|
245
|
-
if (!isRecord(value)) throw new Error("Observation receipt must be an object.");
|
|
246
|
-
if (value.version !== RIDDLE_PROOF_OBSERVATION_RECEIPT_VERSION) {
|
|
247
|
-
throw new Error(`Unsupported Observation receipt version ${String(value.version || "missing")}.`);
|
|
248
|
-
}
|
|
249
|
-
if (!isRecord(value.executor)) throw new Error("Observation receipt executor must be an object.");
|
|
250
|
-
if (!isRecord(value.target)) throw new Error("Observation receipt target must be an object.");
|
|
251
|
-
if (!isRecord(value.source)) throw new Error("Observation receipt source must be an object.");
|
|
252
|
-
requiredString(value, "observation_id", "observation receipt");
|
|
253
|
-
requiredString(value, "captured_at", "observation receipt");
|
|
254
|
-
const executorKind = requiredString(value.executor, "kind", "observation receipt executor");
|
|
255
|
-
if (!"local_playwright,riddle_hosted,browser_api,other".split(",").includes(executorKind)) {
|
|
256
|
-
throw new Error(`Unsupported observation executor kind ${executorKind}.`);
|
|
257
|
-
}
|
|
258
|
-
if (value.executor.runner !== void 0) {
|
|
259
|
-
requiredString(value.executor, "runner", "observation receipt executor");
|
|
260
|
-
}
|
|
261
|
-
const role = requiredString(value, "comparison_role", "observation receipt");
|
|
262
|
-
if (!["before", "after", "standalone"].includes(role)) {
|
|
263
|
-
throw new Error(`Unsupported observation comparison role ${role}.`);
|
|
264
|
-
}
|
|
265
|
-
const targetKind = requiredString(value.target, "kind", "observation receipt target");
|
|
266
|
-
if (targetKind !== "url" && targetKind !== "preview") {
|
|
267
|
-
throw new Error(`Unsupported observation target kind ${targetKind}.`);
|
|
268
|
-
}
|
|
269
|
-
requiredString(value.target, "url", "observation receipt target");
|
|
270
|
-
if (targetKind === "preview") {
|
|
271
|
-
if (value.target.preview === void 0) {
|
|
272
|
-
throw new Error("Preview Observation target must include its Preview receipt.");
|
|
273
|
-
}
|
|
274
|
-
parseRiddlePreviewReceipt(value.target.preview);
|
|
275
|
-
}
|
|
276
|
-
if (!Array.isArray(value.artifacts)) throw new Error("Observation receipt artifacts must be an array.");
|
|
277
|
-
const artifactRoles = /* @__PURE__ */ new Set(["canonical_screenshot", "setup_screenshot", "data", "diagnostic", "artifact"]);
|
|
278
|
-
const artifacts = value.artifacts.map((artifact, index) => {
|
|
279
|
-
if (!isRecord(artifact)) throw new Error(`Observation receipt artifact ${index} must be an object.`);
|
|
280
|
-
requiredString(artifact, "name", `observation receipt artifact ${index}`);
|
|
281
|
-
const artifactRole = requiredString(artifact, "role", `observation receipt artifact ${index}`);
|
|
282
|
-
if (!artifactRoles.has(artifactRole)) {
|
|
283
|
-
throw new Error(`Unsupported observation artifact role ${artifactRole}.`);
|
|
284
|
-
}
|
|
285
|
-
return artifact;
|
|
286
|
-
});
|
|
287
|
-
if (value.canonical_screenshot !== void 0) {
|
|
288
|
-
if (!isRecord(value.canonical_screenshot) || value.canonical_screenshot.role !== "canonical_screenshot") {
|
|
289
|
-
throw new Error("Observation canonical_screenshot must have the canonical_screenshot role.");
|
|
290
|
-
}
|
|
291
|
-
const canonical = value.canonical_screenshot;
|
|
292
|
-
const included = artifacts.some((artifact) => artifact.role === "canonical_screenshot" && artifact.name === canonical.name && artifact.url === canonical.url && artifact.path === canonical.path);
|
|
293
|
-
if (!included) {
|
|
294
|
-
throw new Error("Observation canonical_screenshot must reference an artifact in the receipt.");
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
return value;
|
|
298
|
-
}
|
|
51
|
+
var receipts_exports = {};
|
|
52
|
+
__export(receipts_exports, {
|
|
53
|
+
RIDDLE_PREVIEW_RECEIPT_VERSION: () => import_receipts.RIDDLE_PREVIEW_RECEIPT_VERSION,
|
|
54
|
+
RIDDLE_PROOF_OBSERVATION_RECEIPT_VERSION: () => import_receipts.RIDDLE_PROOF_OBSERVATION_RECEIPT_VERSION,
|
|
55
|
+
createRiddleProofObservationReceipt: () => import_receipts.createRiddleProofObservationReceipt,
|
|
56
|
+
parseRiddlePreviewReceipt: () => import_receipts.parseRiddlePreviewReceipt,
|
|
57
|
+
parseRiddleProofObservationReceipt: () => import_receipts.parseRiddleProofObservationReceipt
|
|
58
|
+
});
|
|
59
|
+
__reExport(receipts_exports, require("@riddledc/riddle-proof-core/receipts"));
|
|
60
|
+
var import_receipts = require("@riddledc/riddle-proof-core/receipts");
|
|
299
61
|
|
|
300
62
|
// src/change-proof.ts
|
|
301
63
|
var RIDDLE_PROOF_CHANGE_CONTRACT_VERSION = "riddle-proof.change-contract.v1";
|
|
@@ -639,7 +401,7 @@ function changeReceiptVerdict(status) {
|
|
|
639
401
|
if (status === "proof_insufficient") return "proof_insufficient";
|
|
640
402
|
return "not_mergeable";
|
|
641
403
|
}
|
|
642
|
-
function
|
|
404
|
+
function profileCheckCounts(result) {
|
|
643
405
|
const counts = {
|
|
644
406
|
total: result.checks.length,
|
|
645
407
|
passed: 0,
|
|
@@ -712,7 +474,7 @@ function observationExecutor(result) {
|
|
|
712
474
|
function observationForReceiptSide(side, result, source, sourceIdentity) {
|
|
713
475
|
if (!result) throw new Error(`${side}_result or ${side}_observation is required.`);
|
|
714
476
|
if (!source) throw new Error(`${side}_source or ${side}_observation is required.`);
|
|
715
|
-
return createRiddleProofObservationReceipt({
|
|
477
|
+
return (0, import_receipts.createRiddleProofObservationReceipt)({
|
|
716
478
|
comparison_role: side,
|
|
717
479
|
executor: observationExecutor(result),
|
|
718
480
|
target: { kind: "url", url: source },
|
|
@@ -723,8 +485,8 @@ function observationForReceiptSide(side, result, source, sourceIdentity) {
|
|
|
723
485
|
});
|
|
724
486
|
}
|
|
725
487
|
function createRiddleProofChangeReceipt(input) {
|
|
726
|
-
const before = input.before_observation ? parseRiddleProofObservationReceipt(input.before_observation) : observationForReceiptSide("before", input.before_result, input.before_source, input.before_source_identity);
|
|
727
|
-
const after = input.after_observation ? parseRiddleProofObservationReceipt(input.after_observation) : observationForReceiptSide("after", input.after_result, input.after_source, input.after_source_identity);
|
|
488
|
+
const before = input.before_observation ? (0, import_receipts.parseRiddleProofObservationReceipt)(input.before_observation) : observationForReceiptSide("before", input.before_result, input.before_source, input.before_source_identity);
|
|
489
|
+
const after = input.after_observation ? (0, import_receipts.parseRiddleProofObservationReceipt)(input.after_observation) : observationForReceiptSide("after", input.after_result, input.after_source, input.after_source_identity);
|
|
728
490
|
const verdict = changeReceiptVerdict(input.result.status);
|
|
729
491
|
const shippingAuthorization = input.shipping_authorization || noShippingAuthorization();
|
|
730
492
|
assertShippingAuthorizationConsistent(shippingAuthorization, "Change receipt");
|
|
@@ -754,7 +516,7 @@ function createRiddleProofChangeReceipt(input) {
|
|
|
754
516
|
metadata: input.result.metadata
|
|
755
517
|
};
|
|
756
518
|
}
|
|
757
|
-
function
|
|
519
|
+
function isRecord(value) {
|
|
758
520
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
759
521
|
}
|
|
760
522
|
function migratedObservationFromLegacySide(side, legacy) {
|
|
@@ -831,7 +593,7 @@ function migrateRiddleProofChangeReceipt(legacy) {
|
|
|
831
593
|
};
|
|
832
594
|
}
|
|
833
595
|
function parseRiddleProofChangeReceipt(value) {
|
|
834
|
-
if (!
|
|
596
|
+
if (!isRecord(value)) throw new Error("Change receipt must be an object.");
|
|
835
597
|
if (value.version === RIDDLE_PROOF_CHANGE_RECEIPT_V1_VERSION) {
|
|
836
598
|
return migrateRiddleProofChangeReceipt(value);
|
|
837
599
|
}
|
|
@@ -842,8 +604,8 @@ function parseRiddleProofChangeReceipt(value) {
|
|
|
842
604
|
if (!RIDDLE_PROOF_PROFILE_STATUSES.includes(receipt.status)) {
|
|
843
605
|
throw new Error(`Unsupported Change receipt status ${String(receipt.status || "missing")}.`);
|
|
844
606
|
}
|
|
845
|
-
parseRiddleProofObservationReceipt(receipt.before);
|
|
846
|
-
parseRiddleProofObservationReceipt(receipt.after);
|
|
607
|
+
(0, import_receipts.parseRiddleProofObservationReceipt)(receipt.before);
|
|
608
|
+
(0, import_receipts.parseRiddleProofObservationReceipt)(receipt.after);
|
|
847
609
|
if (receipt.before.comparison_role !== "before" || receipt.after.comparison_role !== "after") {
|
|
848
610
|
throw new Error("Change receipt observations must preserve their before and after comparison roles.");
|
|
849
611
|
}
|
|
@@ -875,8 +637,8 @@ function createRiddleProofHandoffReceipt(changeReceipt, options = {}) {
|
|
|
875
637
|
};
|
|
876
638
|
}
|
|
877
639
|
function parseRiddleProofHandoffReceipt(value) {
|
|
878
|
-
if (!
|
|
879
|
-
throw new Error(`Unsupported Handoff receipt version ${String(
|
|
640
|
+
if (!isRecord(value) || value.version !== RIDDLE_PROOF_HANDOFF_RECEIPT_VERSION) {
|
|
641
|
+
throw new Error(`Unsupported Handoff receipt version ${String(isRecord(value) ? value.version || "missing" : "missing")}.`);
|
|
880
642
|
}
|
|
881
643
|
const receipt = value;
|
|
882
644
|
if (!Number.isFinite(Date.parse(receipt.created_at))) {
|
|
@@ -931,7 +693,7 @@ function receiptSideView(side, observation) {
|
|
|
931
693
|
summary: summary?.summary || observation.proof?.result.summary || "No profile summary recorded.",
|
|
932
694
|
route: summary?.route,
|
|
933
695
|
captured_at: observation.captured_at,
|
|
934
|
-
checks: summary?.checks || (observation.proof ?
|
|
696
|
+
checks: summary?.checks || (observation.proof ? profileCheckCounts(observation.proof.result) : {
|
|
935
697
|
total: 0,
|
|
936
698
|
passed: 0,
|
|
937
699
|
failed: 0,
|
package/dist/change-proof.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RiddleProofProfileResult, RiddleProofProfileStatus, RiddleProofProfileCheckResult } from './profile.cjs';
|
|
2
|
-
import { RiddleProofObservationReceipt, RiddleProofSourceIdentity, RiddleProofObservationArtifact } from '
|
|
2
|
+
import { RiddleProofObservationReceipt, RiddleProofSourceIdentity, RiddleProofObservationArtifact } from '@riddledc/riddle-proof-core/receipts';
|
|
3
3
|
import { JsonValue } from './types.cjs';
|
|
4
4
|
import './public-state.cjs';
|
|
5
5
|
|
package/dist/change-proof.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RiddleProofProfileResult, RiddleProofProfileStatus, RiddleProofProfileCheckResult } from './profile.js';
|
|
2
|
-
import { RiddleProofObservationReceipt, RiddleProofSourceIdentity, RiddleProofObservationArtifact } from '
|
|
2
|
+
import { RiddleProofObservationReceipt, RiddleProofSourceIdentity, RiddleProofObservationArtifact } from '@riddledc/riddle-proof-core/receipts';
|
|
3
3
|
import { JsonValue } from './types.js';
|
|
4
4
|
import './public-state.js';
|
|
5
5
|
|
package/dist/change-proof.js
CHANGED
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
parseRiddleProofHandoffReceipt,
|
|
13
13
|
riddleProofChangeReceiptHtml,
|
|
14
14
|
riddleProofChangeReceiptMarkdown
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-O2AO726C.js";
|
|
16
|
+
import "./chunk-OHDNCXRM.js";
|
|
17
17
|
import "./chunk-2K3DIK7A.js";
|
|
18
18
|
import "./chunk-MLKGABMK.js";
|
|
19
19
|
export {
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/checked-meaning.ts
|
|
22
|
+
var checked_meaning_exports = {};
|
|
23
|
+
__export(checked_meaning_exports, {
|
|
24
|
+
RIDDLE_PROOF_CHECKED_MEANING_ASSURANCE: () => import_checked_meaning.RIDDLE_PROOF_CHECKED_MEANING_ASSURANCE,
|
|
25
|
+
RIDDLE_PROOF_CHECKED_MEANING_CLOSURE_VERSION: () => import_checked_meaning.RIDDLE_PROOF_CHECKED_MEANING_CLOSURE_VERSION,
|
|
26
|
+
RIDDLE_PROOF_CHECKED_MEANING_MATERIALIZED_RULE_DIGEST_DOMAIN: () => import_checked_meaning.RIDDLE_PROOF_CHECKED_MEANING_MATERIALIZED_RULE_DIGEST_DOMAIN,
|
|
27
|
+
RIDDLE_PROOF_CHECKED_MEANING_MAX_AGE_MS: () => import_checked_meaning.RIDDLE_PROOF_CHECKED_MEANING_MAX_AGE_MS,
|
|
28
|
+
RIDDLE_PROOF_CHECKED_MEANING_MAX_CONSUMPTION_WINDOW_MS: () => import_checked_meaning.RIDDLE_PROOF_CHECKED_MEANING_MAX_CONSUMPTION_WINDOW_MS,
|
|
29
|
+
RIDDLE_PROOF_CHECKED_MEANING_MAX_DEFINITION_BYTES: () => import_checked_meaning.RIDDLE_PROOF_CHECKED_MEANING_MAX_DEFINITION_BYTES,
|
|
30
|
+
RIDDLE_PROOF_CHECKED_MEANING_MAX_PARAMETERS: () => import_checked_meaning.RIDDLE_PROOF_CHECKED_MEANING_MAX_PARAMETERS,
|
|
31
|
+
RIDDLE_PROOF_CHECKED_MEANING_MAX_PREMISES: () => import_checked_meaning.RIDDLE_PROOF_CHECKED_MEANING_MAX_PREMISES,
|
|
32
|
+
RIDDLE_PROOF_CHECKED_MEANING_MAX_RULES: () => import_checked_meaning.RIDDLE_PROOF_CHECKED_MEANING_MAX_RULES,
|
|
33
|
+
RIDDLE_PROOF_CHECKED_MEANING_RULE_DIGEST_DOMAIN: () => import_checked_meaning.RIDDLE_PROOF_CHECKED_MEANING_RULE_DIGEST_DOMAIN,
|
|
34
|
+
RIDDLE_PROOF_CHECKED_MEANING_RULE_ENGINE: () => import_checked_meaning.RIDDLE_PROOF_CHECKED_MEANING_RULE_ENGINE,
|
|
35
|
+
assessRiddleProofCheckedMeaningClosure: () => import_checked_meaning.assessRiddleProofCheckedMeaningClosure,
|
|
36
|
+
composeRiddleProofCheckedMeaningClosures: () => import_checked_meaning.composeRiddleProofCheckedMeaningClosures,
|
|
37
|
+
createRiddleProofCheckedMeaningAtomicClosure: () => import_checked_meaning.createRiddleProofCheckedMeaningAtomicClosure,
|
|
38
|
+
createRiddleProofCheckedMeaningRule: () => import_checked_meaning.createRiddleProofCheckedMeaningRule,
|
|
39
|
+
matchRiddleProofCheckedMeaningClosure: () => import_checked_meaning.matchRiddleProofCheckedMeaningClosure,
|
|
40
|
+
replayRiddleProofCheckedMeaningClosure: () => import_checked_meaning.replayRiddleProofCheckedMeaningClosure,
|
|
41
|
+
validateRiddleProofCheckedMeaningClosure: () => import_checked_meaning.validateRiddleProofCheckedMeaningClosure
|
|
42
|
+
});
|
|
43
|
+
module.exports = __toCommonJS(checked_meaning_exports);
|
|
44
|
+
__reExport(checked_meaning_exports, require("@riddledc/riddle-proof-core/checked-meaning"), module.exports);
|
|
45
|
+
var import_checked_meaning = require("@riddledc/riddle-proof-core/checked-meaning");
|
|
46
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
+
0 && (module.exports = {
|
|
48
|
+
RIDDLE_PROOF_CHECKED_MEANING_ASSURANCE,
|
|
49
|
+
RIDDLE_PROOF_CHECKED_MEANING_CLOSURE_VERSION,
|
|
50
|
+
RIDDLE_PROOF_CHECKED_MEANING_MATERIALIZED_RULE_DIGEST_DOMAIN,
|
|
51
|
+
RIDDLE_PROOF_CHECKED_MEANING_MAX_AGE_MS,
|
|
52
|
+
RIDDLE_PROOF_CHECKED_MEANING_MAX_CONSUMPTION_WINDOW_MS,
|
|
53
|
+
RIDDLE_PROOF_CHECKED_MEANING_MAX_DEFINITION_BYTES,
|
|
54
|
+
RIDDLE_PROOF_CHECKED_MEANING_MAX_PARAMETERS,
|
|
55
|
+
RIDDLE_PROOF_CHECKED_MEANING_MAX_PREMISES,
|
|
56
|
+
RIDDLE_PROOF_CHECKED_MEANING_MAX_RULES,
|
|
57
|
+
RIDDLE_PROOF_CHECKED_MEANING_RULE_DIGEST_DOMAIN,
|
|
58
|
+
RIDDLE_PROOF_CHECKED_MEANING_RULE_ENGINE,
|
|
59
|
+
assessRiddleProofCheckedMeaningClosure,
|
|
60
|
+
composeRiddleProofCheckedMeaningClosures,
|
|
61
|
+
createRiddleProofCheckedMeaningAtomicClosure,
|
|
62
|
+
createRiddleProofCheckedMeaningRule,
|
|
63
|
+
matchRiddleProofCheckedMeaningClosure,
|
|
64
|
+
replayRiddleProofCheckedMeaningClosure,
|
|
65
|
+
validateRiddleProofCheckedMeaningClosure,
|
|
66
|
+
...require("@riddledc/riddle-proof-core/checked-meaning")
|
|
67
|
+
});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export * from '@riddledc/riddle-proof-core/checked-meaning';
|
|
2
|
+
export { RIDDLE_PROOF_CHECKED_MEANING_ASSURANCE, RIDDLE_PROOF_CHECKED_MEANING_CLOSURE_VERSION, RIDDLE_PROOF_CHECKED_MEANING_MATERIALIZED_RULE_DIGEST_DOMAIN, RIDDLE_PROOF_CHECKED_MEANING_MAX_AGE_MS, RIDDLE_PROOF_CHECKED_MEANING_MAX_CONSUMPTION_WINDOW_MS, RIDDLE_PROOF_CHECKED_MEANING_MAX_DEFINITION_BYTES, RIDDLE_PROOF_CHECKED_MEANING_MAX_PARAMETERS, RIDDLE_PROOF_CHECKED_MEANING_MAX_PREMISES, RIDDLE_PROOF_CHECKED_MEANING_MAX_RULES, RIDDLE_PROOF_CHECKED_MEANING_RULE_DIGEST_DOMAIN, RIDDLE_PROOF_CHECKED_MEANING_RULE_ENGINE, assessRiddleProofCheckedMeaningClosure, composeRiddleProofCheckedMeaningClosures, createRiddleProofCheckedMeaningAtomicClosure, createRiddleProofCheckedMeaningRule, matchRiddleProofCheckedMeaningClosure, replayRiddleProofCheckedMeaningClosure, validateRiddleProofCheckedMeaningClosure } from '@riddledc/riddle-proof-core/checked-meaning';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export * from '@riddledc/riddle-proof-core/checked-meaning';
|
|
2
|
+
export { RIDDLE_PROOF_CHECKED_MEANING_ASSURANCE, RIDDLE_PROOF_CHECKED_MEANING_CLOSURE_VERSION, RIDDLE_PROOF_CHECKED_MEANING_MATERIALIZED_RULE_DIGEST_DOMAIN, RIDDLE_PROOF_CHECKED_MEANING_MAX_AGE_MS, RIDDLE_PROOF_CHECKED_MEANING_MAX_CONSUMPTION_WINDOW_MS, RIDDLE_PROOF_CHECKED_MEANING_MAX_DEFINITION_BYTES, RIDDLE_PROOF_CHECKED_MEANING_MAX_PARAMETERS, RIDDLE_PROOF_CHECKED_MEANING_MAX_PREMISES, RIDDLE_PROOF_CHECKED_MEANING_MAX_RULES, RIDDLE_PROOF_CHECKED_MEANING_RULE_DIGEST_DOMAIN, RIDDLE_PROOF_CHECKED_MEANING_RULE_ENGINE, assessRiddleProofCheckedMeaningClosure, composeRiddleProofCheckedMeaningClosures, createRiddleProofCheckedMeaningAtomicClosure, createRiddleProofCheckedMeaningRule, matchRiddleProofCheckedMeaningClosure, replayRiddleProofCheckedMeaningClosure, validateRiddleProofCheckedMeaningClosure } from '@riddledc/riddle-proof-core/checked-meaning';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import {
|
|
2
|
+
RIDDLE_PROOF_CHECKED_MEANING_ASSURANCE,
|
|
3
|
+
RIDDLE_PROOF_CHECKED_MEANING_CLOSURE_VERSION,
|
|
4
|
+
RIDDLE_PROOF_CHECKED_MEANING_MATERIALIZED_RULE_DIGEST_DOMAIN,
|
|
5
|
+
RIDDLE_PROOF_CHECKED_MEANING_MAX_AGE_MS,
|
|
6
|
+
RIDDLE_PROOF_CHECKED_MEANING_MAX_CONSUMPTION_WINDOW_MS,
|
|
7
|
+
RIDDLE_PROOF_CHECKED_MEANING_MAX_DEFINITION_BYTES,
|
|
8
|
+
RIDDLE_PROOF_CHECKED_MEANING_MAX_PARAMETERS,
|
|
9
|
+
RIDDLE_PROOF_CHECKED_MEANING_MAX_PREMISES,
|
|
10
|
+
RIDDLE_PROOF_CHECKED_MEANING_MAX_RULES,
|
|
11
|
+
RIDDLE_PROOF_CHECKED_MEANING_RULE_DIGEST_DOMAIN,
|
|
12
|
+
RIDDLE_PROOF_CHECKED_MEANING_RULE_ENGINE,
|
|
13
|
+
assessRiddleProofCheckedMeaningClosure,
|
|
14
|
+
composeRiddleProofCheckedMeaningClosures,
|
|
15
|
+
createRiddleProofCheckedMeaningAtomicClosure,
|
|
16
|
+
createRiddleProofCheckedMeaningRule,
|
|
17
|
+
matchRiddleProofCheckedMeaningClosure,
|
|
18
|
+
replayRiddleProofCheckedMeaningClosure,
|
|
19
|
+
validateRiddleProofCheckedMeaningClosure
|
|
20
|
+
} from "./chunk-ODLGSEP2.js";
|
|
21
|
+
import "./chunk-MLKGABMK.js";
|
|
22
|
+
export {
|
|
23
|
+
RIDDLE_PROOF_CHECKED_MEANING_ASSURANCE,
|
|
24
|
+
RIDDLE_PROOF_CHECKED_MEANING_CLOSURE_VERSION,
|
|
25
|
+
RIDDLE_PROOF_CHECKED_MEANING_MATERIALIZED_RULE_DIGEST_DOMAIN,
|
|
26
|
+
RIDDLE_PROOF_CHECKED_MEANING_MAX_AGE_MS,
|
|
27
|
+
RIDDLE_PROOF_CHECKED_MEANING_MAX_CONSUMPTION_WINDOW_MS,
|
|
28
|
+
RIDDLE_PROOF_CHECKED_MEANING_MAX_DEFINITION_BYTES,
|
|
29
|
+
RIDDLE_PROOF_CHECKED_MEANING_MAX_PARAMETERS,
|
|
30
|
+
RIDDLE_PROOF_CHECKED_MEANING_MAX_PREMISES,
|
|
31
|
+
RIDDLE_PROOF_CHECKED_MEANING_MAX_RULES,
|
|
32
|
+
RIDDLE_PROOF_CHECKED_MEANING_RULE_DIGEST_DOMAIN,
|
|
33
|
+
RIDDLE_PROOF_CHECKED_MEANING_RULE_ENGINE,
|
|
34
|
+
assessRiddleProofCheckedMeaningClosure,
|
|
35
|
+
composeRiddleProofCheckedMeaningClosures,
|
|
36
|
+
createRiddleProofCheckedMeaningAtomicClosure,
|
|
37
|
+
createRiddleProofCheckedMeaningRule,
|
|
38
|
+
matchRiddleProofCheckedMeaningClosure,
|
|
39
|
+
replayRiddleProofCheckedMeaningClosure,
|
|
40
|
+
validateRiddleProofCheckedMeaningClosure
|
|
41
|
+
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
|
+
RIDDLE_BALANCE_ENDPOINT_PATH,
|
|
2
3
|
RIDDLE_UNSUBMITTED_WAKE_HINT,
|
|
3
4
|
createRiddleApiClient,
|
|
4
5
|
isTerminalRiddleJobStatus,
|
|
5
6
|
parseRiddleViewport
|
|
6
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KB7FYRBG.js";
|
|
7
8
|
import {
|
|
8
9
|
RIDDLE_PROOF_PR_COMMENT_MARKER,
|
|
9
10
|
buildRiddleProofPrCommentMarkdown,
|
|
10
11
|
summarizeRiddleProofPrComment
|
|
11
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JZKLCY5G.js";
|
|
12
13
|
import {
|
|
13
14
|
suggestRiddleProofProfileChecks
|
|
14
15
|
} from "./chunk-FW7CKARF.js";
|
|
@@ -18,12 +19,12 @@ import {
|
|
|
18
19
|
createRiddleProofHandoffReceipt,
|
|
19
20
|
riddleProofChangeReceiptHtml,
|
|
20
21
|
riddleProofChangeReceiptMarkdown
|
|
21
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-O2AO726C.js";
|
|
22
23
|
import {
|
|
23
24
|
createRiddleProofObservationReceipt,
|
|
24
25
|
parseRiddlePreviewReceipt,
|
|
25
26
|
parseRiddleProofObservationReceipt
|
|
26
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-OHDNCXRM.js";
|
|
27
28
|
import {
|
|
28
29
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|
|
29
30
|
applyRiddleProofProfileArtifactCompleteness,
|
|
@@ -50,7 +51,7 @@ import {
|
|
|
50
51
|
createDisabledRiddleProofAgentAdapter,
|
|
51
52
|
readRiddleProofRunStatus,
|
|
52
53
|
runRiddleProofEngineHarness
|
|
53
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-BID7CKMM.js";
|
|
54
55
|
import {
|
|
55
56
|
createCheckpointResponseTemplate
|
|
56
57
|
} from "./chunk-DYE3URAQ.js";
|
|
@@ -593,7 +594,7 @@ async function hostedRiddleSuiteEnvironmentBlocker(cases, options) {
|
|
|
593
594
|
error: message,
|
|
594
595
|
environment_blocker: {
|
|
595
596
|
source: "riddle_api",
|
|
596
|
-
endpoint:
|
|
597
|
+
endpoint: RIDDLE_BALANCE_ENDPOINT_PATH,
|
|
597
598
|
reason: "balance_preflight_failed",
|
|
598
599
|
balance_preflight: true,
|
|
599
600
|
job_count: cases.length,
|
|
@@ -613,7 +614,7 @@ async function hostedRiddleSuiteEnvironmentBlocker(cases, options) {
|
|
|
613
614
|
error: `Riddle hosted regression balance preflight failed: ${availableSeconds}s available for ${cases.length} serial hosted job(s), minimum ${requiredSeconds}s required.`,
|
|
614
615
|
environment_blocker: {
|
|
615
616
|
source: "riddle_api",
|
|
616
|
-
endpoint:
|
|
617
|
+
endpoint: RIDDLE_BALANCE_ENDPOINT_PATH,
|
|
617
618
|
reason: "insufficient_balance",
|
|
618
619
|
error: "Insufficient available balance",
|
|
619
620
|
balance_preflight: true,
|
|
@@ -4228,7 +4229,7 @@ async function recoverProfileResultFromRiddleArtifacts(profile, input) {
|
|
|
4228
4229
|
for (let attempt = 0; attempt < attempts; attempt += 1) {
|
|
4229
4230
|
let artifactPayload;
|
|
4230
4231
|
try {
|
|
4231
|
-
artifactPayload = await input.client.
|
|
4232
|
+
artifactPayload = await input.client.getJobArtifacts(input.jobId);
|
|
4232
4233
|
} catch {
|
|
4233
4234
|
artifactPayload = {};
|
|
4234
4235
|
}
|
|
@@ -4672,7 +4673,7 @@ async function preflightRiddleProfileBalanceForCli(profile, options, input) {
|
|
|
4672
4673
|
error,
|
|
4673
4674
|
environmentBlocker: {
|
|
4674
4675
|
source: "riddle_api",
|
|
4675
|
-
endpoint:
|
|
4676
|
+
endpoint: RIDDLE_BALANCE_ENDPOINT_PATH,
|
|
4676
4677
|
reason: "balance_preflight_failed",
|
|
4677
4678
|
balance_preflight: true,
|
|
4678
4679
|
...riddleApiErrorBlockerMetadata(error),
|
|
@@ -4694,7 +4695,7 @@ async function preflightRiddleProfileBalanceForCli(profile, options, input) {
|
|
|
4694
4695
|
error: `Riddle balance preflight failed: ${availableSeconds}s available for ${jobCount} intended hosted job(s), minimum ${requiredSeconds}s required.`,
|
|
4695
4696
|
environmentBlocker: {
|
|
4696
4697
|
source: "riddle_api",
|
|
4697
|
-
endpoint:
|
|
4698
|
+
endpoint: RIDDLE_BALANCE_ENDPOINT_PATH,
|
|
4698
4699
|
reason: "insufficient_balance",
|
|
4699
4700
|
error: "Insufficient available balance",
|
|
4700
4701
|
balance_preflight: true,
|
|
@@ -4900,7 +4901,7 @@ async function recoverProfileForCli(profile, options) {
|
|
|
4900
4901
|
const client = createRiddleApiClient(riddleClientConfig(options));
|
|
4901
4902
|
let artifactPayload;
|
|
4902
4903
|
try {
|
|
4903
|
-
artifactPayload = await client.
|
|
4904
|
+
artifactPayload = await client.getJobArtifacts(jobId);
|
|
4904
4905
|
} catch (error) {
|
|
4905
4906
|
return createRiddleProofProfileEnvironmentBlockedResult({
|
|
4906
4907
|
profile,
|