@riddledc/riddle-proof 0.7.224 → 0.7.225
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/checkpoint.cjs +22 -2
- package/dist/checkpoint.js +1 -1
- package/dist/{chunk-ABQQLRTS.js → chunk-2CFVREFI.js} +22 -2
- package/dist/{chunk-VJLHXZAA.js → chunk-4DRRIJDX.js} +4 -4
- package/dist/{chunk-WWYZBWKZ.js → chunk-GBVEQQIM.js} +7 -0
- package/dist/{chunk-UYB7ABWU.js → chunk-OHJQRDST.js} +1 -1
- package/dist/{chunk-MA6ZR5XY.js → chunk-TGHTM66Z.js} +2 -2
- package/dist/{chunk-ZHEFYLII.js → chunk-Y2KTBACQ.js} +1 -1
- package/dist/cli.cjs +29 -2
- package/dist/cli.js +5 -5
- package/dist/engine-harness.cjs +29 -2
- package/dist/engine-harness.js +5 -5
- package/dist/index.cjs +29 -2
- package/dist/index.js +6 -6
- package/dist/openclaw.js +3 -3
- package/dist/proof-run-core.cjs +7 -0
- package/dist/proof-run-core.js +1 -1
- package/dist/proof-run-engine.cjs +7 -0
- package/dist/proof-run-engine.js +1 -1
- package/dist/run-card.js +2 -2
- package/dist/runner.js +5 -5
- package/dist/state.js +3 -3
- package/package.json +1 -1
- package/runtime/pipelines/riddle-proof-setup.lobster +1 -1
package/dist/checkpoint.cjs
CHANGED
|
@@ -463,6 +463,24 @@ function visualDeltaFromState(fullState) {
|
|
|
463
463
|
const proofAssessmentRequest = recordValue(fullState.proof_assessment_request);
|
|
464
464
|
return recordValue(proofAssessmentRequest?.visual_delta) || null;
|
|
465
465
|
}
|
|
466
|
+
function normalizedText(value) {
|
|
467
|
+
return typeof value === "string" ? value.trim().toLowerCase() : "";
|
|
468
|
+
}
|
|
469
|
+
function noImplementationModeForCheckpoint(request, fullState) {
|
|
470
|
+
const requestRecord = recordValue(request) || {};
|
|
471
|
+
const mode = normalizedText(
|
|
472
|
+
requestRecord.mode || requestRecord.workflow_mode || fullState.mode || fullState.workflow_mode
|
|
473
|
+
);
|
|
474
|
+
const implementationMode = normalizedText(requestRecord.implementation_mode || fullState.implementation_mode);
|
|
475
|
+
const requireDiff = requestRecord.require_diff ?? fullState.require_diff;
|
|
476
|
+
const allowCodeChanges = requestRecord.allow_code_changes ?? fullState.allow_code_changes;
|
|
477
|
+
return mode === "audit" || mode === "profile" || implementationMode === "none" || requireDiff === false || allowCodeChanges === false;
|
|
478
|
+
}
|
|
479
|
+
function visualDeltaNotApplicableForNoImplementation(visualDelta) {
|
|
480
|
+
if (String(visualDelta?.status || "").trim() !== "not_applicable") return false;
|
|
481
|
+
const reason = String(visualDelta?.reason || "").toLowerCase();
|
|
482
|
+
return reason.includes("audit/no-diff") || reason.includes("does not require a before/after implementation delta");
|
|
483
|
+
}
|
|
466
484
|
function verificationModeRequiresVisualDelta(value) {
|
|
467
485
|
const mode = String(value || "proof").trim().toLowerCase();
|
|
468
486
|
return [
|
|
@@ -500,7 +518,9 @@ function buildProofAssessmentCheckpointPacket(input) {
|
|
|
500
518
|
const requiredSignals = recordValue(recordValue(artifactContract)?.required);
|
|
501
519
|
const visualDelta = visualDeltaFromState(fullState);
|
|
502
520
|
const verificationMode = nonEmptyString(bundle?.verification_mode) || nonEmptyString(fullState.verification_mode) || nonEmptyString(input.request.verification_mode) || "proof";
|
|
503
|
-
const
|
|
521
|
+
const noImplementationMode = noImplementationModeForCheckpoint(input.request, fullState);
|
|
522
|
+
const noImplementationVisualDelta = visualDeltaNotApplicableForNoImplementation(visualDelta);
|
|
523
|
+
const visualDeltaRequired = !noImplementationMode && !noImplementationVisualDelta && requiredSignals?.visual_delta !== false && (requiredSignals?.visual_delta === true || verificationModeRequiresVisualDelta(verificationMode));
|
|
504
524
|
const evidenceIssueCode = visualDeltaIssueCode(visualDelta, visualDeltaRequired);
|
|
505
525
|
const summary = nonEmptyString(input.engineResult.summary) || nonEmptyString(fullState.verify_summary) || "Verify captured evidence and needs a supervising proof assessment.";
|
|
506
526
|
const recoveryHint = evidenceIssueCode ? "Required visual_delta evidence is incomplete. Keep this same run in verify/evidence recovery with decision=revise_capture and continue_with_stage=verify unless the evidence proves an implementation or recon problem." : "Assess whether the current artifacts prove the requested change, then choose the next stage.";
|
|
@@ -533,7 +553,7 @@ function buildProofAssessmentCheckpointPacket(input) {
|
|
|
533
553
|
prod_cdn: fullState.prod_cdn || null,
|
|
534
554
|
after_cdn: fullState.after_cdn || null,
|
|
535
555
|
visual_delta_required: visualDeltaRequired,
|
|
536
|
-
visual_delta_ready: visualDelta?.status === "measured" && visualDelta?.passed === true,
|
|
556
|
+
visual_delta_ready: !visualDeltaRequired || visualDelta?.status === "measured" && visualDelta?.passed === true,
|
|
537
557
|
visual_delta: jsonCloneRecord(visualDelta),
|
|
538
558
|
evidence_issue_code: evidenceIssueCode,
|
|
539
559
|
proof_assessment_request: jsonCloneRecord(proofAssessmentRequest),
|
package/dist/checkpoint.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
normalizeCheckpointResponse,
|
|
14
14
|
proofContractFromAuthorCheckpointResponse,
|
|
15
15
|
statePathsForRunState
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-2CFVREFI.js";
|
|
17
17
|
import "./chunk-VY4Y5U57.js";
|
|
18
18
|
export {
|
|
19
19
|
RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION,
|
|
@@ -409,6 +409,24 @@ function visualDeltaFromState(fullState) {
|
|
|
409
409
|
const proofAssessmentRequest = recordValue(fullState.proof_assessment_request);
|
|
410
410
|
return recordValue(proofAssessmentRequest?.visual_delta) || null;
|
|
411
411
|
}
|
|
412
|
+
function normalizedText(value) {
|
|
413
|
+
return typeof value === "string" ? value.trim().toLowerCase() : "";
|
|
414
|
+
}
|
|
415
|
+
function noImplementationModeForCheckpoint(request, fullState) {
|
|
416
|
+
const requestRecord = recordValue(request) || {};
|
|
417
|
+
const mode = normalizedText(
|
|
418
|
+
requestRecord.mode || requestRecord.workflow_mode || fullState.mode || fullState.workflow_mode
|
|
419
|
+
);
|
|
420
|
+
const implementationMode = normalizedText(requestRecord.implementation_mode || fullState.implementation_mode);
|
|
421
|
+
const requireDiff = requestRecord.require_diff ?? fullState.require_diff;
|
|
422
|
+
const allowCodeChanges = requestRecord.allow_code_changes ?? fullState.allow_code_changes;
|
|
423
|
+
return mode === "audit" || mode === "profile" || implementationMode === "none" || requireDiff === false || allowCodeChanges === false;
|
|
424
|
+
}
|
|
425
|
+
function visualDeltaNotApplicableForNoImplementation(visualDelta) {
|
|
426
|
+
if (String(visualDelta?.status || "").trim() !== "not_applicable") return false;
|
|
427
|
+
const reason = String(visualDelta?.reason || "").toLowerCase();
|
|
428
|
+
return reason.includes("audit/no-diff") || reason.includes("does not require a before/after implementation delta");
|
|
429
|
+
}
|
|
412
430
|
function verificationModeRequiresVisualDelta(value) {
|
|
413
431
|
const mode = String(value || "proof").trim().toLowerCase();
|
|
414
432
|
return [
|
|
@@ -446,7 +464,9 @@ function buildProofAssessmentCheckpointPacket(input) {
|
|
|
446
464
|
const requiredSignals = recordValue(recordValue(artifactContract)?.required);
|
|
447
465
|
const visualDelta = visualDeltaFromState(fullState);
|
|
448
466
|
const verificationMode = nonEmptyString(bundle?.verification_mode) || nonEmptyString(fullState.verification_mode) || nonEmptyString(input.request.verification_mode) || "proof";
|
|
449
|
-
const
|
|
467
|
+
const noImplementationMode = noImplementationModeForCheckpoint(input.request, fullState);
|
|
468
|
+
const noImplementationVisualDelta = visualDeltaNotApplicableForNoImplementation(visualDelta);
|
|
469
|
+
const visualDeltaRequired = !noImplementationMode && !noImplementationVisualDelta && requiredSignals?.visual_delta !== false && (requiredSignals?.visual_delta === true || verificationModeRequiresVisualDelta(verificationMode));
|
|
450
470
|
const evidenceIssueCode = visualDeltaIssueCode(visualDelta, visualDeltaRequired);
|
|
451
471
|
const summary = nonEmptyString(input.engineResult.summary) || nonEmptyString(fullState.verify_summary) || "Verify captured evidence and needs a supervising proof assessment.";
|
|
452
472
|
const recoveryHint = evidenceIssueCode ? "Required visual_delta evidence is incomplete. Keep this same run in verify/evidence recovery with decision=revise_capture and continue_with_stage=verify unless the evidence proves an implementation or recon problem." : "Assess whether the current artifacts prove the requested change, then choose the next stage.";
|
|
@@ -479,7 +499,7 @@ function buildProofAssessmentCheckpointPacket(input) {
|
|
|
479
499
|
prod_cdn: fullState.prod_cdn || null,
|
|
480
500
|
after_cdn: fullState.after_cdn || null,
|
|
481
501
|
visual_delta_required: visualDeltaRequired,
|
|
482
|
-
visual_delta_ready: visualDelta?.status === "measured" && visualDelta?.passed === true,
|
|
502
|
+
visual_delta_ready: !visualDeltaRequired || visualDelta?.status === "measured" && visualDelta?.passed === true,
|
|
483
503
|
visual_delta: jsonCloneRecord(visualDelta),
|
|
484
504
|
evidence_issue_code: evidenceIssueCode,
|
|
485
505
|
proof_assessment_request: jsonCloneRecord(proofAssessmentRequest),
|
|
@@ -5,16 +5,16 @@ import {
|
|
|
5
5
|
createRunStatusSnapshot,
|
|
6
6
|
normalizeRunParams,
|
|
7
7
|
setRunStatus
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-OHJQRDST.js";
|
|
9
9
|
import {
|
|
10
10
|
createRiddleProofRunCard
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-Y2KTBACQ.js";
|
|
12
12
|
import {
|
|
13
13
|
noImplementationModeFor,
|
|
14
14
|
visualDeltaForState,
|
|
15
15
|
visualDeltaRequiredForState,
|
|
16
16
|
visualDeltaShipGateReason
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-GBVEQQIM.js";
|
|
18
18
|
import {
|
|
19
19
|
authorPacketPayloadFromCheckpointResponse,
|
|
20
20
|
buildCheckpointPacketForEngineResult,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
normalizeCheckpointResponse,
|
|
25
25
|
proofContractFromAuthorCheckpointResponse,
|
|
26
26
|
statePathsForRunState
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-2CFVREFI.js";
|
|
28
28
|
import {
|
|
29
29
|
applyTerminalMetadata,
|
|
30
30
|
compactRecord,
|
|
@@ -377,6 +377,7 @@ function normalizedVerificationMode(state = {}) {
|
|
|
377
377
|
return String(state?.verification_mode || "proof").trim().toLowerCase() || "proof";
|
|
378
378
|
}
|
|
379
379
|
function visualDeltaRequiredForState(state = {}) {
|
|
380
|
+
if (noImplementationModeFor(state) || visualDeltaNotApplicableForNoImplementation(state)) return false;
|
|
380
381
|
const bundle = objectValue(state?.evidence_bundle);
|
|
381
382
|
const contract = objectValue(bundle.artifact_contract);
|
|
382
383
|
const required = objectValue(contract.required);
|
|
@@ -391,6 +392,12 @@ function visualDeltaForState(state = {}) {
|
|
|
391
392
|
const request = objectValue(state?.proof_assessment_request);
|
|
392
393
|
return objectValue(request.visual_delta);
|
|
393
394
|
}
|
|
395
|
+
function visualDeltaNotApplicableForNoImplementation(state = {}) {
|
|
396
|
+
const visualDelta = visualDeltaForState(state);
|
|
397
|
+
if (String(visualDelta.status || "").trim() !== "not_applicable") return false;
|
|
398
|
+
const reason = String(visualDelta.reason || "").toLowerCase();
|
|
399
|
+
return reason.includes("audit/no-diff") || reason.includes("does not require a before/after implementation delta");
|
|
400
|
+
}
|
|
394
401
|
function visualDeltaShipGateReason(state = {}) {
|
|
395
402
|
if (!visualDeltaRequiredForState(state)) return null;
|
|
396
403
|
const visualDelta = visualDeltaForState(state);
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
appendStageHeartbeat,
|
|
4
4
|
createRunState,
|
|
5
5
|
setRunStatus
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OHJQRDST.js";
|
|
7
7
|
import {
|
|
8
8
|
noImplementationModeFor
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GBVEQQIM.js";
|
|
10
10
|
import {
|
|
11
11
|
createRunResult
|
|
12
12
|
} from "./chunk-VY4Y5U57.js";
|
package/dist/cli.cjs
CHANGED
|
@@ -385,6 +385,7 @@ function normalizedVerificationMode(state = {}) {
|
|
|
385
385
|
return String(state?.verification_mode || "proof").trim().toLowerCase() || "proof";
|
|
386
386
|
}
|
|
387
387
|
function visualDeltaRequiredForState(state = {}) {
|
|
388
|
+
if (noImplementationModeFor(state) || visualDeltaNotApplicableForNoImplementation2(state)) return false;
|
|
388
389
|
const bundle = objectValue(state?.evidence_bundle);
|
|
389
390
|
const contract = objectValue(bundle.artifact_contract);
|
|
390
391
|
const required = objectValue(contract.required);
|
|
@@ -399,6 +400,12 @@ function visualDeltaForState(state = {}) {
|
|
|
399
400
|
const request = objectValue(state?.proof_assessment_request);
|
|
400
401
|
return objectValue(request.visual_delta);
|
|
401
402
|
}
|
|
403
|
+
function visualDeltaNotApplicableForNoImplementation2(state = {}) {
|
|
404
|
+
const visualDelta = visualDeltaForState(state);
|
|
405
|
+
if (String(visualDelta.status || "").trim() !== "not_applicable") return false;
|
|
406
|
+
const reason = String(visualDelta.reason || "").toLowerCase();
|
|
407
|
+
return reason.includes("audit/no-diff") || reason.includes("does not require a before/after implementation delta");
|
|
408
|
+
}
|
|
402
409
|
function visualDeltaShipGateReason(state = {}) {
|
|
403
410
|
if (!visualDeltaRequiredForState(state)) return null;
|
|
404
411
|
const visualDelta = visualDeltaForState(state);
|
|
@@ -3530,6 +3537,24 @@ function visualDeltaFromState(fullState) {
|
|
|
3530
3537
|
const proofAssessmentRequest = recordValue(fullState.proof_assessment_request);
|
|
3531
3538
|
return recordValue(proofAssessmentRequest?.visual_delta) || null;
|
|
3532
3539
|
}
|
|
3540
|
+
function normalizedText(value) {
|
|
3541
|
+
return typeof value === "string" ? value.trim().toLowerCase() : "";
|
|
3542
|
+
}
|
|
3543
|
+
function noImplementationModeForCheckpoint(request, fullState) {
|
|
3544
|
+
const requestRecord = recordValue(request) || {};
|
|
3545
|
+
const mode = normalizedText(
|
|
3546
|
+
requestRecord.mode || requestRecord.workflow_mode || fullState.mode || fullState.workflow_mode
|
|
3547
|
+
);
|
|
3548
|
+
const implementationMode = normalizedText(requestRecord.implementation_mode || fullState.implementation_mode);
|
|
3549
|
+
const requireDiff = requestRecord.require_diff ?? fullState.require_diff;
|
|
3550
|
+
const allowCodeChanges = requestRecord.allow_code_changes ?? fullState.allow_code_changes;
|
|
3551
|
+
return mode === "audit" || mode === "profile" || implementationMode === "none" || requireDiff === false || allowCodeChanges === false;
|
|
3552
|
+
}
|
|
3553
|
+
function visualDeltaNotApplicableForNoImplementation(visualDelta) {
|
|
3554
|
+
if (String(visualDelta?.status || "").trim() !== "not_applicable") return false;
|
|
3555
|
+
const reason = String(visualDelta?.reason || "").toLowerCase();
|
|
3556
|
+
return reason.includes("audit/no-diff") || reason.includes("does not require a before/after implementation delta");
|
|
3557
|
+
}
|
|
3533
3558
|
function verificationModeRequiresVisualDelta(value) {
|
|
3534
3559
|
const mode = String(value || "proof").trim().toLowerCase();
|
|
3535
3560
|
return [
|
|
@@ -3567,7 +3592,9 @@ function buildProofAssessmentCheckpointPacket(input) {
|
|
|
3567
3592
|
const requiredSignals = recordValue(recordValue(artifactContract)?.required);
|
|
3568
3593
|
const visualDelta = visualDeltaFromState(fullState);
|
|
3569
3594
|
const verificationMode = nonEmptyString(bundle?.verification_mode) || nonEmptyString(fullState.verification_mode) || nonEmptyString(input.request.verification_mode) || "proof";
|
|
3570
|
-
const
|
|
3595
|
+
const noImplementationMode = noImplementationModeForCheckpoint(input.request, fullState);
|
|
3596
|
+
const noImplementationVisualDelta = visualDeltaNotApplicableForNoImplementation(visualDelta);
|
|
3597
|
+
const visualDeltaRequired = !noImplementationMode && !noImplementationVisualDelta && requiredSignals?.visual_delta !== false && (requiredSignals?.visual_delta === true || verificationModeRequiresVisualDelta(verificationMode));
|
|
3571
3598
|
const evidenceIssueCode2 = visualDeltaIssueCode(visualDelta, visualDeltaRequired);
|
|
3572
3599
|
const summary = nonEmptyString(input.engineResult.summary) || nonEmptyString(fullState.verify_summary) || "Verify captured evidence and needs a supervising proof assessment.";
|
|
3573
3600
|
const recoveryHint = evidenceIssueCode2 ? "Required visual_delta evidence is incomplete. Keep this same run in verify/evidence recovery with decision=revise_capture and continue_with_stage=verify unless the evidence proves an implementation or recon problem." : "Assess whether the current artifacts prove the requested change, then choose the next stage.";
|
|
@@ -3600,7 +3627,7 @@ function buildProofAssessmentCheckpointPacket(input) {
|
|
|
3600
3627
|
prod_cdn: fullState.prod_cdn || null,
|
|
3601
3628
|
after_cdn: fullState.after_cdn || null,
|
|
3602
3629
|
visual_delta_required: visualDeltaRequired,
|
|
3603
|
-
visual_delta_ready: visualDelta?.status === "measured" && visualDelta?.passed === true,
|
|
3630
|
+
visual_delta_ready: !visualDeltaRequired || visualDelta?.status === "measured" && visualDelta?.passed === true,
|
|
3604
3631
|
visual_delta: jsonCloneRecord(visualDelta),
|
|
3605
3632
|
evidence_issue_code: evidenceIssueCode2,
|
|
3606
3633
|
proof_assessment_request: jsonCloneRecord(proofAssessmentRequest),
|
package/dist/cli.js
CHANGED
|
@@ -23,13 +23,13 @@ import {
|
|
|
23
23
|
createDisabledRiddleProofAgentAdapter,
|
|
24
24
|
readRiddleProofRunStatus,
|
|
25
25
|
runRiddleProofEngineHarness
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
26
|
+
} from "./chunk-4DRRIJDX.js";
|
|
27
|
+
import "./chunk-OHJQRDST.js";
|
|
28
|
+
import "./chunk-Y2KTBACQ.js";
|
|
29
|
+
import "./chunk-GBVEQQIM.js";
|
|
30
30
|
import {
|
|
31
31
|
createCheckpointResponseTemplate
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-2CFVREFI.js";
|
|
33
33
|
import "./chunk-JFQXAJH2.js";
|
|
34
34
|
import {
|
|
35
35
|
createCodexExecAgentAdapter,
|
package/dist/engine-harness.cjs
CHANGED
|
@@ -385,6 +385,7 @@ function normalizedVerificationMode(state = {}) {
|
|
|
385
385
|
return String(state?.verification_mode || "proof").trim().toLowerCase() || "proof";
|
|
386
386
|
}
|
|
387
387
|
function visualDeltaRequiredForState(state = {}) {
|
|
388
|
+
if (noImplementationModeFor(state) || visualDeltaNotApplicableForNoImplementation2(state)) return false;
|
|
388
389
|
const bundle = objectValue(state?.evidence_bundle);
|
|
389
390
|
const contract = objectValue(bundle.artifact_contract);
|
|
390
391
|
const required = objectValue(contract.required);
|
|
@@ -399,6 +400,12 @@ function visualDeltaForState(state = {}) {
|
|
|
399
400
|
const request = objectValue(state?.proof_assessment_request);
|
|
400
401
|
return objectValue(request.visual_delta);
|
|
401
402
|
}
|
|
403
|
+
function visualDeltaNotApplicableForNoImplementation2(state = {}) {
|
|
404
|
+
const visualDelta = visualDeltaForState(state);
|
|
405
|
+
if (String(visualDelta.status || "").trim() !== "not_applicable") return false;
|
|
406
|
+
const reason = String(visualDelta.reason || "").toLowerCase();
|
|
407
|
+
return reason.includes("audit/no-diff") || reason.includes("does not require a before/after implementation delta");
|
|
408
|
+
}
|
|
402
409
|
function visualDeltaShipGateReason(state = {}) {
|
|
403
410
|
if (!visualDeltaRequiredForState(state)) return null;
|
|
404
411
|
const visualDelta = visualDeltaForState(state);
|
|
@@ -3533,6 +3540,24 @@ function visualDeltaFromState(fullState) {
|
|
|
3533
3540
|
const proofAssessmentRequest = recordValue(fullState.proof_assessment_request);
|
|
3534
3541
|
return recordValue(proofAssessmentRequest?.visual_delta) || null;
|
|
3535
3542
|
}
|
|
3543
|
+
function normalizedText(value) {
|
|
3544
|
+
return typeof value === "string" ? value.trim().toLowerCase() : "";
|
|
3545
|
+
}
|
|
3546
|
+
function noImplementationModeForCheckpoint(request, fullState) {
|
|
3547
|
+
const requestRecord = recordValue(request) || {};
|
|
3548
|
+
const mode = normalizedText(
|
|
3549
|
+
requestRecord.mode || requestRecord.workflow_mode || fullState.mode || fullState.workflow_mode
|
|
3550
|
+
);
|
|
3551
|
+
const implementationMode = normalizedText(requestRecord.implementation_mode || fullState.implementation_mode);
|
|
3552
|
+
const requireDiff = requestRecord.require_diff ?? fullState.require_diff;
|
|
3553
|
+
const allowCodeChanges = requestRecord.allow_code_changes ?? fullState.allow_code_changes;
|
|
3554
|
+
return mode === "audit" || mode === "profile" || implementationMode === "none" || requireDiff === false || allowCodeChanges === false;
|
|
3555
|
+
}
|
|
3556
|
+
function visualDeltaNotApplicableForNoImplementation(visualDelta) {
|
|
3557
|
+
if (String(visualDelta?.status || "").trim() !== "not_applicable") return false;
|
|
3558
|
+
const reason = String(visualDelta?.reason || "").toLowerCase();
|
|
3559
|
+
return reason.includes("audit/no-diff") || reason.includes("does not require a before/after implementation delta");
|
|
3560
|
+
}
|
|
3536
3561
|
function verificationModeRequiresVisualDelta(value) {
|
|
3537
3562
|
const mode = String(value || "proof").trim().toLowerCase();
|
|
3538
3563
|
return [
|
|
@@ -3570,7 +3595,9 @@ function buildProofAssessmentCheckpointPacket(input) {
|
|
|
3570
3595
|
const requiredSignals = recordValue(recordValue(artifactContract)?.required);
|
|
3571
3596
|
const visualDelta = visualDeltaFromState(fullState);
|
|
3572
3597
|
const verificationMode = nonEmptyString(bundle?.verification_mode) || nonEmptyString(fullState.verification_mode) || nonEmptyString(input.request.verification_mode) || "proof";
|
|
3573
|
-
const
|
|
3598
|
+
const noImplementationMode = noImplementationModeForCheckpoint(input.request, fullState);
|
|
3599
|
+
const noImplementationVisualDelta = visualDeltaNotApplicableForNoImplementation(visualDelta);
|
|
3600
|
+
const visualDeltaRequired = !noImplementationMode && !noImplementationVisualDelta && requiredSignals?.visual_delta !== false && (requiredSignals?.visual_delta === true || verificationModeRequiresVisualDelta(verificationMode));
|
|
3574
3601
|
const evidenceIssueCode2 = visualDeltaIssueCode(visualDelta, visualDeltaRequired);
|
|
3575
3602
|
const summary = nonEmptyString(input.engineResult.summary) || nonEmptyString(fullState.verify_summary) || "Verify captured evidence and needs a supervising proof assessment.";
|
|
3576
3603
|
const recoveryHint = evidenceIssueCode2 ? "Required visual_delta evidence is incomplete. Keep this same run in verify/evidence recovery with decision=revise_capture and continue_with_stage=verify unless the evidence proves an implementation or recon problem." : "Assess whether the current artifacts prove the requested change, then choose the next stage.";
|
|
@@ -3603,7 +3630,7 @@ function buildProofAssessmentCheckpointPacket(input) {
|
|
|
3603
3630
|
prod_cdn: fullState.prod_cdn || null,
|
|
3604
3631
|
after_cdn: fullState.after_cdn || null,
|
|
3605
3632
|
visual_delta_required: visualDeltaRequired,
|
|
3606
|
-
visual_delta_ready: visualDelta?.status === "measured" && visualDelta?.passed === true,
|
|
3633
|
+
visual_delta_ready: !visualDeltaRequired || visualDelta?.status === "measured" && visualDelta?.passed === true,
|
|
3607
3634
|
visual_delta: jsonCloneRecord(visualDelta),
|
|
3608
3635
|
evidence_issue_code: evidenceIssueCode2,
|
|
3609
3636
|
proof_assessment_request: jsonCloneRecord(proofAssessmentRequest),
|
package/dist/engine-harness.js
CHANGED
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
createDisabledRiddleProofAgentAdapter,
|
|
3
3
|
readRiddleProofRunStatus,
|
|
4
4
|
runRiddleProofEngineHarness
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-4DRRIJDX.js";
|
|
6
|
+
import "./chunk-OHJQRDST.js";
|
|
7
|
+
import "./chunk-Y2KTBACQ.js";
|
|
8
|
+
import "./chunk-GBVEQQIM.js";
|
|
9
|
+
import "./chunk-2CFVREFI.js";
|
|
10
10
|
import "./chunk-VY4Y5U57.js";
|
|
11
11
|
export {
|
|
12
12
|
createDisabledRiddleProofAgentAdapter,
|
package/dist/index.cjs
CHANGED
|
@@ -385,6 +385,7 @@ function normalizedVerificationMode(state = {}) {
|
|
|
385
385
|
return String(state?.verification_mode || "proof").trim().toLowerCase() || "proof";
|
|
386
386
|
}
|
|
387
387
|
function visualDeltaRequiredForState(state = {}) {
|
|
388
|
+
if (noImplementationModeFor(state) || visualDeltaNotApplicableForNoImplementation2(state)) return false;
|
|
388
389
|
const bundle = objectValue(state?.evidence_bundle);
|
|
389
390
|
const contract = objectValue(bundle.artifact_contract);
|
|
390
391
|
const required = objectValue(contract.required);
|
|
@@ -399,6 +400,12 @@ function visualDeltaForState(state = {}) {
|
|
|
399
400
|
const request = objectValue(state?.proof_assessment_request);
|
|
400
401
|
return objectValue(request.visual_delta);
|
|
401
402
|
}
|
|
403
|
+
function visualDeltaNotApplicableForNoImplementation2(state = {}) {
|
|
404
|
+
const visualDelta = visualDeltaForState(state);
|
|
405
|
+
if (String(visualDelta.status || "").trim() !== "not_applicable") return false;
|
|
406
|
+
const reason = String(visualDelta.reason || "").toLowerCase();
|
|
407
|
+
return reason.includes("audit/no-diff") || reason.includes("does not require a before/after implementation delta");
|
|
408
|
+
}
|
|
402
409
|
function visualDeltaShipGateReason(state = {}) {
|
|
403
410
|
if (!visualDeltaRequiredForState(state)) return null;
|
|
404
411
|
const visualDelta = visualDeltaForState(state);
|
|
@@ -3647,6 +3654,24 @@ function visualDeltaFromState(fullState) {
|
|
|
3647
3654
|
const proofAssessmentRequest = recordValue(fullState.proof_assessment_request);
|
|
3648
3655
|
return recordValue(proofAssessmentRequest?.visual_delta) || null;
|
|
3649
3656
|
}
|
|
3657
|
+
function normalizedText(value) {
|
|
3658
|
+
return typeof value === "string" ? value.trim().toLowerCase() : "";
|
|
3659
|
+
}
|
|
3660
|
+
function noImplementationModeForCheckpoint(request, fullState) {
|
|
3661
|
+
const requestRecord = recordValue(request) || {};
|
|
3662
|
+
const mode = normalizedText(
|
|
3663
|
+
requestRecord.mode || requestRecord.workflow_mode || fullState.mode || fullState.workflow_mode
|
|
3664
|
+
);
|
|
3665
|
+
const implementationMode = normalizedText(requestRecord.implementation_mode || fullState.implementation_mode);
|
|
3666
|
+
const requireDiff = requestRecord.require_diff ?? fullState.require_diff;
|
|
3667
|
+
const allowCodeChanges = requestRecord.allow_code_changes ?? fullState.allow_code_changes;
|
|
3668
|
+
return mode === "audit" || mode === "profile" || implementationMode === "none" || requireDiff === false || allowCodeChanges === false;
|
|
3669
|
+
}
|
|
3670
|
+
function visualDeltaNotApplicableForNoImplementation(visualDelta) {
|
|
3671
|
+
if (String(visualDelta?.status || "").trim() !== "not_applicable") return false;
|
|
3672
|
+
const reason = String(visualDelta?.reason || "").toLowerCase();
|
|
3673
|
+
return reason.includes("audit/no-diff") || reason.includes("does not require a before/after implementation delta");
|
|
3674
|
+
}
|
|
3650
3675
|
function verificationModeRequiresVisualDelta(value) {
|
|
3651
3676
|
const mode = String(value || "proof").trim().toLowerCase();
|
|
3652
3677
|
return [
|
|
@@ -3684,7 +3709,9 @@ function buildProofAssessmentCheckpointPacket(input) {
|
|
|
3684
3709
|
const requiredSignals = recordValue(recordValue(artifactContract)?.required);
|
|
3685
3710
|
const visualDelta = visualDeltaFromState(fullState);
|
|
3686
3711
|
const verificationMode = nonEmptyString(bundle?.verification_mode) || nonEmptyString(fullState.verification_mode) || nonEmptyString(input.request.verification_mode) || "proof";
|
|
3687
|
-
const
|
|
3712
|
+
const noImplementationMode = noImplementationModeForCheckpoint(input.request, fullState);
|
|
3713
|
+
const noImplementationVisualDelta = visualDeltaNotApplicableForNoImplementation(visualDelta);
|
|
3714
|
+
const visualDeltaRequired = !noImplementationMode && !noImplementationVisualDelta && requiredSignals?.visual_delta !== false && (requiredSignals?.visual_delta === true || verificationModeRequiresVisualDelta(verificationMode));
|
|
3688
3715
|
const evidenceIssueCode2 = visualDeltaIssueCode(visualDelta, visualDeltaRequired);
|
|
3689
3716
|
const summary = nonEmptyString(input.engineResult.summary) || nonEmptyString(fullState.verify_summary) || "Verify captured evidence and needs a supervising proof assessment.";
|
|
3690
3717
|
const recoveryHint = evidenceIssueCode2 ? "Required visual_delta evidence is incomplete. Keep this same run in verify/evidence recovery with decision=revise_capture and continue_with_stage=verify unless the evidence proves an implementation or recon problem." : "Assess whether the current artifacts prove the requested change, then choose the next stage.";
|
|
@@ -3717,7 +3744,7 @@ function buildProofAssessmentCheckpointPacket(input) {
|
|
|
3717
3744
|
prod_cdn: fullState.prod_cdn || null,
|
|
3718
3745
|
after_cdn: fullState.after_cdn || null,
|
|
3719
3746
|
visual_delta_required: visualDeltaRequired,
|
|
3720
|
-
visual_delta_ready: visualDelta?.status === "measured" && visualDelta?.passed === true,
|
|
3747
|
+
visual_delta_ready: !visualDeltaRequired || visualDelta?.status === "measured" && visualDelta?.passed === true,
|
|
3721
3748
|
visual_delta: jsonCloneRecord(visualDelta),
|
|
3722
3749
|
evidence_issue_code: evidenceIssueCode2,
|
|
3723
3750
|
proof_assessment_request: jsonCloneRecord(proofAssessmentRequest),
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runRiddleProof
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TGHTM66Z.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-4DRRIJDX.js";
|
|
99
99
|
import {
|
|
100
100
|
RIDDLE_PROOF_RUN_STATE_VERSION,
|
|
101
101
|
appendRunEvent,
|
|
@@ -107,12 +107,12 @@ import {
|
|
|
107
107
|
normalizePrLifecycleState,
|
|
108
108
|
normalizeRunParams,
|
|
109
109
|
setRunStatus
|
|
110
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-OHJQRDST.js";
|
|
111
111
|
import {
|
|
112
112
|
RIDDLE_PROOF_RUN_CARD_VERSION,
|
|
113
113
|
createRiddleProofRunCard
|
|
114
|
-
} from "./chunk-
|
|
115
|
-
import "./chunk-
|
|
114
|
+
} from "./chunk-Y2KTBACQ.js";
|
|
115
|
+
import "./chunk-GBVEQQIM.js";
|
|
116
116
|
import {
|
|
117
117
|
RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION,
|
|
118
118
|
RIDDLE_PROOF_CHECKPOINT_RESPONSE_VERSION,
|
|
@@ -128,7 +128,7 @@ import {
|
|
|
128
128
|
normalizeCheckpointResponse,
|
|
129
129
|
proofContractFromAuthorCheckpointResponse,
|
|
130
130
|
statePathsForRunState
|
|
131
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-2CFVREFI.js";
|
|
132
132
|
import "./chunk-JFQXAJH2.js";
|
|
133
133
|
import {
|
|
134
134
|
createCodexExecAgentAdapter,
|
package/dist/openclaw.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeIntegrationContext,
|
|
3
3
|
normalizeRunParams
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-OHJQRDST.js";
|
|
5
|
+
import "./chunk-Y2KTBACQ.js";
|
|
6
|
+
import "./chunk-2CFVREFI.js";
|
|
7
7
|
import {
|
|
8
8
|
compactRecord
|
|
9
9
|
} from "./chunk-VY4Y5U57.js";
|
package/dist/proof-run-core.cjs
CHANGED
|
@@ -438,6 +438,7 @@ function normalizedVerificationMode(state = {}) {
|
|
|
438
438
|
return String(state?.verification_mode || "proof").trim().toLowerCase() || "proof";
|
|
439
439
|
}
|
|
440
440
|
function visualDeltaRequiredForState(state = {}) {
|
|
441
|
+
if (noImplementationModeFor(state) || visualDeltaNotApplicableForNoImplementation(state)) return false;
|
|
441
442
|
const bundle = objectValue(state?.evidence_bundle);
|
|
442
443
|
const contract = objectValue(bundle.artifact_contract);
|
|
443
444
|
const required = objectValue(contract.required);
|
|
@@ -452,6 +453,12 @@ function visualDeltaForState(state = {}) {
|
|
|
452
453
|
const request = objectValue(state?.proof_assessment_request);
|
|
453
454
|
return objectValue(request.visual_delta);
|
|
454
455
|
}
|
|
456
|
+
function visualDeltaNotApplicableForNoImplementation(state = {}) {
|
|
457
|
+
const visualDelta = visualDeltaForState(state);
|
|
458
|
+
if (String(visualDelta.status || "").trim() !== "not_applicable") return false;
|
|
459
|
+
const reason = String(visualDelta.reason || "").toLowerCase();
|
|
460
|
+
return reason.includes("audit/no-diff") || reason.includes("does not require a before/after implementation delta");
|
|
461
|
+
}
|
|
455
462
|
function visualDeltaShipGateReason(state = {}) {
|
|
456
463
|
if (!visualDeltaRequiredForState(state)) return null;
|
|
457
464
|
const visualDelta = visualDeltaForState(state);
|
package/dist/proof-run-core.js
CHANGED
|
@@ -418,6 +418,7 @@ function normalizedVerificationMode(state = {}) {
|
|
|
418
418
|
return String(state?.verification_mode || "proof").trim().toLowerCase() || "proof";
|
|
419
419
|
}
|
|
420
420
|
function visualDeltaRequiredForState(state = {}) {
|
|
421
|
+
if (noImplementationModeFor(state) || visualDeltaNotApplicableForNoImplementation(state)) return false;
|
|
421
422
|
const bundle = objectValue(state?.evidence_bundle);
|
|
422
423
|
const contract = objectValue(bundle.artifact_contract);
|
|
423
424
|
const required = objectValue(contract.required);
|
|
@@ -432,6 +433,12 @@ function visualDeltaForState(state = {}) {
|
|
|
432
433
|
const request = objectValue(state?.proof_assessment_request);
|
|
433
434
|
return objectValue(request.visual_delta);
|
|
434
435
|
}
|
|
436
|
+
function visualDeltaNotApplicableForNoImplementation(state = {}) {
|
|
437
|
+
const visualDelta = visualDeltaForState(state);
|
|
438
|
+
if (String(visualDelta.status || "").trim() !== "not_applicable") return false;
|
|
439
|
+
const reason = String(visualDelta.reason || "").toLowerCase();
|
|
440
|
+
return reason.includes("audit/no-diff") || reason.includes("does not require a before/after implementation delta");
|
|
441
|
+
}
|
|
435
442
|
function visualDeltaShipGateReason(state = {}) {
|
|
436
443
|
if (!visualDeltaRequiredForState(state)) return null;
|
|
437
444
|
const visualDelta = visualDeltaForState(state);
|
package/dist/proof-run-engine.js
CHANGED
package/dist/run-card.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RIDDLE_PROOF_RUN_CARD_VERSION,
|
|
3
3
|
createRiddleProofRunCard
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-Y2KTBACQ.js";
|
|
5
|
+
import "./chunk-2CFVREFI.js";
|
|
6
6
|
import "./chunk-VY4Y5U57.js";
|
|
7
7
|
export {
|
|
8
8
|
RIDDLE_PROOF_RUN_CARD_VERSION,
|
package/dist/runner.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runRiddleProof
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-TGHTM66Z.js";
|
|
4
|
+
import "./chunk-OHJQRDST.js";
|
|
5
|
+
import "./chunk-Y2KTBACQ.js";
|
|
6
|
+
import "./chunk-GBVEQQIM.js";
|
|
7
|
+
import "./chunk-2CFVREFI.js";
|
|
8
8
|
import "./chunk-VY4Y5U57.js";
|
|
9
9
|
export {
|
|
10
10
|
runRiddleProof
|
package/dist/state.js
CHANGED
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
normalizePrLifecycleState,
|
|
10
10
|
normalizeRunParams,
|
|
11
11
|
setRunStatus
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-OHJQRDST.js";
|
|
13
|
+
import "./chunk-Y2KTBACQ.js";
|
|
14
|
+
import "./chunk-2CFVREFI.js";
|
|
15
15
|
import "./chunk-VY4Y5U57.js";
|
|
16
16
|
export {
|
|
17
17
|
RIDDLE_PROOF_RUN_STATE_VERSION,
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@ args:
|
|
|
17
17
|
default: ""
|
|
18
18
|
capture_script:
|
|
19
19
|
default: ""
|
|
20
|
-
description: "Optional
|
|
20
|
+
description: "Optional Playwright JavaScript for proof capture. Add it before recon/verify once the proof target is clear; put natural-language instructions in change_request, context, success_criteria, or proof_plan."
|
|
21
21
|
success_criteria:
|
|
22
22
|
default: ""
|
|
23
23
|
description: "Plain-English definition of what counts as fixed"
|