Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .ripr/suppressions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36221,3 +36221,26 @@ kind = "exposure_gap"
finding_id = "probe:src_post_run_utils.rs:call_deletion:f513ba49"
owner = "ub-review/core"
reason = "Line-keyed cross-module gap (ripr-swarm#1053): tested end-to-end; Classification: no_static_path. Deleting this call removes the Review evidence is incomplete push_str message; tests/cli_run.rs asserts that exact text, the embedded review/review.json diagnostic, the restore guidance, and the summary rerun hint through the compiled binary as a subprocess, so ripr has no static test path to the changed owner. Re-verify after any edit to src/post_run_utils.rs."
[[suppressions]]
kind = "exposure_gap"
finding_id = "probe:src_proof_planner.rs:return_value:81bb34fd"
owner = "ub-review/core"
reason = "Line-keyed cross-module gap (ripr-swarm#1053): tested end-to-end; Classification: weakly_exposed. The probe sits on the then-arm opening of the receipt_gap if/else in terminalize_proof_requests (planner.rs:677); its value flows into the deferred request reason, which terminalization_does_not_use_receipt_from_another_head pins with the exact stale-head assertion (planner.rs:1793-1800). Re-verify after any edit to proof/planner.rs."

[[suppressions]]
kind = "exposure_gap"
finding_id = "probe:src_proof_planner.rs:return_value:0a9a1247"
owner = "ub-review/core"
reason = "Line-keyed cross-module gap (ripr-swarm#1053): tested end-to-end; Classification: weakly_exposed. The probe is the then-arm format! value of receipt_gap in terminalize_proof_requests (planner.rs:678-680, the receipts-only-on-other-heads message); terminalization_does_not_use_receipt_from_another_head asserts that exact string in the deferred reason and its absence on the missing-proof path (planner.rs:1793-1800). Re-verify after any edit to proof/planner.rs."

[[suppressions]]
kind = "exposure_gap"
finding_id = "probe:src_proof_planner.rs:return_value:ba807faa"
owner = "ub-review/core"
reason = "Line-keyed cross-module gap (ripr-swarm#1053): tested end-to-end; Classification: weakly_exposed. The probe is the else-arm junction of receipt_gap in terminalize_proof_requests (planner.rs:681); the empty- and unrelated-receipt loop in terminalization_does_not_use_receipt_from_another_head drives both arms and asserts the deferred reason ends_with the missing-proof message without the other-heads text (planner.rs:1808-1825). Re-verify after any edit to proof/planner.rs."

[[suppressions]]
kind = "exposure_gap"
finding_id = "probe:src_proof_planner.rs:return_value:1ab5f07e"
owner = "ub-review/core"
reason = "Line-keyed cross-module gap (ripr-swarm#1053): tested end-to-end; Classification: weakly_exposed. The probe is the else-arm value of receipt_gap in terminalize_proof_requests (planner.rs:682-683, the no-proof-receipt-was-produced message); terminalization_does_not_use_receipt_from_another_head asserts that exact message for empty and unrelated receipts (planner.rs:1819-1824). Re-verify after any edit to proof/planner.rs."
10 changes: 10 additions & 0 deletions docs/specs/UB-REVIEW-SPEC-0003-intelligent-ci-gate.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,16 @@ so a workflow branches on tokens rather than prose. `action.yml` exposes
`not-proven-reasons` (JSON array) and `sensor-coverage` (JSON object) as step
outputs.

### Proof request deferral diagnostics

When terminalizing a requested proof, receipts must share the request ID and
match the supplied head label (case-insensitively). If only receipts for other
heads share that ID, the request remains `deferred` and its reason distinguishes
that mismatch from a missing receipt. Receipts for unrelated request IDs do not
change the missing-receipt diagnostic. A matching current-head receipt retains
its normal terminal disposition. This compatibility head-label check does not
establish immutable revision qualification or authorize reuse of old receipts.

### Retained planner-required proofs (#4271)

`required_proof` counts only policy-configured `[[proof.required]]` requests,
Expand Down
45 changes: 44 additions & 1 deletion src/proof/planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -672,8 +672,18 @@ pub(crate) fn terminalize_proof_requests(
let mut terminal = request.clone();
if matching.is_empty() {
terminal.status = "deferred".to_owned();
let receipt_gap = if receipts
.iter()
.any(|receipt| receipt.request_ids.contains(&request.id))
{
format!(
"receipts for this request exist only on other heads; no proof receipt matches head `{head}`"
)
} else {
"no proof receipt was produced".to_owned()
};
terminal.reason = format!(
"{} Terminal disposition: deferred; no proof receipt was produced.",
"{} Terminal disposition: deferred; {receipt_gap}.",
request.reason
);
return terminal;
Expand Down Expand Up @@ -1864,6 +1874,39 @@ index 1111111..2222222 100644
.collect::<Vec<_>>(),
vec![("deferred", true)]
);
assert!(stale_only[0].reason.contains(
"receipts for this request exist only on other heads; no proof receipt matches head `current-head`"
));
assert!(
!stale_only[0]
.reason
.contains("no proof receipt was produced")
);

// An unrelated request's receipt cannot explain this request's deferral,
// even when it came from the previous head with the same command.
let mut unrelated_receipt = receipt.clone();
unrelated_receipt.request_ids = vec!["request-unrelated".to_owned()];
let mut unrelated_current_receipt = unrelated_receipt.clone();
unrelated_current_receipt.head = "current-head".to_owned();
for receipts in [
Vec::new(),
vec![unrelated_receipt],
vec![unrelated_current_receipt],
] {
let missing = terminalize_proof_requests(
"current-head",
std::slice::from_ref(&request),
&receipts,
);
assert_eq!(missing[0].status, "deferred");
assert!(
missing[0]
.reason
.ends_with("no proof receipt was produced.")
);
assert!(!missing[0].reason.contains("other heads"));
}
let terminal =
terminalize_proof_requests("current-head", &[request], &[receipt, current_receipt]);
assert_eq!(terminal[0].status, "satisfied");
Expand Down
Loading