@riddledc/riddle-proof 0.8.60 → 0.8.61
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 +46 -0
- package/dist/advanced/engine-harness.js +1 -1
- package/dist/advanced/index.cjs +46 -0
- package/dist/advanced/index.js +1 -1
- package/dist/{chunk-PCEDAQPG.js → chunk-HD46EEUV.js} +46 -0
- package/dist/{chunk-HZOILEGF.js → chunk-K6VYKOIM.js} +6 -1
- package/dist/{chunk-AWRBSVNW.js → chunk-NQ5HPAZD.js} +2 -2
- package/dist/cli/index.js +3 -3
- package/dist/cli.cjs +51 -1
- package/dist/cli.js +3 -3
- package/dist/engine-harness.cjs +46 -0
- package/dist/engine-harness.js +1 -1
- package/dist/index.cjs +51 -1
- package/dist/index.js +2 -2
- package/dist/pr-comment.cjs +8 -1
- package/dist/pr-comment.js +1 -1
- package/package.json +1 -1
|
@@ -5368,6 +5368,13 @@ function proofAssessmentHardBlockers(state, payload) {
|
|
|
5368
5368
|
}
|
|
5369
5369
|
return blockers;
|
|
5370
5370
|
}
|
|
5371
|
+
function proofGateStateForCheckpointResponse(state) {
|
|
5372
|
+
const fullState = readJson(state.request.engine_state_path) || {};
|
|
5373
|
+
return compactRecord({
|
|
5374
|
+
...fullState,
|
|
5375
|
+
verification_mode: nonEmptyString(fullState.verification_mode) || state.request.verification_mode
|
|
5376
|
+
});
|
|
5377
|
+
}
|
|
5371
5378
|
function proofAssessmentContinuation(result, payload) {
|
|
5372
5379
|
const proof_assessment_json = jsonParam(payload);
|
|
5373
5380
|
return { ...baseContinuation(result), proof_assessment_json };
|
|
@@ -5914,6 +5921,45 @@ function checkpointResponseContinuation(state, value) {
|
|
|
5914
5921
|
blocker: sourceBlocker
|
|
5915
5922
|
});
|
|
5916
5923
|
}
|
|
5924
|
+
const proofGateState = proofGateStateForCheckpointResponse(state);
|
|
5925
|
+
const hardBlockers = proofAssessmentHardBlockers(proofGateState, assessment);
|
|
5926
|
+
if (proofAssessmentRequestsShip(assessment) && hardBlockers.length) {
|
|
5927
|
+
return checkpointResponseRejectedBlocker(state, {
|
|
5928
|
+
packet,
|
|
5929
|
+
response,
|
|
5930
|
+
blocker: {
|
|
5931
|
+
code: "checkpoint_response_proof_hard_blocker",
|
|
5932
|
+
checkpoint: packet.checkpoint,
|
|
5933
|
+
message: "Riddle Proof cannot mark ready_to_ship while the proof bundle contains a hard blocker: " + hardBlockers[0],
|
|
5934
|
+
details: compactRecord({
|
|
5935
|
+
stage: packet.stage,
|
|
5936
|
+
hard_blockers: hardBlockers,
|
|
5937
|
+
proofAssessment: assessment,
|
|
5938
|
+
response
|
|
5939
|
+
})
|
|
5940
|
+
}
|
|
5941
|
+
});
|
|
5942
|
+
}
|
|
5943
|
+
const visualBlocker = proofAssessmentVisualBlocker(proofGateState, assessment);
|
|
5944
|
+
if (visualBlocker) {
|
|
5945
|
+
const recoveryAssessment = visualDeltaEvidenceRecoveryAssessment(proofGateState, assessment, visualBlocker);
|
|
5946
|
+
appendCheckpointResponse(state, response, { summary: visualBlocker });
|
|
5947
|
+
recordEvent(state, {
|
|
5948
|
+
kind: "checkpoint.response.evidence_recovery_required",
|
|
5949
|
+
checkpoint: packet.checkpoint,
|
|
5950
|
+
stage: "verify",
|
|
5951
|
+
summary: visualBlocker,
|
|
5952
|
+
details: compactRecord({
|
|
5953
|
+
evidence_collection_incomplete: true,
|
|
5954
|
+
recovery_stage: "verify",
|
|
5955
|
+
evidence_issue_code: recoveryAssessment.evidence_issue_code || null,
|
|
5956
|
+
visual_delta: recoveryAssessment.visual_delta || null,
|
|
5957
|
+
proof_assessment: recoveryAssessment,
|
|
5958
|
+
checkpoint_response_source: response.source || null
|
|
5959
|
+
})
|
|
5960
|
+
});
|
|
5961
|
+
return { next: { ...base, proof_assessment_json: jsonParam(recoveryAssessment) } };
|
|
5962
|
+
}
|
|
5917
5963
|
appendCheckpointResponse(state, response);
|
|
5918
5964
|
if (state.request.ship_mode !== "ship" && proofAssessmentRequestsShip(assessment)) {
|
|
5919
5965
|
const result = {
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
createDisabledRiddleProofAgentAdapter,
|
|
3
3
|
readRiddleProofRunStatus,
|
|
4
4
|
runRiddleProofEngineHarness
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-HD46EEUV.js";
|
|
6
6
|
import "../chunk-UEY5SJG5.js";
|
|
7
7
|
import "../chunk-NXEAFQYZ.js";
|
|
8
8
|
import "../chunk-EKZXU6MU.js";
|
package/dist/advanced/index.cjs
CHANGED
|
@@ -5907,6 +5907,13 @@ function proofAssessmentHardBlockers(state, payload) {
|
|
|
5907
5907
|
}
|
|
5908
5908
|
return blockers;
|
|
5909
5909
|
}
|
|
5910
|
+
function proofGateStateForCheckpointResponse(state) {
|
|
5911
|
+
const fullState = readJson(state.request.engine_state_path) || {};
|
|
5912
|
+
return compactRecord({
|
|
5913
|
+
...fullState,
|
|
5914
|
+
verification_mode: nonEmptyString(fullState.verification_mode) || state.request.verification_mode
|
|
5915
|
+
});
|
|
5916
|
+
}
|
|
5910
5917
|
function proofAssessmentContinuation(result, payload) {
|
|
5911
5918
|
const proof_assessment_json = jsonParam(payload);
|
|
5912
5919
|
return { ...baseContinuation(result), proof_assessment_json };
|
|
@@ -6453,6 +6460,45 @@ function checkpointResponseContinuation(state, value) {
|
|
|
6453
6460
|
blocker: sourceBlocker
|
|
6454
6461
|
});
|
|
6455
6462
|
}
|
|
6463
|
+
const proofGateState = proofGateStateForCheckpointResponse(state);
|
|
6464
|
+
const hardBlockers = proofAssessmentHardBlockers(proofGateState, assessment);
|
|
6465
|
+
if (proofAssessmentRequestsShip(assessment) && hardBlockers.length) {
|
|
6466
|
+
return checkpointResponseRejectedBlocker(state, {
|
|
6467
|
+
packet,
|
|
6468
|
+
response,
|
|
6469
|
+
blocker: {
|
|
6470
|
+
code: "checkpoint_response_proof_hard_blocker",
|
|
6471
|
+
checkpoint: packet.checkpoint,
|
|
6472
|
+
message: "Riddle Proof cannot mark ready_to_ship while the proof bundle contains a hard blocker: " + hardBlockers[0],
|
|
6473
|
+
details: compactRecord({
|
|
6474
|
+
stage: packet.stage,
|
|
6475
|
+
hard_blockers: hardBlockers,
|
|
6476
|
+
proofAssessment: assessment,
|
|
6477
|
+
response
|
|
6478
|
+
})
|
|
6479
|
+
}
|
|
6480
|
+
});
|
|
6481
|
+
}
|
|
6482
|
+
const visualBlocker = proofAssessmentVisualBlocker(proofGateState, assessment);
|
|
6483
|
+
if (visualBlocker) {
|
|
6484
|
+
const recoveryAssessment = visualDeltaEvidenceRecoveryAssessment(proofGateState, assessment, visualBlocker);
|
|
6485
|
+
appendCheckpointResponse(state, response, { summary: visualBlocker });
|
|
6486
|
+
recordEvent(state, {
|
|
6487
|
+
kind: "checkpoint.response.evidence_recovery_required",
|
|
6488
|
+
checkpoint: packet.checkpoint,
|
|
6489
|
+
stage: "verify",
|
|
6490
|
+
summary: visualBlocker,
|
|
6491
|
+
details: compactRecord({
|
|
6492
|
+
evidence_collection_incomplete: true,
|
|
6493
|
+
recovery_stage: "verify",
|
|
6494
|
+
evidence_issue_code: recoveryAssessment.evidence_issue_code || null,
|
|
6495
|
+
visual_delta: recoveryAssessment.visual_delta || null,
|
|
6496
|
+
proof_assessment: recoveryAssessment,
|
|
6497
|
+
checkpoint_response_source: response.source || null
|
|
6498
|
+
})
|
|
6499
|
+
});
|
|
6500
|
+
return { next: { ...base, proof_assessment_json: jsonParam(recoveryAssessment) } };
|
|
6501
|
+
}
|
|
6456
6502
|
appendCheckpointResponse(state, response);
|
|
6457
6503
|
if (state.request.ship_mode !== "ship" && proofAssessmentRequestsShip(assessment)) {
|
|
6458
6504
|
const result = {
|
package/dist/advanced/index.js
CHANGED
|
@@ -397,6 +397,13 @@ function proofAssessmentHardBlockers(state, payload) {
|
|
|
397
397
|
}
|
|
398
398
|
return blockers;
|
|
399
399
|
}
|
|
400
|
+
function proofGateStateForCheckpointResponse(state) {
|
|
401
|
+
const fullState = readJson(state.request.engine_state_path) || {};
|
|
402
|
+
return compactRecord({
|
|
403
|
+
...fullState,
|
|
404
|
+
verification_mode: nonEmptyString(fullState.verification_mode) || state.request.verification_mode
|
|
405
|
+
});
|
|
406
|
+
}
|
|
400
407
|
function proofAssessmentContinuation(result, payload) {
|
|
401
408
|
const proof_assessment_json = jsonParam(payload);
|
|
402
409
|
return { ...baseContinuation(result), proof_assessment_json };
|
|
@@ -943,6 +950,45 @@ function checkpointResponseContinuation(state, value) {
|
|
|
943
950
|
blocker: sourceBlocker
|
|
944
951
|
});
|
|
945
952
|
}
|
|
953
|
+
const proofGateState = proofGateStateForCheckpointResponse(state);
|
|
954
|
+
const hardBlockers = proofAssessmentHardBlockers(proofGateState, assessment);
|
|
955
|
+
if (proofAssessmentRequestsShip(assessment) && hardBlockers.length) {
|
|
956
|
+
return checkpointResponseRejectedBlocker(state, {
|
|
957
|
+
packet,
|
|
958
|
+
response,
|
|
959
|
+
blocker: {
|
|
960
|
+
code: "checkpoint_response_proof_hard_blocker",
|
|
961
|
+
checkpoint: packet.checkpoint,
|
|
962
|
+
message: "Riddle Proof cannot mark ready_to_ship while the proof bundle contains a hard blocker: " + hardBlockers[0],
|
|
963
|
+
details: compactRecord({
|
|
964
|
+
stage: packet.stage,
|
|
965
|
+
hard_blockers: hardBlockers,
|
|
966
|
+
proofAssessment: assessment,
|
|
967
|
+
response
|
|
968
|
+
})
|
|
969
|
+
}
|
|
970
|
+
});
|
|
971
|
+
}
|
|
972
|
+
const visualBlocker = proofAssessmentVisualBlocker(proofGateState, assessment);
|
|
973
|
+
if (visualBlocker) {
|
|
974
|
+
const recoveryAssessment = visualDeltaEvidenceRecoveryAssessment(proofGateState, assessment, visualBlocker);
|
|
975
|
+
appendCheckpointResponse(state, response, { summary: visualBlocker });
|
|
976
|
+
recordEvent(state, {
|
|
977
|
+
kind: "checkpoint.response.evidence_recovery_required",
|
|
978
|
+
checkpoint: packet.checkpoint,
|
|
979
|
+
stage: "verify",
|
|
980
|
+
summary: visualBlocker,
|
|
981
|
+
details: compactRecord({
|
|
982
|
+
evidence_collection_incomplete: true,
|
|
983
|
+
recovery_stage: "verify",
|
|
984
|
+
evidence_issue_code: recoveryAssessment.evidence_issue_code || null,
|
|
985
|
+
visual_delta: recoveryAssessment.visual_delta || null,
|
|
986
|
+
proof_assessment: recoveryAssessment,
|
|
987
|
+
checkpoint_response_source: response.source || null
|
|
988
|
+
})
|
|
989
|
+
});
|
|
990
|
+
return { next: { ...base, proof_assessment_json: jsonParam(recoveryAssessment) } };
|
|
991
|
+
}
|
|
946
992
|
appendCheckpointResponse(state, response);
|
|
947
993
|
if (state.request.ship_mode !== "ship" && proofAssessmentRequestsShip(assessment)) {
|
|
948
994
|
const result = {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
riddleProofPublicStateAllowsMergeRecommendation,
|
|
3
|
+
riddleProofPublicStateMergeRecommendation,
|
|
3
4
|
summarizeRiddleProofPublicState
|
|
4
5
|
} from "./chunk-WKIIJX3O.js";
|
|
5
6
|
|
|
@@ -153,6 +154,10 @@ function summarizeRiddleProofPrComment(input) {
|
|
|
153
154
|
status: firstStringValue(result.status, stopCondition.status),
|
|
154
155
|
checkpoint_summary: checkpointSummary || result.checkpoint_summary
|
|
155
156
|
});
|
|
157
|
+
const mergeRecommendation = riddleProofPublicStateMergeRecommendation(
|
|
158
|
+
publicState,
|
|
159
|
+
firstStringValue(result.merge_recommendation, stopCondition.merge_recommendation, resultRaw.merge_recommendation)
|
|
160
|
+
);
|
|
156
161
|
return {
|
|
157
162
|
ok,
|
|
158
163
|
status: stringValue(proofResult.status),
|
|
@@ -170,7 +175,7 @@ function summarizeRiddleProofPrComment(input) {
|
|
|
170
175
|
merge_ready: publicState.merge_ready,
|
|
171
176
|
sync_allowed: publicState.sync_allowed,
|
|
172
177
|
proof_decision: firstStringValue(result.proof_decision, stopCondition.proof_decision, resultRaw.proof_decision),
|
|
173
|
-
merge_recommendation:
|
|
178
|
+
merge_recommendation: mergeRecommendation,
|
|
174
179
|
checkpoint_summary: checkpointSummary,
|
|
175
180
|
public_state: publicState,
|
|
176
181
|
passed_checks: nestedChecks.passed,
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
RIDDLE_PROOF_PR_COMMENT_MARKER,
|
|
8
8
|
buildRiddleProofPrCommentMarkdown,
|
|
9
9
|
summarizeRiddleProofPrComment
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-K6VYKOIM.js";
|
|
11
11
|
import {
|
|
12
12
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|
|
13
13
|
applyRiddleProofProfileArtifactCompleteness,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
createDisabledRiddleProofAgentAdapter,
|
|
29
29
|
readRiddleProofRunStatus,
|
|
30
30
|
runRiddleProofEngineHarness
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-HD46EEUV.js";
|
|
32
32
|
import {
|
|
33
33
|
createCheckpointResponseTemplate
|
|
34
34
|
} from "./chunk-FX2CB4MG.js";
|
package/dist/cli/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-NQ5HPAZD.js";
|
|
2
2
|
import "../chunk-DI2XNGEZ.js";
|
|
3
|
-
import "../chunk-
|
|
3
|
+
import "../chunk-K6VYKOIM.js";
|
|
4
4
|
import "../chunk-EX7TO4I5.js";
|
|
5
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-HD46EEUV.js";
|
|
6
6
|
import "../chunk-UEY5SJG5.js";
|
|
7
7
|
import "../chunk-NXEAFQYZ.js";
|
|
8
8
|
import "../chunk-EKZXU6MU.js";
|
package/dist/cli.cjs
CHANGED
|
@@ -5454,6 +5454,13 @@ function proofAssessmentHardBlockers(state, payload) {
|
|
|
5454
5454
|
}
|
|
5455
5455
|
return blockers;
|
|
5456
5456
|
}
|
|
5457
|
+
function proofGateStateForCheckpointResponse(state) {
|
|
5458
|
+
const fullState = readJson(state.request.engine_state_path) || {};
|
|
5459
|
+
return compactRecord({
|
|
5460
|
+
...fullState,
|
|
5461
|
+
verification_mode: nonEmptyString(fullState.verification_mode) || state.request.verification_mode
|
|
5462
|
+
});
|
|
5463
|
+
}
|
|
5457
5464
|
function proofAssessmentContinuation(result, payload) {
|
|
5458
5465
|
const proof_assessment_json = jsonParam(payload);
|
|
5459
5466
|
return { ...baseContinuation(result), proof_assessment_json };
|
|
@@ -6000,6 +6007,45 @@ function checkpointResponseContinuation(state, value) {
|
|
|
6000
6007
|
blocker: sourceBlocker
|
|
6001
6008
|
});
|
|
6002
6009
|
}
|
|
6010
|
+
const proofGateState = proofGateStateForCheckpointResponse(state);
|
|
6011
|
+
const hardBlockers = proofAssessmentHardBlockers(proofGateState, assessment);
|
|
6012
|
+
if (proofAssessmentRequestsShip(assessment) && hardBlockers.length) {
|
|
6013
|
+
return checkpointResponseRejectedBlocker(state, {
|
|
6014
|
+
packet,
|
|
6015
|
+
response,
|
|
6016
|
+
blocker: {
|
|
6017
|
+
code: "checkpoint_response_proof_hard_blocker",
|
|
6018
|
+
checkpoint: packet.checkpoint,
|
|
6019
|
+
message: "Riddle Proof cannot mark ready_to_ship while the proof bundle contains a hard blocker: " + hardBlockers[0],
|
|
6020
|
+
details: compactRecord({
|
|
6021
|
+
stage: packet.stage,
|
|
6022
|
+
hard_blockers: hardBlockers,
|
|
6023
|
+
proofAssessment: assessment,
|
|
6024
|
+
response
|
|
6025
|
+
})
|
|
6026
|
+
}
|
|
6027
|
+
});
|
|
6028
|
+
}
|
|
6029
|
+
const visualBlocker = proofAssessmentVisualBlocker(proofGateState, assessment);
|
|
6030
|
+
if (visualBlocker) {
|
|
6031
|
+
const recoveryAssessment = visualDeltaEvidenceRecoveryAssessment(proofGateState, assessment, visualBlocker);
|
|
6032
|
+
appendCheckpointResponse(state, response, { summary: visualBlocker });
|
|
6033
|
+
recordEvent(state, {
|
|
6034
|
+
kind: "checkpoint.response.evidence_recovery_required",
|
|
6035
|
+
checkpoint: packet.checkpoint,
|
|
6036
|
+
stage: "verify",
|
|
6037
|
+
summary: visualBlocker,
|
|
6038
|
+
details: compactRecord({
|
|
6039
|
+
evidence_collection_incomplete: true,
|
|
6040
|
+
recovery_stage: "verify",
|
|
6041
|
+
evidence_issue_code: recoveryAssessment.evidence_issue_code || null,
|
|
6042
|
+
visual_delta: recoveryAssessment.visual_delta || null,
|
|
6043
|
+
proof_assessment: recoveryAssessment,
|
|
6044
|
+
checkpoint_response_source: response.source || null
|
|
6045
|
+
})
|
|
6046
|
+
});
|
|
6047
|
+
return { next: { ...base, proof_assessment_json: jsonParam(recoveryAssessment) } };
|
|
6048
|
+
}
|
|
6003
6049
|
appendCheckpointResponse(state, response);
|
|
6004
6050
|
if (state.request.ship_mode !== "ship" && proofAssessmentRequestsShip(assessment)) {
|
|
6005
6051
|
const result = {
|
|
@@ -18081,6 +18127,10 @@ function summarizeRiddleProofPrComment(input) {
|
|
|
18081
18127
|
status: firstStringValue2(result.status, stopCondition.status),
|
|
18082
18128
|
checkpoint_summary: checkpointSummary || result.checkpoint_summary
|
|
18083
18129
|
});
|
|
18130
|
+
const mergeRecommendation = riddleProofPublicStateMergeRecommendation(
|
|
18131
|
+
publicState,
|
|
18132
|
+
firstStringValue2(result.merge_recommendation, stopCondition.merge_recommendation, resultRaw.merge_recommendation)
|
|
18133
|
+
);
|
|
18084
18134
|
return {
|
|
18085
18135
|
ok,
|
|
18086
18136
|
status: stringValue4(proofResult.status),
|
|
@@ -18098,7 +18148,7 @@ function summarizeRiddleProofPrComment(input) {
|
|
|
18098
18148
|
merge_ready: publicState.merge_ready,
|
|
18099
18149
|
sync_allowed: publicState.sync_allowed,
|
|
18100
18150
|
proof_decision: firstStringValue2(result.proof_decision, stopCondition.proof_decision, resultRaw.proof_decision),
|
|
18101
|
-
merge_recommendation:
|
|
18151
|
+
merge_recommendation: mergeRecommendation,
|
|
18102
18152
|
checkpoint_summary: checkpointSummary,
|
|
18103
18153
|
public_state: publicState,
|
|
18104
18154
|
passed_checks: nestedChecks.passed,
|
package/dist/cli.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "./chunk-
|
|
2
|
+
import "./chunk-NQ5HPAZD.js";
|
|
3
3
|
import "./chunk-DI2XNGEZ.js";
|
|
4
|
-
import "./chunk-
|
|
4
|
+
import "./chunk-K6VYKOIM.js";
|
|
5
5
|
import "./chunk-EX7TO4I5.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-HD46EEUV.js";
|
|
7
7
|
import "./chunk-UEY5SJG5.js";
|
|
8
8
|
import "./chunk-NXEAFQYZ.js";
|
|
9
9
|
import "./chunk-EKZXU6MU.js";
|
package/dist/engine-harness.cjs
CHANGED
|
@@ -5366,6 +5366,13 @@ function proofAssessmentHardBlockers(state, payload) {
|
|
|
5366
5366
|
}
|
|
5367
5367
|
return blockers;
|
|
5368
5368
|
}
|
|
5369
|
+
function proofGateStateForCheckpointResponse(state) {
|
|
5370
|
+
const fullState = readJson(state.request.engine_state_path) || {};
|
|
5371
|
+
return compactRecord({
|
|
5372
|
+
...fullState,
|
|
5373
|
+
verification_mode: nonEmptyString(fullState.verification_mode) || state.request.verification_mode
|
|
5374
|
+
});
|
|
5375
|
+
}
|
|
5369
5376
|
function proofAssessmentContinuation(result, payload) {
|
|
5370
5377
|
const proof_assessment_json = jsonParam(payload);
|
|
5371
5378
|
return { ...baseContinuation(result), proof_assessment_json };
|
|
@@ -5912,6 +5919,45 @@ function checkpointResponseContinuation(state, value) {
|
|
|
5912
5919
|
blocker: sourceBlocker
|
|
5913
5920
|
});
|
|
5914
5921
|
}
|
|
5922
|
+
const proofGateState = proofGateStateForCheckpointResponse(state);
|
|
5923
|
+
const hardBlockers = proofAssessmentHardBlockers(proofGateState, assessment);
|
|
5924
|
+
if (proofAssessmentRequestsShip(assessment) && hardBlockers.length) {
|
|
5925
|
+
return checkpointResponseRejectedBlocker(state, {
|
|
5926
|
+
packet,
|
|
5927
|
+
response,
|
|
5928
|
+
blocker: {
|
|
5929
|
+
code: "checkpoint_response_proof_hard_blocker",
|
|
5930
|
+
checkpoint: packet.checkpoint,
|
|
5931
|
+
message: "Riddle Proof cannot mark ready_to_ship while the proof bundle contains a hard blocker: " + hardBlockers[0],
|
|
5932
|
+
details: compactRecord({
|
|
5933
|
+
stage: packet.stage,
|
|
5934
|
+
hard_blockers: hardBlockers,
|
|
5935
|
+
proofAssessment: assessment,
|
|
5936
|
+
response
|
|
5937
|
+
})
|
|
5938
|
+
}
|
|
5939
|
+
});
|
|
5940
|
+
}
|
|
5941
|
+
const visualBlocker = proofAssessmentVisualBlocker(proofGateState, assessment);
|
|
5942
|
+
if (visualBlocker) {
|
|
5943
|
+
const recoveryAssessment = visualDeltaEvidenceRecoveryAssessment(proofGateState, assessment, visualBlocker);
|
|
5944
|
+
appendCheckpointResponse(state, response, { summary: visualBlocker });
|
|
5945
|
+
recordEvent(state, {
|
|
5946
|
+
kind: "checkpoint.response.evidence_recovery_required",
|
|
5947
|
+
checkpoint: packet.checkpoint,
|
|
5948
|
+
stage: "verify",
|
|
5949
|
+
summary: visualBlocker,
|
|
5950
|
+
details: compactRecord({
|
|
5951
|
+
evidence_collection_incomplete: true,
|
|
5952
|
+
recovery_stage: "verify",
|
|
5953
|
+
evidence_issue_code: recoveryAssessment.evidence_issue_code || null,
|
|
5954
|
+
visual_delta: recoveryAssessment.visual_delta || null,
|
|
5955
|
+
proof_assessment: recoveryAssessment,
|
|
5956
|
+
checkpoint_response_source: response.source || null
|
|
5957
|
+
})
|
|
5958
|
+
});
|
|
5959
|
+
return { next: { ...base, proof_assessment_json: jsonParam(recoveryAssessment) } };
|
|
5960
|
+
}
|
|
5915
5961
|
appendCheckpointResponse(state, response);
|
|
5916
5962
|
if (state.request.ship_mode !== "ship" && proofAssessmentRequestsShip(assessment)) {
|
|
5917
5963
|
const result = {
|
package/dist/engine-harness.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -6131,6 +6131,13 @@ function proofAssessmentHardBlockers(state, payload) {
|
|
|
6131
6131
|
}
|
|
6132
6132
|
return blockers;
|
|
6133
6133
|
}
|
|
6134
|
+
function proofGateStateForCheckpointResponse(state) {
|
|
6135
|
+
const fullState = readJson(state.request.engine_state_path) || {};
|
|
6136
|
+
return compactRecord({
|
|
6137
|
+
...fullState,
|
|
6138
|
+
verification_mode: nonEmptyString(fullState.verification_mode) || state.request.verification_mode
|
|
6139
|
+
});
|
|
6140
|
+
}
|
|
6134
6141
|
function proofAssessmentContinuation(result, payload) {
|
|
6135
6142
|
const proof_assessment_json = jsonParam(payload);
|
|
6136
6143
|
return { ...baseContinuation(result), proof_assessment_json };
|
|
@@ -6677,6 +6684,45 @@ function checkpointResponseContinuation(state, value) {
|
|
|
6677
6684
|
blocker: sourceBlocker
|
|
6678
6685
|
});
|
|
6679
6686
|
}
|
|
6687
|
+
const proofGateState = proofGateStateForCheckpointResponse(state);
|
|
6688
|
+
const hardBlockers = proofAssessmentHardBlockers(proofGateState, assessment);
|
|
6689
|
+
if (proofAssessmentRequestsShip(assessment) && hardBlockers.length) {
|
|
6690
|
+
return checkpointResponseRejectedBlocker(state, {
|
|
6691
|
+
packet,
|
|
6692
|
+
response,
|
|
6693
|
+
blocker: {
|
|
6694
|
+
code: "checkpoint_response_proof_hard_blocker",
|
|
6695
|
+
checkpoint: packet.checkpoint,
|
|
6696
|
+
message: "Riddle Proof cannot mark ready_to_ship while the proof bundle contains a hard blocker: " + hardBlockers[0],
|
|
6697
|
+
details: compactRecord({
|
|
6698
|
+
stage: packet.stage,
|
|
6699
|
+
hard_blockers: hardBlockers,
|
|
6700
|
+
proofAssessment: assessment,
|
|
6701
|
+
response
|
|
6702
|
+
})
|
|
6703
|
+
}
|
|
6704
|
+
});
|
|
6705
|
+
}
|
|
6706
|
+
const visualBlocker = proofAssessmentVisualBlocker(proofGateState, assessment);
|
|
6707
|
+
if (visualBlocker) {
|
|
6708
|
+
const recoveryAssessment = visualDeltaEvidenceRecoveryAssessment(proofGateState, assessment, visualBlocker);
|
|
6709
|
+
appendCheckpointResponse(state, response, { summary: visualBlocker });
|
|
6710
|
+
recordEvent(state, {
|
|
6711
|
+
kind: "checkpoint.response.evidence_recovery_required",
|
|
6712
|
+
checkpoint: packet.checkpoint,
|
|
6713
|
+
stage: "verify",
|
|
6714
|
+
summary: visualBlocker,
|
|
6715
|
+
details: compactRecord({
|
|
6716
|
+
evidence_collection_incomplete: true,
|
|
6717
|
+
recovery_stage: "verify",
|
|
6718
|
+
evidence_issue_code: recoveryAssessment.evidence_issue_code || null,
|
|
6719
|
+
visual_delta: recoveryAssessment.visual_delta || null,
|
|
6720
|
+
proof_assessment: recoveryAssessment,
|
|
6721
|
+
checkpoint_response_source: response.source || null
|
|
6722
|
+
})
|
|
6723
|
+
});
|
|
6724
|
+
return { next: { ...base, proof_assessment_json: jsonParam(recoveryAssessment) } };
|
|
6725
|
+
}
|
|
6680
6726
|
appendCheckpointResponse(state, response);
|
|
6681
6727
|
if (state.request.ship_mode !== "ship" && proofAssessmentRequestsShip(assessment)) {
|
|
6682
6728
|
const result = {
|
|
@@ -20286,6 +20332,10 @@ function summarizeRiddleProofPrComment(input) {
|
|
|
20286
20332
|
status: firstStringValue2(result.status, stopCondition.status),
|
|
20287
20333
|
checkpoint_summary: checkpointSummary || result.checkpoint_summary
|
|
20288
20334
|
});
|
|
20335
|
+
const mergeRecommendation = riddleProofPublicStateMergeRecommendation(
|
|
20336
|
+
publicState,
|
|
20337
|
+
firstStringValue2(result.merge_recommendation, stopCondition.merge_recommendation, resultRaw.merge_recommendation)
|
|
20338
|
+
);
|
|
20289
20339
|
return {
|
|
20290
20340
|
ok,
|
|
20291
20341
|
status: stringValue7(proofResult.status),
|
|
@@ -20303,7 +20353,7 @@ function summarizeRiddleProofPrComment(input) {
|
|
|
20303
20353
|
merge_ready: publicState.merge_ready,
|
|
20304
20354
|
sync_allowed: publicState.sync_allowed,
|
|
20305
20355
|
proof_decision: firstStringValue2(result.proof_decision, stopCondition.proof_decision, resultRaw.proof_decision),
|
|
20306
|
-
merge_recommendation:
|
|
20356
|
+
merge_recommendation: mergeRecommendation,
|
|
20307
20357
|
checkpoint_summary: checkpointSummary,
|
|
20308
20358
|
public_state: publicState,
|
|
20309
20359
|
passed_checks: nestedChecks.passed,
|
package/dist/index.js
CHANGED
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
RIDDLE_PROOF_PR_COMMENT_MARKER,
|
|
60
60
|
buildRiddleProofPrCommentMarkdown,
|
|
61
61
|
summarizeRiddleProofPrComment
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-K6VYKOIM.js";
|
|
63
63
|
import {
|
|
64
64
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
65
65
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|
|
@@ -102,7 +102,7 @@ import {
|
|
|
102
102
|
createDisabledRiddleProofAgentAdapter,
|
|
103
103
|
readRiddleProofRunStatus,
|
|
104
104
|
runRiddleProofEngineHarness
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-HD46EEUV.js";
|
|
106
106
|
import {
|
|
107
107
|
RIDDLE_PROOF_RUN_STATE_VERSION,
|
|
108
108
|
appendRunEvent,
|
package/dist/pr-comment.cjs
CHANGED
|
@@ -33,6 +33,9 @@ function riddleProofPublicStateAllowsClaim(summary, claim) {
|
|
|
33
33
|
function riddleProofPublicStateAllowsMergeRecommendation(summary) {
|
|
34
34
|
return riddleProofPublicStateAllowsClaim(summary, "merge_ready") && riddleProofPublicStateAllowsClaim(summary, "sync_allowed");
|
|
35
35
|
}
|
|
36
|
+
function riddleProofPublicStateMergeRecommendation(summary, recommendation) {
|
|
37
|
+
return recommendation && riddleProofPublicStateAllowsMergeRecommendation(summary) ? recommendation : void 0;
|
|
38
|
+
}
|
|
36
39
|
function asRecord(value) {
|
|
37
40
|
return value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
38
41
|
}
|
|
@@ -334,6 +337,10 @@ function summarizeRiddleProofPrComment(input) {
|
|
|
334
337
|
status: firstStringValue2(result.status, stopCondition.status),
|
|
335
338
|
checkpoint_summary: checkpointSummary || result.checkpoint_summary
|
|
336
339
|
});
|
|
340
|
+
const mergeRecommendation = riddleProofPublicStateMergeRecommendation(
|
|
341
|
+
publicState,
|
|
342
|
+
firstStringValue2(result.merge_recommendation, stopCondition.merge_recommendation, resultRaw.merge_recommendation)
|
|
343
|
+
);
|
|
337
344
|
return {
|
|
338
345
|
ok,
|
|
339
346
|
status: stringValue2(proofResult.status),
|
|
@@ -351,7 +358,7 @@ function summarizeRiddleProofPrComment(input) {
|
|
|
351
358
|
merge_ready: publicState.merge_ready,
|
|
352
359
|
sync_allowed: publicState.sync_allowed,
|
|
353
360
|
proof_decision: firstStringValue2(result.proof_decision, stopCondition.proof_decision, resultRaw.proof_decision),
|
|
354
|
-
merge_recommendation:
|
|
361
|
+
merge_recommendation: mergeRecommendation,
|
|
355
362
|
checkpoint_summary: checkpointSummary,
|
|
356
363
|
public_state: publicState,
|
|
357
364
|
passed_checks: nestedChecks.passed,
|
package/dist/pr-comment.js
CHANGED