@riddledc/riddle-proof 0.8.10 → 0.8.11
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/index.d.cts +2 -2
- package/dist/advanced/index.d.ts +2 -2
- package/dist/advanced/proof-run-core.d.cts +1 -1
- package/dist/advanced/proof-run-core.d.ts +1 -1
- package/dist/advanced/proof-run-engine.d.cts +2 -2
- package/dist/advanced/proof-run-engine.d.ts +2 -2
- package/dist/{proof-run-core-Ci9uFxMc.d.cts → proof-run-core-CE0jx7wL.d.cts} +1 -1
- package/dist/{proof-run-core-Ci9uFxMc.d.ts → proof-run-core-CE0jx7wL.d.ts} +1 -1
- package/dist/proof-run-core.d.cts +1 -1
- package/dist/proof-run-core.d.ts +1 -1
- package/dist/{proof-run-engine-Bd1T43Dy.d.cts → proof-run-engine-B7DCPzpK.d.cts} +4 -4
- package/dist/{proof-run-engine-CXyhB-io.d.ts → proof-run-engine-BomAcXhA.d.ts} +4 -4
- package/dist/proof-run-engine.d.cts +2 -2
- package/dist/proof-run-engine.d.ts +2 -2
- package/package.json +1 -1
- package/runtime/lib/verify.py +22 -8
- package/runtime/tests/recon_verify_smoke.py +54 -0
- package/runtime/tests/trust_boundary_regression.py +6 -0
|
@@ -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
|
-
export { p as proofRunCore } from '../proof-run-core-
|
|
4
|
-
export { p as proofRunEngine } from '../proof-run-engine-
|
|
3
|
+
export { p as proofRunCore } from '../proof-run-core-CE0jx7wL.cjs';
|
|
4
|
+
export { p as proofRunEngine } from '../proof-run-engine-B7DCPzpK.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
|
-
export { p as proofRunCore } from '../proof-run-core-
|
|
4
|
-
export { p as proofRunEngine } from '../proof-run-engine-
|
|
3
|
+
export { p as proofRunCore } from '../proof-run-core-CE0jx7wL.js';
|
|
4
|
+
export { p as proofRunEngine } from '../proof-run-engine-BomAcXhA.js';
|
|
5
5
|
import '../types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { B as BUNDLED_RIDDLE_PROOF_DIR, C as CHECKPOINT_CONTRACT_VERSION, b as CheckpointInputContract, P as PluginConfig, R as RIDDLE_PROOF_DIR_CANDIDATES, S as ShipGateValidation, c as WORKFLOW_STAGE_ORDER, d as WorkflowAction, W as WorkflowParams, a as WorkflowStage, e as buildCheckpointContract, f as buildSetupArgs, g as checkpointContinueStage, h as clearStageDecisionRequest, i as ensureAction, j as ensureStageLoopState, k as invalidateVerifyEvidence, m as mergeStateFromParams, n as noImplementationModeFor, l as previewModeFromWorkflowMode, o as readState, q as recordStageAttempt, s as requiredBaselineLabelsForState, r as resolveConfig, t as resolveRiddleProofDir, u as setStageDecisionRequest, v as summarizeState, w as validateShipGate, x as visualDeltaForState, y as visualDeltaRequiredForState, z as visualDeltaShipGateReason, A as workflowFile, D as writeState } from '../proof-run-core-
|
|
1
|
+
export { B as BUNDLED_RIDDLE_PROOF_DIR, C as CHECKPOINT_CONTRACT_VERSION, b as CheckpointInputContract, P as PluginConfig, R as RIDDLE_PROOF_DIR_CANDIDATES, S as ShipGateValidation, c as WORKFLOW_STAGE_ORDER, d as WorkflowAction, W as WorkflowParams, a as WorkflowStage, e as buildCheckpointContract, f as buildSetupArgs, g as checkpointContinueStage, h as clearStageDecisionRequest, i as ensureAction, j as ensureStageLoopState, k as invalidateVerifyEvidence, m as mergeStateFromParams, n as noImplementationModeFor, l as previewModeFromWorkflowMode, o as readState, q as recordStageAttempt, s as requiredBaselineLabelsForState, r as resolveConfig, t as resolveRiddleProofDir, u as setStageDecisionRequest, v as summarizeState, w as validateShipGate, x as visualDeltaForState, y as visualDeltaRequiredForState, z as visualDeltaShipGateReason, A as workflowFile, D as writeState } from '../proof-run-core-CE0jx7wL.cjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { B as BUNDLED_RIDDLE_PROOF_DIR, C as CHECKPOINT_CONTRACT_VERSION, b as CheckpointInputContract, P as PluginConfig, R as RIDDLE_PROOF_DIR_CANDIDATES, S as ShipGateValidation, c as WORKFLOW_STAGE_ORDER, d as WorkflowAction, W as WorkflowParams, a as WorkflowStage, e as buildCheckpointContract, f as buildSetupArgs, g as checkpointContinueStage, h as clearStageDecisionRequest, i as ensureAction, j as ensureStageLoopState, k as invalidateVerifyEvidence, m as mergeStateFromParams, n as noImplementationModeFor, l as previewModeFromWorkflowMode, o as readState, q as recordStageAttempt, s as requiredBaselineLabelsForState, r as resolveConfig, t as resolveRiddleProofDir, u as setStageDecisionRequest, v as summarizeState, w as validateShipGate, x as visualDeltaForState, y as visualDeltaRequiredForState, z as visualDeltaShipGateReason, A as workflowFile, D as writeState } from '../proof-run-core-
|
|
1
|
+
export { B as BUNDLED_RIDDLE_PROOF_DIR, C as CHECKPOINT_CONTRACT_VERSION, b as CheckpointInputContract, P as PluginConfig, R as RIDDLE_PROOF_DIR_CANDIDATES, S as ShipGateValidation, c as WORKFLOW_STAGE_ORDER, d as WorkflowAction, W as WorkflowParams, a as WorkflowStage, e as buildCheckpointContract, f as buildSetupArgs, g as checkpointContinueStage, h as clearStageDecisionRequest, i as ensureAction, j as ensureStageLoopState, k as invalidateVerifyEvidence, m as mergeStateFromParams, n as noImplementationModeFor, l as previewModeFromWorkflowMode, o as readState, q as recordStageAttempt, s as requiredBaselineLabelsForState, r as resolveConfig, t as resolveRiddleProofDir, u as setStageDecisionRequest, v as summarizeState, w as validateShipGate, x as visualDeltaForState, y as visualDeltaRequiredForState, z as visualDeltaShipGateReason, A as workflowFile, D as writeState } from '../proof-run-core-CE0jx7wL.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from '../proof-run-engine-
|
|
2
|
-
import '../proof-run-core-
|
|
1
|
+
export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from '../proof-run-engine-B7DCPzpK.cjs';
|
|
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-
|
|
2
|
-
import '../proof-run-core-
|
|
1
|
+
export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from '../proof-run-engine-BomAcXhA.js';
|
|
2
|
+
import '../proof-run-core-CE0jx7wL.js';
|
|
@@ -120,7 +120,7 @@ declare function buildSetupArgs(params: WorkflowParams, config: ReturnType<typeo
|
|
|
120
120
|
target_image_hash: string;
|
|
121
121
|
viewport_matrix_json: string;
|
|
122
122
|
deterministic_setup_json: string;
|
|
123
|
-
reference: "
|
|
123
|
+
reference: "before" | "prod" | "both";
|
|
124
124
|
base_branch: string;
|
|
125
125
|
before_ref: string;
|
|
126
126
|
allow_static_preview_fallback: string;
|
|
@@ -120,7 +120,7 @@ declare function buildSetupArgs(params: WorkflowParams, config: ReturnType<typeo
|
|
|
120
120
|
target_image_hash: string;
|
|
121
121
|
viewport_matrix_json: string;
|
|
122
122
|
deterministic_setup_json: string;
|
|
123
|
-
reference: "
|
|
123
|
+
reference: "before" | "prod" | "both";
|
|
124
124
|
base_branch: string;
|
|
125
125
|
before_ref: string;
|
|
126
126
|
allow_static_preview_fallback: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { B as BUNDLED_RIDDLE_PROOF_DIR, C as CHECKPOINT_CONTRACT_VERSION, b as CheckpointInputContract, P as PluginConfig, R as RIDDLE_PROOF_DIR_CANDIDATES, S as ShipGateValidation, c as WORKFLOW_STAGE_ORDER, d as WorkflowAction, W as WorkflowParams, a as WorkflowStage, e as buildCheckpointContract, f as buildSetupArgs, g as checkpointContinueStage, h as clearStageDecisionRequest, i as ensureAction, j as ensureStageLoopState, k as invalidateVerifyEvidence, m as mergeStateFromParams, n as noImplementationModeFor, l as previewModeFromWorkflowMode, o as readState, q as recordStageAttempt, s as requiredBaselineLabelsForState, r as resolveConfig, t as resolveRiddleProofDir, u as setStageDecisionRequest, v as summarizeState, w as validateShipGate, x as visualDeltaForState, y as visualDeltaRequiredForState, z as visualDeltaShipGateReason, A as workflowFile, D as writeState } from './proof-run-core-
|
|
1
|
+
export { B as BUNDLED_RIDDLE_PROOF_DIR, C as CHECKPOINT_CONTRACT_VERSION, b as CheckpointInputContract, P as PluginConfig, R as RIDDLE_PROOF_DIR_CANDIDATES, S as ShipGateValidation, c as WORKFLOW_STAGE_ORDER, d as WorkflowAction, W as WorkflowParams, a as WorkflowStage, e as buildCheckpointContract, f as buildSetupArgs, g as checkpointContinueStage, h as clearStageDecisionRequest, i as ensureAction, j as ensureStageLoopState, k as invalidateVerifyEvidence, m as mergeStateFromParams, n as noImplementationModeFor, l as previewModeFromWorkflowMode, o as readState, q as recordStageAttempt, s as requiredBaselineLabelsForState, r as resolveConfig, t as resolveRiddleProofDir, u as setStageDecisionRequest, v as summarizeState, w as validateShipGate, x as visualDeltaForState, y as visualDeltaRequiredForState, z as visualDeltaShipGateReason, A as workflowFile, D as writeState } from './proof-run-core-CE0jx7wL.cjs';
|
package/dist/proof-run-core.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { B as BUNDLED_RIDDLE_PROOF_DIR, C as CHECKPOINT_CONTRACT_VERSION, b as CheckpointInputContract, P as PluginConfig, R as RIDDLE_PROOF_DIR_CANDIDATES, S as ShipGateValidation, c as WORKFLOW_STAGE_ORDER, d as WorkflowAction, W as WorkflowParams, a as WorkflowStage, e as buildCheckpointContract, f as buildSetupArgs, g as checkpointContinueStage, h as clearStageDecisionRequest, i as ensureAction, j as ensureStageLoopState, k as invalidateVerifyEvidence, m as mergeStateFromParams, n as noImplementationModeFor, l as previewModeFromWorkflowMode, o as readState, q as recordStageAttempt, s as requiredBaselineLabelsForState, r as resolveConfig, t as resolveRiddleProofDir, u as setStageDecisionRequest, v as summarizeState, w as validateShipGate, x as visualDeltaForState, y as visualDeltaRequiredForState, z as visualDeltaShipGateReason, A as workflowFile, D as writeState } from './proof-run-core-
|
|
1
|
+
export { B as BUNDLED_RIDDLE_PROOF_DIR, C as CHECKPOINT_CONTRACT_VERSION, b as CheckpointInputContract, P as PluginConfig, R as RIDDLE_PROOF_DIR_CANDIDATES, S as ShipGateValidation, c as WORKFLOW_STAGE_ORDER, d as WorkflowAction, W as WorkflowParams, a as WorkflowStage, e as buildCheckpointContract, f as buildSetupArgs, g as checkpointContinueStage, h as clearStageDecisionRequest, i as ensureAction, j as ensureStageLoopState, k as invalidateVerifyEvidence, m as mergeStateFromParams, n as noImplementationModeFor, l as previewModeFromWorkflowMode, o as readState, q as recordStageAttempt, s as requiredBaselineLabelsForState, r as resolveConfig, t as resolveRiddleProofDir, u as setStageDecisionRequest, v as summarizeState, w as validateShipGate, x as visualDeltaForState, y as visualDeltaRequiredForState, z as visualDeltaShipGateReason, A as workflowFile, D as writeState } from './proof-run-core-CE0jx7wL.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { W as WorkflowParams, r as resolveConfig, P as PluginConfig, a as WorkflowStage } from './proof-run-core-
|
|
1
|
+
import { W as WorkflowParams, r as resolveConfig, P as PluginConfig, a as WorkflowStage } from './proof-run-core-CE0jx7wL.cjs';
|
|
2
2
|
|
|
3
3
|
declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, resolvedConfig?: ReturnType<typeof resolveConfig>): Promise<{
|
|
4
4
|
ok: boolean;
|
|
@@ -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: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "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: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "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: "author" | "recon" | "ship" | "implement" | "verify" | "setup";
|
|
663
663
|
state_path: string;
|
|
664
664
|
stage: any;
|
|
665
665
|
summary: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { W as WorkflowParams, r as resolveConfig, P as PluginConfig, a as WorkflowStage } from './proof-run-core-
|
|
1
|
+
import { W as WorkflowParams, r as resolveConfig, P as PluginConfig, a as WorkflowStage } from './proof-run-core-CE0jx7wL.js';
|
|
2
2
|
|
|
3
3
|
declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, resolvedConfig?: ReturnType<typeof resolveConfig>): Promise<{
|
|
4
4
|
ok: boolean;
|
|
@@ -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: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "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: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "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: "author" | "recon" | "ship" | "implement" | "verify" | "setup";
|
|
663
663
|
state_path: string;
|
|
664
664
|
stage: any;
|
|
665
665
|
summary: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import './proof-run-core-
|
|
2
|
-
export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from './proof-run-engine-
|
|
1
|
+
import './proof-run-core-CE0jx7wL.cjs';
|
|
2
|
+
export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from './proof-run-engine-B7DCPzpK.cjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import './proof-run-core-
|
|
2
|
-
export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from './proof-run-engine-
|
|
1
|
+
import './proof-run-core-CE0jx7wL.js';
|
|
2
|
+
export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from './proof-run-engine-BomAcXhA.js';
|
package/package.json
CHANGED
package/runtime/lib/verify.py
CHANGED
|
@@ -2158,18 +2158,29 @@ def text_path_candidate(value):
|
|
|
2158
2158
|
return path_candidate(raw)
|
|
2159
2159
|
|
|
2160
2160
|
|
|
2161
|
+
def text_route_candidate(value):
|
|
2162
|
+
candidate = text_path_candidate(value)
|
|
2163
|
+
if not candidate:
|
|
2164
|
+
return ''
|
|
2165
|
+
parsed = urlparse(candidate)
|
|
2166
|
+
first_segment = next((part for part in (parsed.path or '').split('/') if part), '')
|
|
2167
|
+
if first_segment and first_segment[:1].isupper():
|
|
2168
|
+
return ''
|
|
2169
|
+
return candidate
|
|
2170
|
+
|
|
2171
|
+
|
|
2161
2172
|
def terminal_path_from_text(value):
|
|
2162
2173
|
if not isinstance(value, str):
|
|
2163
2174
|
return ''
|
|
2164
2175
|
for match in re.findall(r"""['"`](/[^'"`\s]+[?#][^'"`\s]*)['"`]""", value):
|
|
2165
|
-
candidate =
|
|
2176
|
+
candidate = text_route_candidate(match)
|
|
2166
2177
|
if candidate:
|
|
2167
2178
|
return candidate
|
|
2168
2179
|
context_pattern = re.compile(
|
|
2169
|
-
r"""(?is)\b(?:expected\s+(?:terminal|after|final)|terminal|after|final)\
|
|
2180
|
+
r"""(?is)\b(?:expected\s+(?:terminal|after|final)(?:\s+(?:route|path|url))?|terminal(?:\s+(?:route|path|url))?|after(?:\s+(?:route|path|url))?|final(?:\s+(?:route|path|url))?)\s*(?:should\s+(?:be|equal|match)|must\s+(?:be|equal|match)|is|as|to|=|:)?\s*['"`]?(/[^'"`\s,;)]*)"""
|
|
2170
2181
|
)
|
|
2171
2182
|
for match in context_pattern.findall(value):
|
|
2172
|
-
candidate =
|
|
2183
|
+
candidate = text_route_candidate(match)
|
|
2173
2184
|
if candidate:
|
|
2174
2185
|
return candidate
|
|
2175
2186
|
return ''
|
|
@@ -2389,6 +2400,13 @@ def interaction_terminal_path_from_evidence(proof_evidence):
|
|
|
2389
2400
|
|
|
2390
2401
|
|
|
2391
2402
|
def interaction_terminal_path_from_state(state):
|
|
2403
|
+
for key in (
|
|
2404
|
+
'expected_terminal_path',
|
|
2405
|
+
'expected_after_path',
|
|
2406
|
+
):
|
|
2407
|
+
candidate = path_candidate(state.get(key))
|
|
2408
|
+
if candidate:
|
|
2409
|
+
return candidate, key
|
|
2392
2410
|
for key in (
|
|
2393
2411
|
'interaction_contract',
|
|
2394
2412
|
'proof_contract',
|
|
@@ -2401,14 +2419,10 @@ def interaction_terminal_path_from_state(state):
|
|
|
2401
2419
|
if candidate:
|
|
2402
2420
|
return candidate, key
|
|
2403
2421
|
for key in (
|
|
2404
|
-
'expected_terminal_path',
|
|
2405
|
-
'expected_after_path',
|
|
2406
2422
|
'capture_script',
|
|
2407
2423
|
'proof_plan',
|
|
2408
|
-
'success_criteria',
|
|
2409
|
-
'change_request',
|
|
2410
2424
|
):
|
|
2411
|
-
candidate =
|
|
2425
|
+
candidate = terminal_path_from_text(state.get(key))
|
|
2412
2426
|
if candidate:
|
|
2413
2427
|
return candidate, key
|
|
2414
2428
|
return '', ''
|
|
@@ -2612,6 +2612,59 @@ def run_verify_interaction_reverse_terminal_route_from_proof_evidence():
|
|
|
2612
2612
|
shutil.rmtree(tempdir, ignore_errors=True)
|
|
2613
2613
|
|
|
2614
2614
|
|
|
2615
|
+
def run_verify_interaction_prose_route_noise_uses_proof_evidence():
|
|
2616
|
+
tempdir = Path(tempfile.mkdtemp(prefix='riddle-proof-interaction-prose-noise-'))
|
|
2617
|
+
state_path = tempdir / 'state.json'
|
|
2618
|
+
try:
|
|
2619
|
+
state = base_state(tempdir, reference='before')
|
|
2620
|
+
state.update({
|
|
2621
|
+
'recon_status': 'ready_for_proof_plan',
|
|
2622
|
+
'author_status': 'ready',
|
|
2623
|
+
'proof_plan_status': 'ready',
|
|
2624
|
+
'implementation_status': 'changes_detected',
|
|
2625
|
+
'verification_mode': 'interaction',
|
|
2626
|
+
'server_path': '/proof/',
|
|
2627
|
+
'before_cdn': 'https://cdn.example.com/before-proof.png',
|
|
2628
|
+
'proof_plan': 'Start on the proof page, click Home, and confirm the home page content is visible.',
|
|
2629
|
+
'capture_script': "clickedHomeNavigation(); await saveScreenshot('after-home');",
|
|
2630
|
+
'change_request': (
|
|
2631
|
+
'Prior wrapper notes mentioned terminal drift to /Your and package '
|
|
2632
|
+
'@riddledc/openclaw-riddle-proof, but those are prose diagnostics, not route expectations.'
|
|
2633
|
+
),
|
|
2634
|
+
'success_criteria': (
|
|
2635
|
+
'Use structured browser evidence for the terminal route; do not parse '
|
|
2636
|
+
'/openclaw-riddle-proof from package text as the expected path.'
|
|
2637
|
+
),
|
|
2638
|
+
'recon_results': {
|
|
2639
|
+
'baselines': {'before': {'path': '/proof/', 'url': 'https://cdn.example.com/before-proof.png'}},
|
|
2640
|
+
},
|
|
2641
|
+
})
|
|
2642
|
+
write_state(state_path, state)
|
|
2643
|
+
os.environ['RIDDLE_PROOF_STATE_FILE'] = str(state_path)
|
|
2644
|
+
|
|
2645
|
+
fake = FakeRiddle()
|
|
2646
|
+
load_util_with_fake(fake)
|
|
2647
|
+
load_module('verify_interaction_prose_route_noise', VERIFY_PATH)
|
|
2648
|
+
after_verify = json.loads(state_path.read_text())
|
|
2649
|
+
|
|
2650
|
+
assert after_verify['verify_status'] == 'evidence_captured'
|
|
2651
|
+
assert after_verify['route_expectation']['source'] == 'proof_evidence_contract'
|
|
2652
|
+
assert after_verify['route_expectation']['expected_path'] == '/'
|
|
2653
|
+
route = after_verify['proof_assessment_request']['semantic_context']['route']
|
|
2654
|
+
assert route['expected_after_path'] == '/'
|
|
2655
|
+
assert route['after_observed_path'] == '/'
|
|
2656
|
+
encoded = json.dumps(after_verify, sort_keys=True)
|
|
2657
|
+
assert '"expected_path": "/Your"' not in encoded
|
|
2658
|
+
assert '"expected_path": "/openclaw-riddle-proof"' not in encoded
|
|
2659
|
+
return {
|
|
2660
|
+
'ok': True,
|
|
2661
|
+
'expected_path': after_verify['route_expectation']['expected_path'],
|
|
2662
|
+
'source': after_verify['route_expectation']['source'],
|
|
2663
|
+
}
|
|
2664
|
+
finally:
|
|
2665
|
+
shutil.rmtree(tempdir, ignore_errors=True)
|
|
2666
|
+
|
|
2667
|
+
|
|
2615
2668
|
def run_verify_interaction_hash_terminal_route_from_proof_evidence():
|
|
2616
2669
|
tempdir = Path(tempfile.mkdtemp(prefix='riddle-proof-interaction-hash-'))
|
|
2617
2670
|
state_path = tempdir / 'state.json'
|
|
@@ -3210,6 +3263,7 @@ if __name__ == '__main__':
|
|
|
3210
3263
|
'remote_audit_verify_uses_default_capture_script': run_remote_audit_verify_uses_default_capture_script(),
|
|
3211
3264
|
'verify_interaction_terminal_route_from_proof_evidence': run_verify_interaction_terminal_route_from_proof_evidence(),
|
|
3212
3265
|
'verify_interaction_reverse_terminal_route_from_proof_evidence': run_verify_interaction_reverse_terminal_route_from_proof_evidence(),
|
|
3266
|
+
'verify_interaction_prose_route_noise_uses_proof_evidence': run_verify_interaction_prose_route_noise_uses_proof_evidence(),
|
|
3213
3267
|
'verify_interaction_hash_terminal_route_from_proof_evidence': run_verify_interaction_hash_terminal_route_from_proof_evidence(),
|
|
3214
3268
|
'verify_interaction_authored_query_hash_mismatch_blocks_with_evidence': run_verify_interaction_authored_query_hash_mismatch_blocks_with_evidence(),
|
|
3215
3269
|
'verify_interaction_query_hash_pass_uses_proof_evidence_route': run_verify_interaction_query_hash_pass_uses_proof_evidence_route(),
|
|
@@ -31,6 +31,12 @@ CASES = [
|
|
|
31
31
|
'function': 'run_verify_interaction_reverse_terminal_route_from_proof_evidence',
|
|
32
32
|
'expected_terminal': 'pass',
|
|
33
33
|
},
|
|
34
|
+
{
|
|
35
|
+
'name': 'route-prose-noise-ignored',
|
|
36
|
+
'covers': ['route-changing interactions', 'proof-evidence-present'],
|
|
37
|
+
'function': 'run_verify_interaction_prose_route_noise_uses_proof_evidence',
|
|
38
|
+
'expected_terminal': 'pass',
|
|
39
|
+
},
|
|
34
40
|
{
|
|
35
41
|
'name': 'query-hash-trailing-slash-pass',
|
|
36
42
|
'covers': ['query/hash/trailing-slash URLs', 'proof-evidence-present'],
|