Repository navigation
fix(proof): withhold deterministic proof credit after signal termination - #1646
Merged
Merged
Conversation
Contributor
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 25 minutes. View limit details
|
EffortlessSteven
force-pushed
the
fix/1542-signal-terminated-no-credit
branch
2 times, most recently
from
November 5, 2026 00:35
072da04 to
2db06b3
Compare
…hout an exit code
EffortlessSteven
force-pushed
the
fix/1542-signal-terminated-no-credit
branch
from
November 5, 2026 00:57
9df38f7 to
f18d073
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Defect (#1542)
A proof command killed by infrastructure (OOM / cgroup kill) completes as
status="failed",exit_code=null,timed_out=false. The receipt constructor's catch-all serialized that as an ordinary failure, and the focused producers promoted any failed command to deterministic aggregate credit: red/green base+tests ->discriminating(gate-passing for required proofs), HEAD-only / red-green HEAD / focused build ->head_failed. An infra kill therefore produced false deterministic proof evidence, exactly the signature confirmed in the issue.Fix
Keep a genuine exit-7 failure promoting exactly as before, and refuse credit when the failing command carries no exit code:
src/proof/red_green.rsHEAD-only arm, red/green HEAD arm, red/green base arm;src/proof/build.rsbuild arm):"failed" if <cmd>.exit_code.is_some()keeps the credit arm; a failed command with no exit code projects the new aggregate resultterminated_without_exit_code. The red/green producer also stops before launching base+tests when HEAD terminates this way.proof_receipt_is_missing_evidence(src/decision_core.rs) classifies the new result as missing evidence, so witness status staysneeds-witnessand required proofs stay non-blocking (Skipped) through the existing_arms; the terminal work-queue verifier admits the new result (src/work_queue/terminal.rs); review_text's missing-proof consumer renders it as terminated without an exit code with no established test verdict (src/review_text.rs); the gate Skipped-arm comment lists it (src/gate.rs)."failed"with reason, streams, and duration preserved under the existing schema, as the issue's selected bounded candidate requires (pinned bysignal_terminated_command_preserves_raw_failed_receipt_projection).Validation
From worktree F:/Temp/fix-1542, shared target dir (Windows; Unix-gated tests skipped here, covered by the Linux gate):
cargo fmt --all --check— clean.cargo clippy --locked --workspace --all-targets— no warnings from this diff. Three pre-existing platform-conditional warnings verified byte-identical on origin/main:tests/common/executable_fixture.rsfixture_status,tests/pr_context_hydration.rs:40children(push is behind#[cfg(target_os = "linux")]),src/proof/red_green.rs:385import.cargo test --locked --bin ub-review proof::— 199 passed, 0 failed (includes the 4 new tests).cargo test --locked --bin ub-review -- proof:: decision_core gate:: review_text terminal render witness— 374 passed, 1 failed:proof::broker::tests::accounting_matrix_releases_early_commands_before_required_build, a pre-existing Windows parallel-batch flake that fails identically on pristine origin/main under the same batch (verified in a detached baseline worktree) and passes in isolation on both."discriminating", killed head ->"head_failed", killed build ->"head_failed"); restored, all pass.Known gaps
STATUS_CONTROL_C_EXIT-class terminations carry aSome(exit_code), so this guard does not withhold them. The issue's bounded candidate guards on "an available exit code" while preserving the raw receipt schema; NTSTATUS-class detection would require the schema/vocabulary change fix(proof): withhold deterministic proof credit after signal termination #1542 explicitly excludes. Unix signal kills (exit_code: None) — the reported infra-kill class — are covered.live_self_terminating_base_command_yields_no_discriminating_credit(real/bin/shself-SIGTERM through the shared process adapter) and the other Unix-gated tests did not run on Windows; the Linux gate covers them.Fixes #1542