@riddledc/riddle-proof 0.8.17 → 0.8.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/advanced/engine-harness.cjs +11 -2
- package/dist/advanced/engine-harness.js +2 -2
- package/dist/advanced/index.cjs +11 -2
- package/dist/advanced/index.js +4 -4
- package/dist/advanced/proof-run-core.cjs +11 -2
- package/dist/advanced/proof-run-core.js +1 -1
- package/dist/advanced/proof-run-engine.cjs +11 -2
- package/dist/advanced/proof-run-engine.js +2 -2
- package/dist/advanced/runner.js +2 -2
- package/dist/{chunk-WJZYRUNV.js → chunk-2JWFSLZ5.js} +1 -1
- package/dist/{chunk-7GZY5PLT.js → chunk-FU73I4V3.js} +11 -2
- package/dist/{chunk-NGX4SUQN.js → chunk-P2RN2NYR.js} +1 -1
- package/dist/{chunk-ZOZLORGR.js → chunk-P6YV63YF.js} +1 -1
- package/dist/{chunk-E7UTJ7KB.js → chunk-WE6U7EEH.js} +1 -1
- package/dist/cli/index.js +3 -3
- package/dist/cli.cjs +11 -2
- package/dist/cli.js +3 -3
- package/dist/engine-harness.cjs +11 -2
- package/dist/engine-harness.js +2 -2
- package/dist/index.cjs +11 -2
- package/dist/index.js +3 -3
- package/dist/proof-run-core.cjs +11 -2
- package/dist/proof-run-core.js +1 -1
- package/dist/proof-run-engine.cjs +11 -2
- package/dist/proof-run-engine.js +2 -2
- package/dist/runner.js +2 -2
- package/examples/regression-packs/oc-flow-regression.json +4 -2
- package/package.json +1 -1
- package/runtime/lib/ship.py +1 -1
- package/runtime/lib/verify.py +40 -5
- package/runtime/tests/recon_verify_smoke.py +199 -0
- package/runtime/tests/trust_boundary_regression.py +12 -0
|
@@ -512,6 +512,16 @@ function requiredBaselineLabelsForState(state = {}) {
|
|
|
512
512
|
if (reference === "prod" || reference === "both") labels.push("prod");
|
|
513
513
|
return labels;
|
|
514
514
|
}
|
|
515
|
+
function stateHasAfterEvidence(state = {}) {
|
|
516
|
+
if (String(state?.after_cdn || "").trim()) return true;
|
|
517
|
+
const bundle = objectValue(state?.evidence_bundle);
|
|
518
|
+
const after = objectValue(bundle.after);
|
|
519
|
+
const observation = objectValue(after.observation);
|
|
520
|
+
const supporting = objectValue(after.supporting_artifacts);
|
|
521
|
+
return Boolean(
|
|
522
|
+
observation.valid === true && (supporting.has_structured_payload === true || supporting.proof_evidence_present === true || observation.telemetry_ready === true || Object.keys(objectValue(bundle.proof_evidence)).length > 0 || Object.keys(objectValue(after.proof_evidence)).length > 0)
|
|
523
|
+
);
|
|
524
|
+
}
|
|
515
525
|
function validateShipGate(state = {}) {
|
|
516
526
|
const reference = normalizedReference(state);
|
|
517
527
|
const prodUrl = String(state?.prod_url || "").trim();
|
|
@@ -541,7 +551,7 @@ function validateShipGate(state = {}) {
|
|
|
541
551
|
reasons.push("prod_cdn is required before ship");
|
|
542
552
|
}
|
|
543
553
|
}
|
|
544
|
-
if (!
|
|
554
|
+
if (!stateHasAfterEvidence(state)) {
|
|
545
555
|
reasons.push("after_cdn is required before ship");
|
|
546
556
|
}
|
|
547
557
|
if (verifyStatus !== "evidence_captured") {
|
|
@@ -945,7 +955,6 @@ var init_proof_run_core = __esm({
|
|
|
945
955
|
VISUAL_FIRST_MODES = /* @__PURE__ */ new Set([
|
|
946
956
|
"visual",
|
|
947
957
|
"render",
|
|
948
|
-
"interaction",
|
|
949
958
|
"ui",
|
|
950
959
|
"layout",
|
|
951
960
|
"screenshot",
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
createDisabledRiddleProofAgentAdapter,
|
|
3
3
|
readRiddleProofRunStatus,
|
|
4
4
|
runRiddleProofEngineHarness
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-P6YV63YF.js";
|
|
6
6
|
import "../chunk-YZUVEJ5B.js";
|
|
7
7
|
import "../chunk-FMOYUYH2.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-FU73I4V3.js";
|
|
9
9
|
import "../chunk-4FOHZ7JG.js";
|
|
10
10
|
import "../chunk-VY4Y5U57.js";
|
|
11
11
|
import "../chunk-MLKGABMK.js";
|
package/dist/advanced/index.cjs
CHANGED
|
@@ -543,6 +543,16 @@ function requiredBaselineLabelsForState(state = {}) {
|
|
|
543
543
|
if (reference === "prod" || reference === "both") labels.push("prod");
|
|
544
544
|
return labels;
|
|
545
545
|
}
|
|
546
|
+
function stateHasAfterEvidence(state = {}) {
|
|
547
|
+
if (String(state?.after_cdn || "").trim()) return true;
|
|
548
|
+
const bundle = objectValue(state?.evidence_bundle);
|
|
549
|
+
const after = objectValue(bundle.after);
|
|
550
|
+
const observation = objectValue(after.observation);
|
|
551
|
+
const supporting = objectValue(after.supporting_artifacts);
|
|
552
|
+
return Boolean(
|
|
553
|
+
observation.valid === true && (supporting.has_structured_payload === true || supporting.proof_evidence_present === true || observation.telemetry_ready === true || Object.keys(objectValue(bundle.proof_evidence)).length > 0 || Object.keys(objectValue(after.proof_evidence)).length > 0)
|
|
554
|
+
);
|
|
555
|
+
}
|
|
546
556
|
function validateShipGate(state = {}) {
|
|
547
557
|
const reference = normalizedReference(state);
|
|
548
558
|
const prodUrl = String(state?.prod_url || "").trim();
|
|
@@ -572,7 +582,7 @@ function validateShipGate(state = {}) {
|
|
|
572
582
|
reasons.push("prod_cdn is required before ship");
|
|
573
583
|
}
|
|
574
584
|
}
|
|
575
|
-
if (!
|
|
585
|
+
if (!stateHasAfterEvidence(state)) {
|
|
576
586
|
reasons.push("after_cdn is required before ship");
|
|
577
587
|
}
|
|
578
588
|
if (verifyStatus !== "evidence_captured") {
|
|
@@ -976,7 +986,6 @@ var init_proof_run_core = __esm({
|
|
|
976
986
|
VISUAL_FIRST_MODES = /* @__PURE__ */ new Set([
|
|
977
987
|
"visual",
|
|
978
988
|
"render",
|
|
979
|
-
"interaction",
|
|
980
989
|
"ui",
|
|
981
990
|
"layout",
|
|
982
991
|
"screenshot",
|
package/dist/advanced/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
proof_run_engine_exports
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-2JWFSLZ5.js";
|
|
4
4
|
import {
|
|
5
5
|
runner_exports
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-P2RN2NYR.js";
|
|
7
7
|
import {
|
|
8
8
|
engine_harness_exports
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-P6YV63YF.js";
|
|
10
10
|
import "../chunk-YZUVEJ5B.js";
|
|
11
11
|
import "../chunk-FMOYUYH2.js";
|
|
12
12
|
import {
|
|
13
13
|
proof_run_core_exports
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-FU73I4V3.js";
|
|
15
15
|
import "../chunk-4FOHZ7JG.js";
|
|
16
16
|
import "../chunk-VY4Y5U57.js";
|
|
17
17
|
import "../chunk-MLKGABMK.js";
|
|
@@ -474,7 +474,6 @@ function normalizedProofAssessment(state = {}) {
|
|
|
474
474
|
var VISUAL_FIRST_MODES = /* @__PURE__ */ new Set([
|
|
475
475
|
"visual",
|
|
476
476
|
"render",
|
|
477
|
-
"interaction",
|
|
478
477
|
"ui",
|
|
479
478
|
"layout",
|
|
480
479
|
"screenshot",
|
|
@@ -569,6 +568,16 @@ function requiredBaselineLabelsForState(state = {}) {
|
|
|
569
568
|
if (reference === "prod" || reference === "both") labels.push("prod");
|
|
570
569
|
return labels;
|
|
571
570
|
}
|
|
571
|
+
function stateHasAfterEvidence(state = {}) {
|
|
572
|
+
if (String(state?.after_cdn || "").trim()) return true;
|
|
573
|
+
const bundle = objectValue(state?.evidence_bundle);
|
|
574
|
+
const after = objectValue(bundle.after);
|
|
575
|
+
const observation = objectValue(after.observation);
|
|
576
|
+
const supporting = objectValue(after.supporting_artifacts);
|
|
577
|
+
return Boolean(
|
|
578
|
+
observation.valid === true && (supporting.has_structured_payload === true || supporting.proof_evidence_present === true || observation.telemetry_ready === true || Object.keys(objectValue(bundle.proof_evidence)).length > 0 || Object.keys(objectValue(after.proof_evidence)).length > 0)
|
|
579
|
+
);
|
|
580
|
+
}
|
|
572
581
|
function validateShipGate(state = {}) {
|
|
573
582
|
const reference = normalizedReference(state);
|
|
574
583
|
const prodUrl = String(state?.prod_url || "").trim();
|
|
@@ -598,7 +607,7 @@ function validateShipGate(state = {}) {
|
|
|
598
607
|
reasons.push("prod_cdn is required before ship");
|
|
599
608
|
}
|
|
600
609
|
}
|
|
601
|
-
if (!
|
|
610
|
+
if (!stateHasAfterEvidence(state)) {
|
|
602
611
|
reasons.push("after_cdn is required before ship");
|
|
603
612
|
}
|
|
604
613
|
if (verifyStatus !== "evidence_captured") {
|
|
@@ -453,7 +453,6 @@ function normalizedProofAssessment(state = {}) {
|
|
|
453
453
|
var VISUAL_FIRST_MODES = /* @__PURE__ */ new Set([
|
|
454
454
|
"visual",
|
|
455
455
|
"render",
|
|
456
|
-
"interaction",
|
|
457
456
|
"ui",
|
|
458
457
|
"layout",
|
|
459
458
|
"screenshot",
|
|
@@ -548,6 +547,16 @@ function requiredBaselineLabelsForState(state = {}) {
|
|
|
548
547
|
if (reference === "prod" || reference === "both") labels.push("prod");
|
|
549
548
|
return labels;
|
|
550
549
|
}
|
|
550
|
+
function stateHasAfterEvidence(state = {}) {
|
|
551
|
+
if (String(state?.after_cdn || "").trim()) return true;
|
|
552
|
+
const bundle = objectValue(state?.evidence_bundle);
|
|
553
|
+
const after = objectValue(bundle.after);
|
|
554
|
+
const observation = objectValue(after.observation);
|
|
555
|
+
const supporting = objectValue(after.supporting_artifacts);
|
|
556
|
+
return Boolean(
|
|
557
|
+
observation.valid === true && (supporting.has_structured_payload === true || supporting.proof_evidence_present === true || observation.telemetry_ready === true || Object.keys(objectValue(bundle.proof_evidence)).length > 0 || Object.keys(objectValue(after.proof_evidence)).length > 0)
|
|
558
|
+
);
|
|
559
|
+
}
|
|
551
560
|
function validateShipGate(state = {}) {
|
|
552
561
|
const reference = normalizedReference(state);
|
|
553
562
|
const prodUrl = String(state?.prod_url || "").trim();
|
|
@@ -577,7 +586,7 @@ function validateShipGate(state = {}) {
|
|
|
577
586
|
reasons.push("prod_cdn is required before ship");
|
|
578
587
|
}
|
|
579
588
|
}
|
|
580
|
-
if (!
|
|
589
|
+
if (!stateHasAfterEvidence(state)) {
|
|
581
590
|
reasons.push("after_cdn is required before ship");
|
|
582
591
|
}
|
|
583
592
|
if (verifyStatus !== "evidence_captured") {
|
package/dist/advanced/runner.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runRiddleProof
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-P2RN2NYR.js";
|
|
4
4
|
import "../chunk-YZUVEJ5B.js";
|
|
5
5
|
import "../chunk-FMOYUYH2.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-FU73I4V3.js";
|
|
7
7
|
import "../chunk-4FOHZ7JG.js";
|
|
8
8
|
import "../chunk-VY4Y5U57.js";
|
|
9
9
|
import "../chunk-MLKGABMK.js";
|
|
@@ -445,7 +445,6 @@ function normalizedProofAssessment(state = {}) {
|
|
|
445
445
|
var VISUAL_FIRST_MODES = /* @__PURE__ */ new Set([
|
|
446
446
|
"visual",
|
|
447
447
|
"render",
|
|
448
|
-
"interaction",
|
|
449
448
|
"ui",
|
|
450
449
|
"layout",
|
|
451
450
|
"screenshot",
|
|
@@ -540,6 +539,16 @@ function requiredBaselineLabelsForState(state = {}) {
|
|
|
540
539
|
if (reference === "prod" || reference === "both") labels.push("prod");
|
|
541
540
|
return labels;
|
|
542
541
|
}
|
|
542
|
+
function stateHasAfterEvidence(state = {}) {
|
|
543
|
+
if (String(state?.after_cdn || "").trim()) return true;
|
|
544
|
+
const bundle = objectValue(state?.evidence_bundle);
|
|
545
|
+
const after = objectValue(bundle.after);
|
|
546
|
+
const observation = objectValue(after.observation);
|
|
547
|
+
const supporting = objectValue(after.supporting_artifacts);
|
|
548
|
+
return Boolean(
|
|
549
|
+
observation.valid === true && (supporting.has_structured_payload === true || supporting.proof_evidence_present === true || observation.telemetry_ready === true || Object.keys(objectValue(bundle.proof_evidence)).length > 0 || Object.keys(objectValue(after.proof_evidence)).length > 0)
|
|
550
|
+
);
|
|
551
|
+
}
|
|
543
552
|
function validateShipGate(state = {}) {
|
|
544
553
|
const reference = normalizedReference(state);
|
|
545
554
|
const prodUrl = String(state?.prod_url || "").trim();
|
|
@@ -569,7 +578,7 @@ function validateShipGate(state = {}) {
|
|
|
569
578
|
reasons.push("prod_cdn is required before ship");
|
|
570
579
|
}
|
|
571
580
|
}
|
|
572
|
-
if (!
|
|
581
|
+
if (!stateHasAfterEvidence(state)) {
|
|
573
582
|
reasons.push("after_cdn is required before ship");
|
|
574
583
|
}
|
|
575
584
|
if (verifyStatus !== "evidence_captured") {
|
package/dist/cli/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-WE6U7EEH.js";
|
|
2
2
|
import "../chunk-PEWAIEER.js";
|
|
3
3
|
import "../chunk-TWTEUS7R.js";
|
|
4
|
-
import "../chunk-
|
|
4
|
+
import "../chunk-P6YV63YF.js";
|
|
5
5
|
import "../chunk-YZUVEJ5B.js";
|
|
6
6
|
import "../chunk-FMOYUYH2.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-FU73I4V3.js";
|
|
8
8
|
import "../chunk-4FOHZ7JG.js";
|
|
9
9
|
import "../chunk-JFQXAJH2.js";
|
|
10
10
|
import "../chunk-EEIYUZXE.js";
|
package/dist/cli.cjs
CHANGED
|
@@ -512,6 +512,16 @@ function requiredBaselineLabelsForState(state = {}) {
|
|
|
512
512
|
if (reference === "prod" || reference === "both") labels.push("prod");
|
|
513
513
|
return labels;
|
|
514
514
|
}
|
|
515
|
+
function stateHasAfterEvidence(state = {}) {
|
|
516
|
+
if (String(state?.after_cdn || "").trim()) return true;
|
|
517
|
+
const bundle = objectValue(state?.evidence_bundle);
|
|
518
|
+
const after = objectValue(bundle.after);
|
|
519
|
+
const observation = objectValue(after.observation);
|
|
520
|
+
const supporting = objectValue(after.supporting_artifacts);
|
|
521
|
+
return Boolean(
|
|
522
|
+
observation.valid === true && (supporting.has_structured_payload === true || supporting.proof_evidence_present === true || observation.telemetry_ready === true || Object.keys(objectValue(bundle.proof_evidence)).length > 0 || Object.keys(objectValue(after.proof_evidence)).length > 0)
|
|
523
|
+
);
|
|
524
|
+
}
|
|
515
525
|
function validateShipGate(state = {}) {
|
|
516
526
|
const reference = normalizedReference(state);
|
|
517
527
|
const prodUrl = String(state?.prod_url || "").trim();
|
|
@@ -541,7 +551,7 @@ function validateShipGate(state = {}) {
|
|
|
541
551
|
reasons.push("prod_cdn is required before ship");
|
|
542
552
|
}
|
|
543
553
|
}
|
|
544
|
-
if (!
|
|
554
|
+
if (!stateHasAfterEvidence(state)) {
|
|
545
555
|
reasons.push("after_cdn is required before ship");
|
|
546
556
|
}
|
|
547
557
|
if (verifyStatus !== "evidence_captured") {
|
|
@@ -945,7 +955,6 @@ var init_proof_run_core = __esm({
|
|
|
945
955
|
VISUAL_FIRST_MODES = /* @__PURE__ */ new Set([
|
|
946
956
|
"visual",
|
|
947
957
|
"render",
|
|
948
|
-
"interaction",
|
|
949
958
|
"ui",
|
|
950
959
|
"layout",
|
|
951
960
|
"screenshot",
|
package/dist/cli.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "./chunk-
|
|
2
|
+
import "./chunk-WE6U7EEH.js";
|
|
3
3
|
import "./chunk-PEWAIEER.js";
|
|
4
4
|
import "./chunk-TWTEUS7R.js";
|
|
5
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-P6YV63YF.js";
|
|
6
6
|
import "./chunk-YZUVEJ5B.js";
|
|
7
7
|
import "./chunk-FMOYUYH2.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-FU73I4V3.js";
|
|
9
9
|
import "./chunk-4FOHZ7JG.js";
|
|
10
10
|
import "./chunk-JFQXAJH2.js";
|
|
11
11
|
import "./chunk-EEIYUZXE.js";
|
package/dist/engine-harness.cjs
CHANGED
|
@@ -512,6 +512,16 @@ function requiredBaselineLabelsForState(state = {}) {
|
|
|
512
512
|
if (reference === "prod" || reference === "both") labels.push("prod");
|
|
513
513
|
return labels;
|
|
514
514
|
}
|
|
515
|
+
function stateHasAfterEvidence(state = {}) {
|
|
516
|
+
if (String(state?.after_cdn || "").trim()) return true;
|
|
517
|
+
const bundle = objectValue(state?.evidence_bundle);
|
|
518
|
+
const after = objectValue(bundle.after);
|
|
519
|
+
const observation = objectValue(after.observation);
|
|
520
|
+
const supporting = objectValue(after.supporting_artifacts);
|
|
521
|
+
return Boolean(
|
|
522
|
+
observation.valid === true && (supporting.has_structured_payload === true || supporting.proof_evidence_present === true || observation.telemetry_ready === true || Object.keys(objectValue(bundle.proof_evidence)).length > 0 || Object.keys(objectValue(after.proof_evidence)).length > 0)
|
|
523
|
+
);
|
|
524
|
+
}
|
|
515
525
|
function validateShipGate(state = {}) {
|
|
516
526
|
const reference = normalizedReference(state);
|
|
517
527
|
const prodUrl = String(state?.prod_url || "").trim();
|
|
@@ -541,7 +551,7 @@ function validateShipGate(state = {}) {
|
|
|
541
551
|
reasons.push("prod_cdn is required before ship");
|
|
542
552
|
}
|
|
543
553
|
}
|
|
544
|
-
if (!
|
|
554
|
+
if (!stateHasAfterEvidence(state)) {
|
|
545
555
|
reasons.push("after_cdn is required before ship");
|
|
546
556
|
}
|
|
547
557
|
if (verifyStatus !== "evidence_captured") {
|
|
@@ -945,7 +955,6 @@ var init_proof_run_core = __esm({
|
|
|
945
955
|
VISUAL_FIRST_MODES = /* @__PURE__ */ new Set([
|
|
946
956
|
"visual",
|
|
947
957
|
"render",
|
|
948
|
-
"interaction",
|
|
949
958
|
"ui",
|
|
950
959
|
"layout",
|
|
951
960
|
"screenshot",
|
package/dist/engine-harness.js
CHANGED
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
createDisabledRiddleProofAgentAdapter,
|
|
3
3
|
readRiddleProofRunStatus,
|
|
4
4
|
runRiddleProofEngineHarness
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-P6YV63YF.js";
|
|
6
6
|
import "./chunk-YZUVEJ5B.js";
|
|
7
7
|
import "./chunk-FMOYUYH2.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-FU73I4V3.js";
|
|
9
9
|
import "./chunk-4FOHZ7JG.js";
|
|
10
10
|
import "./chunk-VY4Y5U57.js";
|
|
11
11
|
import "./chunk-MLKGABMK.js";
|
package/dist/index.cjs
CHANGED
|
@@ -512,6 +512,16 @@ function requiredBaselineLabelsForState(state = {}) {
|
|
|
512
512
|
if (reference === "prod" || reference === "both") labels.push("prod");
|
|
513
513
|
return labels;
|
|
514
514
|
}
|
|
515
|
+
function stateHasAfterEvidence(state = {}) {
|
|
516
|
+
if (String(state?.after_cdn || "").trim()) return true;
|
|
517
|
+
const bundle = objectValue(state?.evidence_bundle);
|
|
518
|
+
const after = objectValue(bundle.after);
|
|
519
|
+
const observation = objectValue(after.observation);
|
|
520
|
+
const supporting = objectValue(after.supporting_artifacts);
|
|
521
|
+
return Boolean(
|
|
522
|
+
observation.valid === true && (supporting.has_structured_payload === true || supporting.proof_evidence_present === true || observation.telemetry_ready === true || Object.keys(objectValue(bundle.proof_evidence)).length > 0 || Object.keys(objectValue(after.proof_evidence)).length > 0)
|
|
523
|
+
);
|
|
524
|
+
}
|
|
515
525
|
function validateShipGate(state = {}) {
|
|
516
526
|
const reference = normalizedReference(state);
|
|
517
527
|
const prodUrl = String(state?.prod_url || "").trim();
|
|
@@ -541,7 +551,7 @@ function validateShipGate(state = {}) {
|
|
|
541
551
|
reasons.push("prod_cdn is required before ship");
|
|
542
552
|
}
|
|
543
553
|
}
|
|
544
|
-
if (!
|
|
554
|
+
if (!stateHasAfterEvidence(state)) {
|
|
545
555
|
reasons.push("after_cdn is required before ship");
|
|
546
556
|
}
|
|
547
557
|
if (verifyStatus !== "evidence_captured") {
|
|
@@ -945,7 +955,6 @@ var init_proof_run_core = __esm({
|
|
|
945
955
|
VISUAL_FIRST_MODES = /* @__PURE__ */ new Set([
|
|
946
956
|
"visual",
|
|
947
957
|
"render",
|
|
948
|
-
"interaction",
|
|
949
958
|
"ui",
|
|
950
959
|
"layout",
|
|
951
960
|
"screenshot",
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runRiddleProof
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-P2RN2NYR.js";
|
|
4
4
|
import "./chunk-6F4PWJZI.js";
|
|
5
5
|
import {
|
|
6
6
|
RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION,
|
|
@@ -95,7 +95,7 @@ import {
|
|
|
95
95
|
createDisabledRiddleProofAgentAdapter,
|
|
96
96
|
readRiddleProofRunStatus,
|
|
97
97
|
runRiddleProofEngineHarness
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-P6YV63YF.js";
|
|
99
99
|
import {
|
|
100
100
|
RIDDLE_PROOF_RUN_STATE_VERSION,
|
|
101
101
|
appendRunEvent,
|
|
@@ -112,7 +112,7 @@ import {
|
|
|
112
112
|
RIDDLE_PROOF_RUN_CARD_VERSION,
|
|
113
113
|
createRiddleProofRunCard
|
|
114
114
|
} from "./chunk-FMOYUYH2.js";
|
|
115
|
-
import "./chunk-
|
|
115
|
+
import "./chunk-FU73I4V3.js";
|
|
116
116
|
import {
|
|
117
117
|
RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION,
|
|
118
118
|
RIDDLE_PROOF_CHECKPOINT_RESPONSE_VERSION,
|
package/dist/proof-run-core.cjs
CHANGED
|
@@ -472,7 +472,6 @@ function normalizedProofAssessment(state = {}) {
|
|
|
472
472
|
var VISUAL_FIRST_MODES = /* @__PURE__ */ new Set([
|
|
473
473
|
"visual",
|
|
474
474
|
"render",
|
|
475
|
-
"interaction",
|
|
476
475
|
"ui",
|
|
477
476
|
"layout",
|
|
478
477
|
"screenshot",
|
|
@@ -567,6 +566,16 @@ function requiredBaselineLabelsForState(state = {}) {
|
|
|
567
566
|
if (reference === "prod" || reference === "both") labels.push("prod");
|
|
568
567
|
return labels;
|
|
569
568
|
}
|
|
569
|
+
function stateHasAfterEvidence(state = {}) {
|
|
570
|
+
if (String(state?.after_cdn || "").trim()) return true;
|
|
571
|
+
const bundle = objectValue(state?.evidence_bundle);
|
|
572
|
+
const after = objectValue(bundle.after);
|
|
573
|
+
const observation = objectValue(after.observation);
|
|
574
|
+
const supporting = objectValue(after.supporting_artifacts);
|
|
575
|
+
return Boolean(
|
|
576
|
+
observation.valid === true && (supporting.has_structured_payload === true || supporting.proof_evidence_present === true || observation.telemetry_ready === true || Object.keys(objectValue(bundle.proof_evidence)).length > 0 || Object.keys(objectValue(after.proof_evidence)).length > 0)
|
|
577
|
+
);
|
|
578
|
+
}
|
|
570
579
|
function validateShipGate(state = {}) {
|
|
571
580
|
const reference = normalizedReference(state);
|
|
572
581
|
const prodUrl = String(state?.prod_url || "").trim();
|
|
@@ -596,7 +605,7 @@ function validateShipGate(state = {}) {
|
|
|
596
605
|
reasons.push("prod_cdn is required before ship");
|
|
597
606
|
}
|
|
598
607
|
}
|
|
599
|
-
if (!
|
|
608
|
+
if (!stateHasAfterEvidence(state)) {
|
|
600
609
|
reasons.push("after_cdn is required before ship");
|
|
601
610
|
}
|
|
602
611
|
if (verifyStatus !== "evidence_captured") {
|
package/dist/proof-run-core.js
CHANGED
|
@@ -451,7 +451,6 @@ function normalizedProofAssessment(state = {}) {
|
|
|
451
451
|
var VISUAL_FIRST_MODES = /* @__PURE__ */ new Set([
|
|
452
452
|
"visual",
|
|
453
453
|
"render",
|
|
454
|
-
"interaction",
|
|
455
454
|
"ui",
|
|
456
455
|
"layout",
|
|
457
456
|
"screenshot",
|
|
@@ -546,6 +545,16 @@ function requiredBaselineLabelsForState(state = {}) {
|
|
|
546
545
|
if (reference === "prod" || reference === "both") labels.push("prod");
|
|
547
546
|
return labels;
|
|
548
547
|
}
|
|
548
|
+
function stateHasAfterEvidence(state = {}) {
|
|
549
|
+
if (String(state?.after_cdn || "").trim()) return true;
|
|
550
|
+
const bundle = objectValue(state?.evidence_bundle);
|
|
551
|
+
const after = objectValue(bundle.after);
|
|
552
|
+
const observation = objectValue(after.observation);
|
|
553
|
+
const supporting = objectValue(after.supporting_artifacts);
|
|
554
|
+
return Boolean(
|
|
555
|
+
observation.valid === true && (supporting.has_structured_payload === true || supporting.proof_evidence_present === true || observation.telemetry_ready === true || Object.keys(objectValue(bundle.proof_evidence)).length > 0 || Object.keys(objectValue(after.proof_evidence)).length > 0)
|
|
556
|
+
);
|
|
557
|
+
}
|
|
549
558
|
function validateShipGate(state = {}) {
|
|
550
559
|
const reference = normalizedReference(state);
|
|
551
560
|
const prodUrl = String(state?.prod_url || "").trim();
|
|
@@ -575,7 +584,7 @@ function validateShipGate(state = {}) {
|
|
|
575
584
|
reasons.push("prod_cdn is required before ship");
|
|
576
585
|
}
|
|
577
586
|
}
|
|
578
|
-
if (!
|
|
587
|
+
if (!stateHasAfterEvidence(state)) {
|
|
579
588
|
reasons.push("after_cdn is required before ship");
|
|
580
589
|
}
|
|
581
590
|
if (verifyStatus !== "evidence_captured") {
|
package/dist/proof-run-engine.js
CHANGED
package/dist/runner.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runRiddleProof
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-P2RN2NYR.js";
|
|
4
4
|
import "./chunk-YZUVEJ5B.js";
|
|
5
5
|
import "./chunk-FMOYUYH2.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-FU73I4V3.js";
|
|
7
7
|
import "./chunk-4FOHZ7JG.js";
|
|
8
8
|
import "./chunk-VY4Y5U57.js";
|
|
9
9
|
import "./chunk-MLKGABMK.js";
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"public_name": "Riddle Proof OC Flow Regression Pack",
|
|
5
5
|
"description": "Reusable regression pack for the trust boundary between browser evidence, verifier judgment, retry policy, wrapper checkpoint handling, and terminal status.",
|
|
6
6
|
"minimum_versions": {
|
|
7
|
-
"@riddledc/openclaw-riddle-proof": "0.4.
|
|
8
|
-
"@riddledc/riddle-proof": "0.8.
|
|
7
|
+
"@riddledc/openclaw-riddle-proof": "0.4.146",
|
|
8
|
+
"@riddledc/riddle-proof": "0.8.18"
|
|
9
9
|
},
|
|
10
10
|
"runtime_gate": {
|
|
11
11
|
"tool": "riddle_proof_status",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"required_cases": [
|
|
27
27
|
"route-change-forward-pass",
|
|
28
28
|
"route-change-retry-state-drift-ignored",
|
|
29
|
+
"route-change-proof-plan-placeholder-ignored",
|
|
29
30
|
"route-change-reverse-pass",
|
|
30
31
|
"route-change-reverse-nested-terminal-url-pass",
|
|
31
32
|
"query-hash-trailing-slash-pass",
|
|
@@ -34,6 +35,7 @@
|
|
|
34
35
|
"missing-selector-timeout-specific-blocker",
|
|
35
36
|
"thrown-error-preserves-structured-evidence",
|
|
36
37
|
"interaction-thrown-error-specific-blocker",
|
|
38
|
+
"interaction-iife-structured-proof-without-screenshot-pass",
|
|
37
39
|
"proof-evidence-absent-specific-blocker",
|
|
38
40
|
"no-diff-prod-audit-default-capture-pass"
|
|
39
41
|
]
|
package/package.json
CHANGED
package/runtime/lib/ship.py
CHANGED
|
@@ -10,7 +10,7 @@ from util import load_state, save_state, invoke, git
|
|
|
10
10
|
DISCORD_API = 'https://discord.com/api/v10'
|
|
11
11
|
SHIP_NOISE_PATHS = ('.codex', '.oc-smoke')
|
|
12
12
|
VISUAL_FIRST_MODES = {
|
|
13
|
-
'visual', 'render', '
|
|
13
|
+
'visual', 'render', 'ui', 'layout', 'screenshot',
|
|
14
14
|
'canvas', 'animation',
|
|
15
15
|
}
|
|
16
16
|
|
package/runtime/lib/verify.py
CHANGED
|
@@ -52,7 +52,7 @@ STRUCTURED_FIRST_MODES = {
|
|
|
52
52
|
'telemetry', 'text', 'api',
|
|
53
53
|
}
|
|
54
54
|
VISUAL_FIRST_MODES = {
|
|
55
|
-
'visual', 'render', '
|
|
55
|
+
'visual', 'render', 'ui', 'layout', 'screenshot',
|
|
56
56
|
'canvas', 'animation',
|
|
57
57
|
}
|
|
58
58
|
INTERACTION_MODES = {'interaction', 'interactive', 'user_flow', 'user-flow', 'workflow'}
|
|
@@ -235,6 +235,20 @@ def auto_screenshot_for_mode(verification_mode):
|
|
|
235
235
|
return normalized_verification_mode(verification_mode) not in STRUCTURED_FIRST_MODES
|
|
236
236
|
|
|
237
237
|
|
|
238
|
+
def capture_script_iife_expression(script):
|
|
239
|
+
text = (script or '').strip()
|
|
240
|
+
while text.endswith(';'):
|
|
241
|
+
text = text[:-1].rstrip()
|
|
242
|
+
if not text:
|
|
243
|
+
return ''
|
|
244
|
+
compact = re.sub(r'\s+', ' ', text)
|
|
245
|
+
if re.match(r'^\(\s*async\s*(function\b|\([^)]*\)\s*=>)', compact) and re.search(r'\)\s*\(\s*\)$', compact):
|
|
246
|
+
return text
|
|
247
|
+
if re.match(r'^\(\s*(function\b|\([^)]*\)\s*=>)', compact) and re.search(r'\)\s*\(\s*\)$', compact):
|
|
248
|
+
return text
|
|
249
|
+
return ''
|
|
250
|
+
|
|
251
|
+
|
|
238
252
|
def record_verify_phase(phase, status='running', summary=''):
|
|
239
253
|
global s
|
|
240
254
|
ts = time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime())
|
|
@@ -368,10 +382,19 @@ def abort_capture_failure(state, results, expected_path, message, raw_payload):
|
|
|
368
382
|
def build_probe_capture_script(base_script='', verification_mode='proof', proof_session_seed=None, viewport_matrix=None):
|
|
369
383
|
pieces = []
|
|
370
384
|
script = (base_script or '').strip()
|
|
385
|
+
iife_expression = capture_script_iife_expression(script)
|
|
371
386
|
pieces.extend(viewport_matrix_setup_js(viewport_matrix))
|
|
372
387
|
pieces.append('let __riddleProofCaptureScriptError = null;')
|
|
373
388
|
pieces.append('let __riddleProofCaptureScriptResult = null;')
|
|
374
|
-
if
|
|
389
|
+
if iife_expression:
|
|
390
|
+
pieces.extend([
|
|
391
|
+
'try {',
|
|
392
|
+
'__riddleProofCaptureScriptResult = await (' + iife_expression + ');',
|
|
393
|
+
'} catch (err) {',
|
|
394
|
+
' __riddleProofCaptureScriptError = err;',
|
|
395
|
+
'}',
|
|
396
|
+
])
|
|
397
|
+
elif script:
|
|
375
398
|
pieces.extend([
|
|
376
399
|
'try {',
|
|
377
400
|
'__riddleProofCaptureScriptResult = await (async () => {',
|
|
@@ -2319,11 +2342,22 @@ def text_path_candidate(value):
|
|
|
2319
2342
|
return path_candidate(raw)
|
|
2320
2343
|
|
|
2321
2344
|
|
|
2345
|
+
PROSE_ROUTE_PLACEHOLDER_PATHS = {
|
|
2346
|
+
'/href',
|
|
2347
|
+
'/path',
|
|
2348
|
+
'/pathname',
|
|
2349
|
+
'/route',
|
|
2350
|
+
'/url',
|
|
2351
|
+
}
|
|
2352
|
+
|
|
2353
|
+
|
|
2322
2354
|
def text_route_candidate(value):
|
|
2323
2355
|
candidate = text_path_candidate(value)
|
|
2324
2356
|
if not candidate:
|
|
2325
2357
|
return ''
|
|
2326
2358
|
parsed = urlparse(candidate)
|
|
2359
|
+
if (parsed.path or '').lower() in PROSE_ROUTE_PLACEHOLDER_PATHS and not parsed.query and not parsed.fragment:
|
|
2360
|
+
return ''
|
|
2327
2361
|
first_segment = next((part for part in (parsed.path or '').split('/') if part), '')
|
|
2328
2362
|
if first_segment and first_segment[:1].isupper():
|
|
2329
2363
|
return ''
|
|
@@ -2350,11 +2384,11 @@ def terminal_path_from_text(value):
|
|
|
2350
2384
|
def interaction_assertions_pass(value):
|
|
2351
2385
|
for record in proof_evidence_records(value):
|
|
2352
2386
|
if any(record.get(key) is False for key in (
|
|
2353
|
-
'passed', 'ok', 'proofReady', 'proof_ready', 'routeMatches', 'route_matches',
|
|
2387
|
+
'passed', 'pass', 'ok', 'success', 'proofReady', 'proof_ready', 'routeMatches', 'route_matches',
|
|
2354
2388
|
)):
|
|
2355
2389
|
return False
|
|
2356
2390
|
if any(record.get(key) is True for key in (
|
|
2357
|
-
'passed', 'ok', 'proofReady', 'proof_ready', 'interactionPassed', 'interaction_passed',
|
|
2391
|
+
'passed', 'pass', 'ok', 'success', 'proofReady', 'proof_ready', 'interactionPassed', 'interaction_passed',
|
|
2358
2392
|
)):
|
|
2359
2393
|
return True
|
|
2360
2394
|
for key in ('assertions', 'checks', 'predicates', 'expectations'):
|
|
@@ -2369,7 +2403,7 @@ def interaction_assertions_pass(value):
|
|
|
2369
2403
|
if isinstance(item, bool):
|
|
2370
2404
|
bools.append(item)
|
|
2371
2405
|
elif isinstance(item, dict):
|
|
2372
|
-
for flag_key in ('passed', 'ok', 'valid'):
|
|
2406
|
+
for flag_key in ('passed', 'pass', 'ok', 'valid', 'success'):
|
|
2373
2407
|
if isinstance(item.get(flag_key), bool):
|
|
2374
2408
|
bools.append(item.get(flag_key))
|
|
2375
2409
|
break
|
|
@@ -2381,6 +2415,7 @@ def interaction_assertions_pass(value):
|
|
|
2381
2415
|
INTERACTION_ASSERTION_CONTAINER_KEYS = ('assertions', 'checks', 'predicates', 'expectations')
|
|
2382
2416
|
INTERACTION_FAILURE_FLAG_KEYS = (
|
|
2383
2417
|
'passed',
|
|
2418
|
+
'pass',
|
|
2384
2419
|
'ok',
|
|
2385
2420
|
'valid',
|
|
2386
2421
|
'success',
|
|
@@ -444,6 +444,101 @@ class FakeRiddle:
|
|
|
444
444
|
'totalPixels': 972000,
|
|
445
445
|
},
|
|
446
446
|
}
|
|
447
|
+
if 'clickedProofNavigationOcLiveShapeNoScreenshot' in script:
|
|
448
|
+
assert '__riddleProofCaptureScriptResult = await ((async () =>' in script
|
|
449
|
+
page_state = {
|
|
450
|
+
'bodyTextLength': 4113,
|
|
451
|
+
'visibleTextSample': 'RIDDLE PROOF Turn a URL into evidence an agent can cite.',
|
|
452
|
+
'interactiveElements': 6,
|
|
453
|
+
'visibleInteractiveElements': 6,
|
|
454
|
+
'pathname': '/proof/',
|
|
455
|
+
'href': 'https://riddledc.com/proof/',
|
|
456
|
+
'title': 'Riddle Proof',
|
|
457
|
+
'buttons': ['Proof'],
|
|
458
|
+
'headings': ['Riddle Proof'],
|
|
459
|
+
'links': [],
|
|
460
|
+
'canvasCount': 0,
|
|
461
|
+
'largeVisibleElements': [{'tag': 'h1', 'text': 'Riddle Proof'}],
|
|
462
|
+
}
|
|
463
|
+
proof_evidence = {
|
|
464
|
+
'version': 'riddle-proof.interaction.v1',
|
|
465
|
+
'expectedUrl': 'https://riddledc.com/proof/',
|
|
466
|
+
'routeExpectationSource': 'capture_script.expectedUrl',
|
|
467
|
+
'start': {'href': 'https://riddledc.com/', 'pathname': '/'},
|
|
468
|
+
'action': {'type': 'click', 'target': 'visible Proof navigation link', 'clicked': True},
|
|
469
|
+
'terminal': {'href': 'https://riddledc.com/proof/', 'pathname': '/proof/'},
|
|
470
|
+
'assertions': [
|
|
471
|
+
{'name': 'route expectation source is capture_script.expectedUrl', 'pass': True},
|
|
472
|
+
{'name': 'terminal URL matched expected proof route', 'pass': True},
|
|
473
|
+
{'name': 'Proof page content visible', 'pass': True},
|
|
474
|
+
],
|
|
475
|
+
'success': True,
|
|
476
|
+
}
|
|
477
|
+
return {
|
|
478
|
+
'ok': True,
|
|
479
|
+
'outputs': [{'name': 'proof.json', 'url': 'https://cdn.example.com/proof.json'}],
|
|
480
|
+
'result': {'pageState': page_state, 'proofEvidence': proof_evidence},
|
|
481
|
+
'console': [
|
|
482
|
+
'RIDDLE_PROOF_STATE:' + json.dumps(page_state),
|
|
483
|
+
'RIDDLE_PROOF_EVIDENCE:' + json.dumps(proof_evidence),
|
|
484
|
+
],
|
|
485
|
+
}
|
|
486
|
+
if 'clickedProofNavigationOcLiveShape' in script:
|
|
487
|
+
page_state = {
|
|
488
|
+
'bodyTextLength': 4113,
|
|
489
|
+
'visibleTextSample': 'RIDDLE PROOF Turn a URL into evidence an agent can cite.',
|
|
490
|
+
'interactiveElements': 6,
|
|
491
|
+
'visibleInteractiveElements': 6,
|
|
492
|
+
'pathname': '/proof/',
|
|
493
|
+
'href': 'https://riddledc.com/proof/',
|
|
494
|
+
'title': 'Riddle Proof',
|
|
495
|
+
'buttons': ['Proof'],
|
|
496
|
+
'headings': ['Riddle Proof'],
|
|
497
|
+
'links': [],
|
|
498
|
+
'canvasCount': 0,
|
|
499
|
+
'largeVisibleElements': [{'tag': 'h1', 'text': 'Riddle Proof'}],
|
|
500
|
+
}
|
|
501
|
+
proof_evidence = {
|
|
502
|
+
'version': 'riddle-proof.interaction.v1',
|
|
503
|
+
'expectedUrl': 'https://riddledc.com/proof/',
|
|
504
|
+
'routeExpectationSource': 'capture_script.expectedUrl',
|
|
505
|
+
'startRoute': {'url': 'https://riddledc.com/', 'pathname': '/'},
|
|
506
|
+
'terminalRoute': {'url': 'https://riddledc.com/proof/', 'pathname': '/proof/'},
|
|
507
|
+
'action': {'type': 'click', 'target': 'visible Proof navigation link', 'clicked': True},
|
|
508
|
+
'startState': {'url': 'https://riddledc.com/', 'pathname': '/'},
|
|
509
|
+
'terminalState': {'url': 'https://riddledc.com/proof/', 'pathname': '/proof/'},
|
|
510
|
+
'assertions': [
|
|
511
|
+
{
|
|
512
|
+
'name': 'route expectation source is capture_script.expectedUrl',
|
|
513
|
+
'pass': True,
|
|
514
|
+
'routeExpectationSource': 'capture_script.expectedUrl',
|
|
515
|
+
'expectedUrl': 'https://riddledc.com/proof/',
|
|
516
|
+
},
|
|
517
|
+
{'name': 'start URL is production home', 'pass': True, 'startPathname': '/'},
|
|
518
|
+
{
|
|
519
|
+
'name': 'terminal URL matched expected proof route',
|
|
520
|
+
'pass': True,
|
|
521
|
+
'terminalUrl': 'https://riddledc.com/proof/',
|
|
522
|
+
},
|
|
523
|
+
{'name': 'Proof page content visible', 'pass': True},
|
|
524
|
+
],
|
|
525
|
+
'success': True,
|
|
526
|
+
}
|
|
527
|
+
return {
|
|
528
|
+
'ok': True,
|
|
529
|
+
'screenshots': [{'url': 'https://cdn.example.com/proof-after.png'}],
|
|
530
|
+
'outputs': [{'name': 'after-proof.png', 'url': 'https://cdn.example.com/proof-after.png'}],
|
|
531
|
+
'result': {'pageState': page_state, 'proofEvidence': proof_evidence},
|
|
532
|
+
'console': [
|
|
533
|
+
'RIDDLE_PROOF_STATE:' + json.dumps(page_state),
|
|
534
|
+
'RIDDLE_PROOF_EVIDENCE:' + json.dumps(proof_evidence),
|
|
535
|
+
],
|
|
536
|
+
'visual_diff': {
|
|
537
|
+
'diffPercentage': 1.2,
|
|
538
|
+
'differentPixels': 12000,
|
|
539
|
+
'totalPixels': 972000,
|
|
540
|
+
},
|
|
541
|
+
}
|
|
447
542
|
if 'clickedProofNavigation' in script:
|
|
448
543
|
page_state = {
|
|
449
544
|
'bodyTextLength': 180,
|
|
@@ -2735,6 +2830,63 @@ def run_verify_interaction_terminal_route_from_proof_evidence():
|
|
|
2735
2830
|
shutil.rmtree(tempdir, ignore_errors=True)
|
|
2736
2831
|
|
|
2737
2832
|
|
|
2833
|
+
def run_verify_interaction_iife_structured_evidence_without_screenshot():
|
|
2834
|
+
tempdir = Path(tempfile.mkdtemp(prefix='riddle-proof-interaction-iife-no-shot-'))
|
|
2835
|
+
state_path = tempdir / 'state.json'
|
|
2836
|
+
try:
|
|
2837
|
+
state = base_state(tempdir, reference='before')
|
|
2838
|
+
state.update({
|
|
2839
|
+
'recon_status': 'ready_for_proof_plan',
|
|
2840
|
+
'author_status': 'ready',
|
|
2841
|
+
'proof_plan_status': 'ready',
|
|
2842
|
+
'implementation_status': 'changes_detected',
|
|
2843
|
+
'verification_mode': 'interaction',
|
|
2844
|
+
'server_path': '/',
|
|
2845
|
+
'before_cdn': 'https://cdn.example.com/before-home.png',
|
|
2846
|
+
'proof_plan': 'Start at /, click Proof, and verify the terminal /proof/ route.',
|
|
2847
|
+
'capture_script': (
|
|
2848
|
+
"(async () => { "
|
|
2849
|
+
"const evidence = await clickedProofNavigationOcLiveShapeNoScreenshot(); "
|
|
2850
|
+
"await saveScreenshot('after-proof'); "
|
|
2851
|
+
"return evidence; "
|
|
2852
|
+
"})();"
|
|
2853
|
+
),
|
|
2854
|
+
'recon_results': {
|
|
2855
|
+
'baselines': {'before': {'path': '/', 'url': 'https://cdn.example.com/before-home.png'}},
|
|
2856
|
+
},
|
|
2857
|
+
})
|
|
2858
|
+
write_state(state_path, state)
|
|
2859
|
+
os.environ['RIDDLE_PROOF_STATE_FILE'] = str(state_path)
|
|
2860
|
+
|
|
2861
|
+
fake = FakeRiddle()
|
|
2862
|
+
load_util_with_fake(fake)
|
|
2863
|
+
load_module('verify_interaction_iife_no_screenshot', VERIFY_PATH)
|
|
2864
|
+
after_verify = json.loads(state_path.read_text())
|
|
2865
|
+
|
|
2866
|
+
assert after_verify['verify_status'] == 'evidence_captured'
|
|
2867
|
+
assert after_verify['after_cdn'] == ''
|
|
2868
|
+
assert after_verify['verify_results']['after']['observation']['valid'] is True
|
|
2869
|
+
assert after_verify['verify_results']['after']['observation']['details']['screenshot_required'] is False
|
|
2870
|
+
assert after_verify['evidence_bundle']['artifact_contract']['required']['screenshot'] is False
|
|
2871
|
+
assert 'screenshot' not in after_verify['evidence_bundle']['artifact_usage']['missing_required_signals']
|
|
2872
|
+
assert after_verify['route_expectation']['expected_path'] == '/proof'
|
|
2873
|
+
route = after_verify['proof_assessment_request']['semantic_context']['route']
|
|
2874
|
+
assert route['expected_after_path'] == '/proof'
|
|
2875
|
+
assert route['after_observed_path'] == '/proof'
|
|
2876
|
+
assert 'wrong route' not in after_verify['verify_results']['after']['observation']['reason']
|
|
2877
|
+
supporting = after_verify['verify_results']['after']['supporting_artifacts']
|
|
2878
|
+
assert supporting['proof_evidence_present'] is True
|
|
2879
|
+
assert supporting['has_structured_payload'] is True
|
|
2880
|
+
return {
|
|
2881
|
+
'ok': True,
|
|
2882
|
+
'expected_path': after_verify['route_expectation']['expected_path'],
|
|
2883
|
+
'after_cdn': after_verify['after_cdn'],
|
|
2884
|
+
'screenshot_required': after_verify['verify_results']['after']['observation']['details']['screenshot_required'],
|
|
2885
|
+
}
|
|
2886
|
+
finally:
|
|
2887
|
+
shutil.rmtree(tempdir, ignore_errors=True)
|
|
2888
|
+
|
|
2889
|
+
|
|
2738
2890
|
def run_verify_interaction_proof_evidence_overrides_stale_expected_path():
|
|
2739
2891
|
tempdir = Path(tempfile.mkdtemp(prefix='riddle-proof-interaction-stale-route-'))
|
|
2740
2892
|
state_path = tempdir / 'state.json'
|
|
@@ -2787,6 +2939,51 @@ def run_verify_interaction_proof_evidence_overrides_stale_expected_path():
|
|
|
2787
2939
|
shutil.rmtree(tempdir, ignore_errors=True)
|
|
2788
2940
|
|
|
2789
2941
|
|
|
2942
|
+
def run_verify_interaction_proof_plan_placeholder_uses_live_evidence():
|
|
2943
|
+
tempdir = Path(tempfile.mkdtemp(prefix='riddle-proof-interaction-placeholder-route-'))
|
|
2944
|
+
state_path = tempdir / 'state.json'
|
|
2945
|
+
try:
|
|
2946
|
+
state = base_state(tempdir, reference='before')
|
|
2947
|
+
state.update({
|
|
2948
|
+
'recon_status': 'ready_for_proof_plan',
|
|
2949
|
+
'author_status': 'ready',
|
|
2950
|
+
'proof_plan_status': 'ready',
|
|
2951
|
+
'implementation_status': 'changes_detected',
|
|
2952
|
+
'verification_mode': 'interaction',
|
|
2953
|
+
'server_path': '/',
|
|
2954
|
+
'before_cdn': 'https://cdn.example.com/before-home.png',
|
|
2955
|
+
'proof_plan': 'Start at /, click Proof, and verify the terminal pathname /pathname.',
|
|
2956
|
+
'capture_script': "clickedProofNavigationOcLiveShape(); await saveScreenshot('after-proof');",
|
|
2957
|
+
'recon_results': {
|
|
2958
|
+
'baselines': {'before': {'path': '/', 'url': 'https://cdn.example.com/before-home.png'}},
|
|
2959
|
+
},
|
|
2960
|
+
})
|
|
2961
|
+
write_state(state_path, state)
|
|
2962
|
+
os.environ['RIDDLE_PROOF_STATE_FILE'] = str(state_path)
|
|
2963
|
+
|
|
2964
|
+
fake = FakeRiddle()
|
|
2965
|
+
load_util_with_fake(fake)
|
|
2966
|
+
load_module('verify_interaction_placeholder_route_uses_evidence', VERIFY_PATH)
|
|
2967
|
+
after_verify = json.loads(state_path.read_text())
|
|
2968
|
+
|
|
2969
|
+
assert after_verify['verify_status'] == 'evidence_captured'
|
|
2970
|
+
assert after_verify['route_expectation']['source'] == 'proof_evidence_contract'
|
|
2971
|
+
assert after_verify['route_expectation']['expected_path'] == '/proof'
|
|
2972
|
+
route = after_verify['proof_assessment_request']['semantic_context']['route']
|
|
2973
|
+
assert route['expected_after_path'] == '/proof'
|
|
2974
|
+
assert route['after_observed_path'] == '/proof'
|
|
2975
|
+
assert after_verify.get('expected_terminal_path') == '/proof'
|
|
2976
|
+
assert '/pathname' not in json.dumps(after_verify['route_expectation'])
|
|
2977
|
+
assert 'wrong route' not in after_verify['verify_results']['after']['observation']['reason']
|
|
2978
|
+
return {
|
|
2979
|
+
'ok': True,
|
|
2980
|
+
'expected_path': after_verify['route_expectation']['expected_path'],
|
|
2981
|
+
'source': after_verify['route_expectation']['source'],
|
|
2982
|
+
}
|
|
2983
|
+
finally:
|
|
2984
|
+
shutil.rmtree(tempdir, ignore_errors=True)
|
|
2985
|
+
|
|
2986
|
+
|
|
2790
2987
|
def run_verify_interaction_reverse_terminal_route_from_proof_evidence():
|
|
2791
2988
|
tempdir = Path(tempfile.mkdtemp(prefix='riddle-proof-interaction-reverse-'))
|
|
2792
2989
|
state_path = tempdir / 'state.json'
|
|
@@ -3664,7 +3861,9 @@ if __name__ == '__main__':
|
|
|
3664
3861
|
'verify_capture_retry': run_verify_capture_retry(),
|
|
3665
3862
|
'remote_audit_verify_uses_default_capture_script': run_remote_audit_verify_uses_default_capture_script(),
|
|
3666
3863
|
'verify_interaction_terminal_route_from_proof_evidence': run_verify_interaction_terminal_route_from_proof_evidence(),
|
|
3864
|
+
'verify_interaction_iife_structured_evidence_without_screenshot': run_verify_interaction_iife_structured_evidence_without_screenshot(),
|
|
3667
3865
|
'verify_interaction_proof_evidence_overrides_stale_expected_path': run_verify_interaction_proof_evidence_overrides_stale_expected_path(),
|
|
3866
|
+
'verify_interaction_proof_plan_placeholder_uses_live_evidence': run_verify_interaction_proof_plan_placeholder_uses_live_evidence(),
|
|
3668
3867
|
'verify_interaction_reverse_terminal_route_from_proof_evidence': run_verify_interaction_reverse_terminal_route_from_proof_evidence(),
|
|
3669
3868
|
'verify_interaction_reverse_terminal_expected_url_from_nested_terminal_evidence': run_verify_interaction_reverse_terminal_expected_url_from_nested_terminal_evidence(),
|
|
3670
3869
|
'verify_interaction_prose_route_noise_uses_proof_evidence': run_verify_interaction_prose_route_noise_uses_proof_evidence(),
|
|
@@ -31,6 +31,12 @@ CASES = [
|
|
|
31
31
|
'function': 'run_verify_interaction_proof_evidence_overrides_stale_expected_path',
|
|
32
32
|
'expected_terminal': 'pass',
|
|
33
33
|
},
|
|
34
|
+
{
|
|
35
|
+
'name': 'route-change-proof-plan-placeholder-ignored',
|
|
36
|
+
'covers': ['route-changing interactions', 'proof-evidence-present'],
|
|
37
|
+
'function': 'run_verify_interaction_proof_plan_placeholder_uses_live_evidence',
|
|
38
|
+
'expected_terminal': 'pass',
|
|
39
|
+
},
|
|
34
40
|
{
|
|
35
41
|
'name': 'route-change-reverse-pass',
|
|
36
42
|
'covers': ['route-changing interactions'],
|
|
@@ -97,6 +103,12 @@ CASES = [
|
|
|
97
103
|
'function': 'run_verify_structured_evidence_without_screenshot',
|
|
98
104
|
'expected_terminal': 'pass',
|
|
99
105
|
},
|
|
106
|
+
{
|
|
107
|
+
'name': 'interaction-iife-structured-proof-without-screenshot-pass',
|
|
108
|
+
'covers': ['route-changing interactions', 'proof-evidence-present', 'proof-evidence-present/absent cases'],
|
|
109
|
+
'function': 'run_verify_interaction_iife_structured_evidence_without_screenshot',
|
|
110
|
+
'expected_terminal': 'pass',
|
|
111
|
+
},
|
|
100
112
|
{
|
|
101
113
|
'name': 'proof-evidence-absent-specific-blocker',
|
|
102
114
|
'covers': ['proof-evidence-absent'],
|