@riddledc/riddle-proof 0.8.5 → 0.8.6
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/adapters/codex-exec-agent.cjs +1 -0
- package/dist/adapters/codex-exec-agent.js +1 -1
- package/dist/adapters/codex.cjs +1 -0
- package/dist/adapters/codex.js +1 -1
- package/dist/adapters/local-agent.cjs +1 -0
- package/dist/adapters/local-agent.js +1 -1
- package/dist/advanced/index.d.cts +1 -1
- package/dist/advanced/index.d.ts +1 -1
- package/dist/advanced/proof-run-engine.d.cts +1 -1
- package/dist/advanced/proof-run-engine.d.ts +1 -1
- package/dist/{chunk-7F5LNUGR.js → chunk-5MILMRQY.js} +1 -0
- package/dist/{chunk-OD5UNE57.js → chunk-NAFJ4KSF.js} +1 -1
- package/dist/cli/index.js +2 -2
- package/dist/cli.cjs +1 -0
- package/dist/cli.js +2 -2
- package/dist/codex-exec-agent.cjs +1 -0
- package/dist/codex-exec-agent.js +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.js +1 -1
- package/dist/local-agent.cjs +1 -0
- package/dist/local-agent.js +1 -1
- package/dist/{proof-run-engine-B7DCPzpK.d.cts → proof-run-engine-BO1h0Bmy.d.cts} +3 -3
- package/dist/{proof-run-engine-BomAcXhA.d.ts → proof-run-engine-CIdpWNh6.d.ts} +3 -3
- package/dist/proof-run-engine.d.cts +1 -1
- package/dist/proof-run-engine.d.ts +1 -1
- package/package.json +1 -1
- package/runtime/lib/author.py +1 -0
- package/runtime/lib/verify.py +86 -0
- package/runtime/tests/recon_verify_smoke.py +12 -0
|
@@ -649,6 +649,7 @@ function createCodexExecAgentAdapter(config = {}, runner = createCodexExecJsonRu
|
|
|
649
649
|
"Use the recon-approved route and baseline context; make the plan name the concrete target, expected before state, expected after state, and stop condition.",
|
|
650
650
|
"Choose the evidence modality from verification_mode and success_criteria: screenshots for visual/UI proof, interactions plus screenshots for interaction proof, structured metrics/logs/JSON/audio analysis for non-visual proof.",
|
|
651
651
|
"For playable/gameplay proof, treat screenshots as supporting artifacts only: start the game, send keyboard or pointer input, measure state before/after, measure non-HUD canvas/playfield pixel deltas across time, and return playability evidence with version riddle-proof.playability.v1.",
|
|
652
|
+
"For interaction proof, return a structured evidence object with start route/state, terminal route/state, action, assertions, and matched UI text. Catch waitForURL or selector timeouts and record them as failed assertions instead of throwing before evidence is emitted.",
|
|
652
653
|
"For structured proof, collect meaningful measurements inside page.evaluate, assign them to an evidence variable, and return that object from capture_script. Screenshots are optional supporting context for data/audio/log/metric/custom modes.",
|
|
653
654
|
"Do not assign globalThis.__riddleProofEvidence, window.__riddleProofEvidence, or self.__riddleProofEvidence in the worker context. Avoid global evidence assignment unless it is inside page.evaluate for compatibility with older packets.",
|
|
654
655
|
"Do not call Playwright page.* APIs inside page.evaluate; page.evaluate runs in the browser page, while page.waitForFunction, page.waitForSelector, page.click, and saveScreenshot belong in the outer capture script.",
|
package/dist/adapters/codex.cjs
CHANGED
|
@@ -649,6 +649,7 @@ function createCodexExecAgentAdapter(config = {}, runner = createCodexExecJsonRu
|
|
|
649
649
|
"Use the recon-approved route and baseline context; make the plan name the concrete target, expected before state, expected after state, and stop condition.",
|
|
650
650
|
"Choose the evidence modality from verification_mode and success_criteria: screenshots for visual/UI proof, interactions plus screenshots for interaction proof, structured metrics/logs/JSON/audio analysis for non-visual proof.",
|
|
651
651
|
"For playable/gameplay proof, treat screenshots as supporting artifacts only: start the game, send keyboard or pointer input, measure state before/after, measure non-HUD canvas/playfield pixel deltas across time, and return playability evidence with version riddle-proof.playability.v1.",
|
|
652
|
+
"For interaction proof, return a structured evidence object with start route/state, terminal route/state, action, assertions, and matched UI text. Catch waitForURL or selector timeouts and record them as failed assertions instead of throwing before evidence is emitted.",
|
|
652
653
|
"For structured proof, collect meaningful measurements inside page.evaluate, assign them to an evidence variable, and return that object from capture_script. Screenshots are optional supporting context for data/audio/log/metric/custom modes.",
|
|
653
654
|
"Do not assign globalThis.__riddleProofEvidence, window.__riddleProofEvidence, or self.__riddleProofEvidence in the worker context. Avoid global evidence assignment unless it is inside page.evaluate for compatibility with older packets.",
|
|
654
655
|
"Do not call Playwright page.* APIs inside page.evaluate; page.evaluate runs in the browser page, while page.waitForFunction, page.waitForSelector, page.click, and saveScreenshot belong in the outer capture script.",
|
package/dist/adapters/codex.js
CHANGED
|
@@ -649,6 +649,7 @@ function createCodexExecAgentAdapter(config = {}, runner = createCodexExecJsonRu
|
|
|
649
649
|
"Use the recon-approved route and baseline context; make the plan name the concrete target, expected before state, expected after state, and stop condition.",
|
|
650
650
|
"Choose the evidence modality from verification_mode and success_criteria: screenshots for visual/UI proof, interactions plus screenshots for interaction proof, structured metrics/logs/JSON/audio analysis for non-visual proof.",
|
|
651
651
|
"For playable/gameplay proof, treat screenshots as supporting artifacts only: start the game, send keyboard or pointer input, measure state before/after, measure non-HUD canvas/playfield pixel deltas across time, and return playability evidence with version riddle-proof.playability.v1.",
|
|
652
|
+
"For interaction proof, return a structured evidence object with start route/state, terminal route/state, action, assertions, and matched UI text. Catch waitForURL or selector timeouts and record them as failed assertions instead of throwing before evidence is emitted.",
|
|
652
653
|
"For structured proof, collect meaningful measurements inside page.evaluate, assign them to an evidence variable, and return that object from capture_script. Screenshots are optional supporting context for data/audio/log/metric/custom modes.",
|
|
653
654
|
"Do not assign globalThis.__riddleProofEvidence, window.__riddleProofEvidence, or self.__riddleProofEvidence in the worker context. Avoid global evidence assignment unless it is inside page.evaluate for compatibility with older packets.",
|
|
654
655
|
"Do not call Playwright page.* APIs inside page.evaluate; page.evaluate runs in the browser page, while page.waitForFunction, page.waitForSelector, page.click, and saveScreenshot belong in the outer capture script.",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { b as runner } from '../runner-4LJ5z0D-.cjs';
|
|
2
2
|
export { l as engineHarness } from '../engine-harness-LBfqbFSe.cjs';
|
|
3
3
|
export { p as proofRunCore } from '../proof-run-core-CE0jx7wL.cjs';
|
|
4
|
-
export { p as proofRunEngine } from '../proof-run-engine-
|
|
4
|
+
export { p as proofRunEngine } from '../proof-run-engine-BO1h0Bmy.cjs';
|
|
5
5
|
import '../types.cjs';
|
package/dist/advanced/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { b as runner } from '../runner-BdQpOkZD.js';
|
|
2
2
|
export { l as engineHarness } from '../engine-harness-CMACHP6A.js';
|
|
3
3
|
export { p as proofRunCore } from '../proof-run-core-CE0jx7wL.js';
|
|
4
|
-
export { p as proofRunEngine } from '../proof-run-engine-
|
|
4
|
+
export { p as proofRunEngine } from '../proof-run-engine-CIdpWNh6.js';
|
|
5
5
|
import '../types.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from '../proof-run-engine-
|
|
1
|
+
export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from '../proof-run-engine-BO1h0Bmy.cjs';
|
|
2
2
|
import '../proof-run-core-CE0jx7wL.cjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from '../proof-run-engine-
|
|
1
|
+
export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from '../proof-run-engine-CIdpWNh6.js';
|
|
2
2
|
import '../proof-run-core-CE0jx7wL.js';
|
|
@@ -608,6 +608,7 @@ function createCodexExecAgentAdapter(config = {}, runner = createCodexExecJsonRu
|
|
|
608
608
|
"Use the recon-approved route and baseline context; make the plan name the concrete target, expected before state, expected after state, and stop condition.",
|
|
609
609
|
"Choose the evidence modality from verification_mode and success_criteria: screenshots for visual/UI proof, interactions plus screenshots for interaction proof, structured metrics/logs/JSON/audio analysis for non-visual proof.",
|
|
610
610
|
"For playable/gameplay proof, treat screenshots as supporting artifacts only: start the game, send keyboard or pointer input, measure state before/after, measure non-HUD canvas/playfield pixel deltas across time, and return playability evidence with version riddle-proof.playability.v1.",
|
|
611
|
+
"For interaction proof, return a structured evidence object with start route/state, terminal route/state, action, assertions, and matched UI text. Catch waitForURL or selector timeouts and record them as failed assertions instead of throwing before evidence is emitted.",
|
|
611
612
|
"For structured proof, collect meaningful measurements inside page.evaluate, assign them to an evidence variable, and return that object from capture_script. Screenshots are optional supporting context for data/audio/log/metric/custom modes.",
|
|
612
613
|
"Do not assign globalThis.__riddleProofEvidence, window.__riddleProofEvidence, or self.__riddleProofEvidence in the worker context. Avoid global evidence assignment unless it is inside page.evaluate for compatibility with older packets.",
|
|
613
614
|
"Do not call Playwright page.* APIs inside page.evaluate; page.evaluate runs in the browser page, while page.waitForFunction, page.waitForSelector, page.click, and saveScreenshot belong in the outer capture script.",
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
import {
|
|
30
30
|
createCodexExecAgentAdapter,
|
|
31
31
|
runCodexExecAgentDoctor
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-5MILMRQY.js";
|
|
33
33
|
|
|
34
34
|
// src/cli.ts
|
|
35
35
|
import { existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from "fs";
|
package/dist/cli/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-NAFJ4KSF.js";
|
|
2
2
|
import "../chunk-PEWAIEER.js";
|
|
3
3
|
import "../chunk-TWTEUS7R.js";
|
|
4
4
|
import "../chunk-BDFSMWTI.js";
|
|
@@ -7,6 +7,6 @@ import "../chunk-FMOYUYH2.js";
|
|
|
7
7
|
import "../chunk-RV6LK7HU.js";
|
|
8
8
|
import "../chunk-4FOHZ7JG.js";
|
|
9
9
|
import "../chunk-JFQXAJH2.js";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-5MILMRQY.js";
|
|
11
11
|
import "../chunk-VY4Y5U57.js";
|
|
12
12
|
import "../chunk-MLKGABMK.js";
|
package/dist/cli.cjs
CHANGED
|
@@ -6412,6 +6412,7 @@ function createCodexExecAgentAdapter(config = {}, runner = createCodexExecJsonRu
|
|
|
6412
6412
|
"Use the recon-approved route and baseline context; make the plan name the concrete target, expected before state, expected after state, and stop condition.",
|
|
6413
6413
|
"Choose the evidence modality from verification_mode and success_criteria: screenshots for visual/UI proof, interactions plus screenshots for interaction proof, structured metrics/logs/JSON/audio analysis for non-visual proof.",
|
|
6414
6414
|
"For playable/gameplay proof, treat screenshots as supporting artifacts only: start the game, send keyboard or pointer input, measure state before/after, measure non-HUD canvas/playfield pixel deltas across time, and return playability evidence with version riddle-proof.playability.v1.",
|
|
6415
|
+
"For interaction proof, return a structured evidence object with start route/state, terminal route/state, action, assertions, and matched UI text. Catch waitForURL or selector timeouts and record them as failed assertions instead of throwing before evidence is emitted.",
|
|
6415
6416
|
"For structured proof, collect meaningful measurements inside page.evaluate, assign them to an evidence variable, and return that object from capture_script. Screenshots are optional supporting context for data/audio/log/metric/custom modes.",
|
|
6416
6417
|
"Do not assign globalThis.__riddleProofEvidence, window.__riddleProofEvidence, or self.__riddleProofEvidence in the worker context. Avoid global evidence assignment unless it is inside page.evaluate for compatibility with older packets.",
|
|
6417
6418
|
"Do not call Playwright page.* APIs inside page.evaluate; page.evaluate runs in the browser page, while page.waitForFunction, page.waitForSelector, page.click, and saveScreenshot belong in the outer capture script.",
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "./chunk-
|
|
2
|
+
import "./chunk-NAFJ4KSF.js";
|
|
3
3
|
import "./chunk-PEWAIEER.js";
|
|
4
4
|
import "./chunk-TWTEUS7R.js";
|
|
5
5
|
import "./chunk-BDFSMWTI.js";
|
|
@@ -8,6 +8,6 @@ import "./chunk-FMOYUYH2.js";
|
|
|
8
8
|
import "./chunk-RV6LK7HU.js";
|
|
9
9
|
import "./chunk-4FOHZ7JG.js";
|
|
10
10
|
import "./chunk-JFQXAJH2.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-5MILMRQY.js";
|
|
12
12
|
import "./chunk-VY4Y5U57.js";
|
|
13
13
|
import "./chunk-MLKGABMK.js";
|
|
@@ -647,6 +647,7 @@ function createCodexExecAgentAdapter(config = {}, runner = createCodexExecJsonRu
|
|
|
647
647
|
"Use the recon-approved route and baseline context; make the plan name the concrete target, expected before state, expected after state, and stop condition.",
|
|
648
648
|
"Choose the evidence modality from verification_mode and success_criteria: screenshots for visual/UI proof, interactions plus screenshots for interaction proof, structured metrics/logs/JSON/audio analysis for non-visual proof.",
|
|
649
649
|
"For playable/gameplay proof, treat screenshots as supporting artifacts only: start the game, send keyboard or pointer input, measure state before/after, measure non-HUD canvas/playfield pixel deltas across time, and return playability evidence with version riddle-proof.playability.v1.",
|
|
650
|
+
"For interaction proof, return a structured evidence object with start route/state, terminal route/state, action, assertions, and matched UI text. Catch waitForURL or selector timeouts and record them as failed assertions instead of throwing before evidence is emitted.",
|
|
650
651
|
"For structured proof, collect meaningful measurements inside page.evaluate, assign them to an evidence variable, and return that object from capture_script. Screenshots are optional supporting context for data/audio/log/metric/custom modes.",
|
|
651
652
|
"Do not assign globalThis.__riddleProofEvidence, window.__riddleProofEvidence, or self.__riddleProofEvidence in the worker context. Avoid global evidence assignment unless it is inside page.evaluate for compatibility with older packets.",
|
|
652
653
|
"Do not call Playwright page.* APIs inside page.evaluate; page.evaluate runs in the browser page, while page.waitForFunction, page.waitForSelector, page.click, and saveScreenshot belong in the outer capture script.",
|
package/dist/codex-exec-agent.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -7075,6 +7075,7 @@ function createCodexExecAgentAdapter(config = {}, runner = createCodexExecJsonRu
|
|
|
7075
7075
|
"Use the recon-approved route and baseline context; make the plan name the concrete target, expected before state, expected after state, and stop condition.",
|
|
7076
7076
|
"Choose the evidence modality from verification_mode and success_criteria: screenshots for visual/UI proof, interactions plus screenshots for interaction proof, structured metrics/logs/JSON/audio analysis for non-visual proof.",
|
|
7077
7077
|
"For playable/gameplay proof, treat screenshots as supporting artifacts only: start the game, send keyboard or pointer input, measure state before/after, measure non-HUD canvas/playfield pixel deltas across time, and return playability evidence with version riddle-proof.playability.v1.",
|
|
7078
|
+
"For interaction proof, return a structured evidence object with start route/state, terminal route/state, action, assertions, and matched UI text. Catch waitForURL or selector timeouts and record them as failed assertions instead of throwing before evidence is emitted.",
|
|
7078
7079
|
"For structured proof, collect meaningful measurements inside page.evaluate, assign them to an evidence variable, and return that object from capture_script. Screenshots are optional supporting context for data/audio/log/metric/custom modes.",
|
|
7079
7080
|
"Do not assign globalThis.__riddleProofEvidence, window.__riddleProofEvidence, or self.__riddleProofEvidence in the worker context. Avoid global evidence assignment unless it is inside page.evaluate for compatibility with older packets.",
|
|
7080
7081
|
"Do not call Playwright page.* APIs inside page.evaluate; page.evaluate runs in the browser page, while page.waitForFunction, page.waitForSelector, page.click, and saveScreenshot belong in the outer capture script.",
|
package/dist/index.js
CHANGED
package/dist/local-agent.cjs
CHANGED
|
@@ -649,6 +649,7 @@ function createCodexExecAgentAdapter(config = {}, runner = createCodexExecJsonRu
|
|
|
649
649
|
"Use the recon-approved route and baseline context; make the plan name the concrete target, expected before state, expected after state, and stop condition.",
|
|
650
650
|
"Choose the evidence modality from verification_mode and success_criteria: screenshots for visual/UI proof, interactions plus screenshots for interaction proof, structured metrics/logs/JSON/audio analysis for non-visual proof.",
|
|
651
651
|
"For playable/gameplay proof, treat screenshots as supporting artifacts only: start the game, send keyboard or pointer input, measure state before/after, measure non-HUD canvas/playfield pixel deltas across time, and return playability evidence with version riddle-proof.playability.v1.",
|
|
652
|
+
"For interaction proof, return a structured evidence object with start route/state, terminal route/state, action, assertions, and matched UI text. Catch waitForURL or selector timeouts and record them as failed assertions instead of throwing before evidence is emitted.",
|
|
652
653
|
"For structured proof, collect meaningful measurements inside page.evaluate, assign them to an evidence variable, and return that object from capture_script. Screenshots are optional supporting context for data/audio/log/metric/custom modes.",
|
|
653
654
|
"Do not assign globalThis.__riddleProofEvidence, window.__riddleProofEvidence, or self.__riddleProofEvidence in the worker context. Avoid global evidence assignment unless it is inside page.evaluate for compatibility with older packets.",
|
|
654
655
|
"Do not call Playwright page.* APIs inside page.evaluate; page.evaluate runs in the browser page, while page.waitForFunction, page.waitForSelector, page.click, and saveScreenshot belong in the outer capture script.",
|
package/dist/local-agent.js
CHANGED
|
@@ -292,7 +292,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
292
292
|
blocking?: boolean;
|
|
293
293
|
details?: Record<string, unknown>;
|
|
294
294
|
ok: boolean;
|
|
295
|
-
action: "
|
|
295
|
+
action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
|
|
296
296
|
state_path: string;
|
|
297
297
|
stage: any;
|
|
298
298
|
summary: string;
|
|
@@ -382,7 +382,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
382
382
|
continueWithStage?: WorkflowStage | null;
|
|
383
383
|
blocking?: boolean;
|
|
384
384
|
details?: Record<string, unknown>;
|
|
385
|
-
action: "
|
|
385
|
+
action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
|
|
386
386
|
state_path: string;
|
|
387
387
|
stage: any;
|
|
388
388
|
checkpoint: string;
|
|
@@ -659,7 +659,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
659
659
|
error?: undefined;
|
|
660
660
|
} | {
|
|
661
661
|
ok: boolean;
|
|
662
|
-
action: "
|
|
662
|
+
action: "setup" | "recon" | "author" | "implement" | "verify" | "ship";
|
|
663
663
|
state_path: string;
|
|
664
664
|
stage: any;
|
|
665
665
|
summary: string;
|
|
@@ -292,7 +292,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
292
292
|
blocking?: boolean;
|
|
293
293
|
details?: Record<string, unknown>;
|
|
294
294
|
ok: boolean;
|
|
295
|
-
action: "
|
|
295
|
+
action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
|
|
296
296
|
state_path: string;
|
|
297
297
|
stage: any;
|
|
298
298
|
summary: string;
|
|
@@ -382,7 +382,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
382
382
|
continueWithStage?: WorkflowStage | null;
|
|
383
383
|
blocking?: boolean;
|
|
384
384
|
details?: Record<string, unknown>;
|
|
385
|
-
action: "
|
|
385
|
+
action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
|
|
386
386
|
state_path: string;
|
|
387
387
|
stage: any;
|
|
388
388
|
checkpoint: string;
|
|
@@ -659,7 +659,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
659
659
|
error?: undefined;
|
|
660
660
|
} | {
|
|
661
661
|
ok: boolean;
|
|
662
|
-
action: "
|
|
662
|
+
action: "setup" | "recon" | "author" | "implement" | "verify" | "ship";
|
|
663
663
|
state_path: string;
|
|
664
664
|
stage: any;
|
|
665
665
|
summary: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import './proof-run-core-CE0jx7wL.cjs';
|
|
2
|
-
export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from './proof-run-engine-
|
|
2
|
+
export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from './proof-run-engine-BO1h0Bmy.cjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import './proof-run-core-CE0jx7wL.js';
|
|
2
|
-
export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from './proof-run-engine-
|
|
2
|
+
export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from './proof-run-engine-CIdpWNh6.js';
|
package/package.json
CHANGED
package/runtime/lib/author.py
CHANGED
|
@@ -158,6 +158,7 @@ def author_request_payload(state, reference, baselines, current_plan, hypothesis
|
|
|
158
158
|
'Keep capture_script concise Playwright statements.',
|
|
159
159
|
'For visual/UI proof, include saveScreenshot(\'after-proof\') exactly once.',
|
|
160
160
|
'For interaction proof, preserve the interaction contract and name the expected terminal route/state separately from the initial route.',
|
|
161
|
+
'For interaction proof, return a JSON-serializable evidence object with start route/state, terminal route/state, action, assertions, and matched UI text; catch waitForURL or selector timeouts and record them as failed assertions instead of throwing before evidence is emitted.',
|
|
161
162
|
'For playable/gameplay proof, start the experience, send keyboard or pointer input, sample state before/after, measure non-HUD playfield/canvas pixel deltas across time, and return a JSON-serializable evidence object with playability or playability_evidence version riddle-proof.playability.v1.',
|
|
162
163
|
'For data/audio/log/metric/custom proof, screenshots are optional; collect measurements inside page.evaluate, assign the result to an evidence variable, and return that evidence object from capture_script.',
|
|
163
164
|
'Do not assign globalThis.__riddleProofEvidence, window.__riddleProofEvidence, or self.__riddleProofEvidence in the worker context. Avoid global evidence assignment unless it is inside page.evaluate for compatibility with older packets.',
|
package/runtime/lib/verify.py
CHANGED
|
@@ -558,6 +558,83 @@ def extract_proof_evidence(payload):
|
|
|
558
558
|
return evidence
|
|
559
559
|
|
|
560
560
|
|
|
561
|
+
def attach_interaction_capture_failure_evidence(state, payload, expected_path, after_observation):
|
|
562
|
+
if not isinstance(payload, dict):
|
|
563
|
+
return payload, None
|
|
564
|
+
mode = normalized_verification_mode(state.get('verification_mode'))
|
|
565
|
+
if mode not in INTERACTION_MODES:
|
|
566
|
+
return payload, None
|
|
567
|
+
if extract_proof_evidence(payload) is not None:
|
|
568
|
+
return payload, None
|
|
569
|
+
|
|
570
|
+
details = after_observation.get('details') if isinstance(after_observation, dict) else {}
|
|
571
|
+
if not isinstance(details, dict):
|
|
572
|
+
details = {}
|
|
573
|
+
expected = normalize_observed_path(expected_path)
|
|
574
|
+
observed_raw = str(details.get('observed_path_raw') or details.get('observed_path') or '').strip()
|
|
575
|
+
observed = normalize_observed_path(observed_raw)
|
|
576
|
+
route_matches = route_matches_expected(expected, observed_raw or observed) if expected and (observed_raw or observed) else None
|
|
577
|
+
error_messages = [
|
|
578
|
+
str(item).strip()
|
|
579
|
+
for item in (details.get('capture_error_messages') or [])
|
|
580
|
+
if str(item).strip()
|
|
581
|
+
]
|
|
582
|
+
if route_matches is not False and not error_messages:
|
|
583
|
+
return payload, None
|
|
584
|
+
|
|
585
|
+
route_expectation = state.get('route_expectation') if isinstance(state.get('route_expectation'), dict) else {}
|
|
586
|
+
expected_parts = route_parts(expected)
|
|
587
|
+
observed_parts = route_parts(observed_raw or observed)
|
|
588
|
+
evidence = {
|
|
589
|
+
'version': 'riddle-proof.interaction.capture-failure.v1',
|
|
590
|
+
'synthetic': True,
|
|
591
|
+
'source': 'verify_capture_failure',
|
|
592
|
+
'mode': mode,
|
|
593
|
+
'passed': False,
|
|
594
|
+
'proofReady': False,
|
|
595
|
+
'authored_proof_evidence_present': False,
|
|
596
|
+
'evidence_summary': 'Interaction capture failed before the authored script emitted structured proof evidence.',
|
|
597
|
+
'expected': {
|
|
598
|
+
'path': expected,
|
|
599
|
+
'pathname': expected_parts.get('pathname') or '',
|
|
600
|
+
'query': expected_parts.get('query') or '',
|
|
601
|
+
'hash': expected_parts.get('hash') or '',
|
|
602
|
+
},
|
|
603
|
+
'observed': {
|
|
604
|
+
'path': observed,
|
|
605
|
+
'raw_path': observed_raw,
|
|
606
|
+
'pathname': observed_parts.get('pathname') or '',
|
|
607
|
+
'query': observed_parts.get('query') or '',
|
|
608
|
+
'hash': observed_parts.get('hash') or '',
|
|
609
|
+
},
|
|
610
|
+
'checks': {
|
|
611
|
+
'scriptCompleted': len(error_messages) == 0,
|
|
612
|
+
'routeMatches': bool(route_matches),
|
|
613
|
+
'authoredEvidenceReturned': False,
|
|
614
|
+
},
|
|
615
|
+
'route_expectation_source': route_expectation.get('source') or '',
|
|
616
|
+
}
|
|
617
|
+
if error_messages:
|
|
618
|
+
evidence['capture_error'] = error_messages[0][:1000]
|
|
619
|
+
if route_matches is False:
|
|
620
|
+
evidence['evidence_summary'] = (
|
|
621
|
+
'Interaction capture reached a different terminal route than expected before authored proof evidence was emitted.'
|
|
622
|
+
)
|
|
623
|
+
|
|
624
|
+
enriched = enrich_capture_payload(payload)
|
|
625
|
+
patched = dict(enriched)
|
|
626
|
+
result = dict(patched.get('result') or {})
|
|
627
|
+
result['proofEvidence'] = evidence
|
|
628
|
+
patched['result'] = result
|
|
629
|
+
console = list(patched.get('console') or [])
|
|
630
|
+
try:
|
|
631
|
+
console.append(PROOF_EVIDENCE_PREFIX + json.dumps(evidence, sort_keys=True))
|
|
632
|
+
except Exception:
|
|
633
|
+
pass
|
|
634
|
+
patched['console'] = console
|
|
635
|
+
return patched, evidence
|
|
636
|
+
|
|
637
|
+
|
|
561
638
|
def proof_evidence_records(value):
|
|
562
639
|
if isinstance(value, dict):
|
|
563
640
|
return [value]
|
|
@@ -3113,6 +3190,15 @@ after_observation = evaluate_capture_quality(after_payload, expected_path, verif
|
|
|
3113
3190
|
details = after_observation.get('details') if isinstance(after_observation.get('details'), dict) else {}
|
|
3114
3191
|
details['viewport_matrix'] = after_viewport_matrix
|
|
3115
3192
|
after_observation['details'] = details
|
|
3193
|
+
after_payload, synthetic_interaction_failure_evidence = attach_interaction_capture_failure_evidence(s, after_payload, expected_path, after_observation)
|
|
3194
|
+
if synthetic_interaction_failure_evidence is not None:
|
|
3195
|
+
s['synthetic_interaction_failure_evidence'] = synthetic_interaction_failure_evidence
|
|
3196
|
+
if isinstance(results.get('after'), dict):
|
|
3197
|
+
results['after']['raw'] = after_payload
|
|
3198
|
+
after_observation = evaluate_capture_quality(after_payload, expected_path, verification_mode)
|
|
3199
|
+
details = after_observation.get('details') if isinstance(after_observation.get('details'), dict) else {}
|
|
3200
|
+
details['viewport_matrix'] = after_viewport_matrix
|
|
3201
|
+
after_observation['details'] = details
|
|
3116
3202
|
if after_viewport_matrix.get('status') == 'incomplete':
|
|
3117
3203
|
missing_names = [
|
|
3118
3204
|
str(item.get('name') or item.get('slug') or '').strip()
|
|
@@ -2580,6 +2580,18 @@ def run_verify_interaction_authored_query_hash_mismatch_returns_author():
|
|
|
2580
2580
|
assert capture_quality['mismatch']['observed_after_path'] == '/pricing/'
|
|
2581
2581
|
assert 'page.waitForURL: Timeout 15000ms exceeded' in capture_quality['summary']
|
|
2582
2582
|
assert any('capture plan should be revised' in reason for reason in capture_quality['reasons'])
|
|
2583
|
+
supporting = after_verify['verify_results']['after']['supporting_artifacts']
|
|
2584
|
+
assert supporting['proof_evidence_present'] is True
|
|
2585
|
+
assert supporting['has_structured_payload'] is True
|
|
2586
|
+
synthetic_evidence = after_verify['evidence_bundle']['proof_evidence']
|
|
2587
|
+
assert synthetic_evidence['version'] == 'riddle-proof.interaction.capture-failure.v1'
|
|
2588
|
+
assert synthetic_evidence['passed'] is False
|
|
2589
|
+
assert synthetic_evidence['authored_proof_evidence_present'] is False
|
|
2590
|
+
assert synthetic_evidence['checks']['routeMatches'] is False
|
|
2591
|
+
assert synthetic_evidence['expected']['query'] == 'rp_probe=1'
|
|
2592
|
+
assert synthetic_evidence['expected']['hash'] == '#pricing-probe'
|
|
2593
|
+
assert synthetic_evidence['observed']['path'] == '/pricing'
|
|
2594
|
+
assert 'page.waitForURL: Timeout 15000ms exceeded' in synthetic_evidence['capture_error']
|
|
2583
2595
|
return {
|
|
2584
2596
|
'ok': True,
|
|
2585
2597
|
'summary': capture_quality['summary'],
|