Skip to content

fix(terminal): admit unresolved proof receipts by command role - #1645

Merged
EffortlessSteven merged 4 commits into
mainfrom
fix/1420-admit-skipped-unresolved-terminal
Nov 5, 2026
Merged

EffortlessSteven merged 4 commits into
mainfrom
fix/1420-admit-skipped-unresolved-terminal

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Defect

#1420 (sweep-verified): src/work_queue/terminal.rs:500-515 (terminal_proof_receipt_status) whitelists terminal results and rejects skipped_unresolved as unsupported, while src/main.rs:474-476 legitimately emits it whenever a worker proof lease is refused (completed nightly preflight + skipped HEAD). Gate (src/gate.rs), planner (src/proof/planner.rs:720), broker and decision core (src/decision_core.rs:88) all accept the result, so a routine lease-denied run aborts terminal receipt publication. The issue's independent review of the companion branch reproduced two valid producer shapes rejected here: completed nightly-preflight plus skipped HEAD, and passed HEAD plus skipped base-plus-tests.

Fix

Admit skipped_unresolved in the terminal projection only for the two command-role compositions that legitimately produce it (src/work_queue/terminal.rs):

  • worker lease refusal: [nightly-preflight (passed|failed), head (skipped)] in canonical order;
  • red/green partial: [head (passed), base-plus-tests (skipped)] in canonical order.

The unresolved-side command must carry exact skipped execution metadata (status skipped, no exit code, no timeout flag, zero timeout_sec/duration_ms — matching skipped_proof_command_receipt_for_id); the completed side must be a genuinely completed command (passed/failed, not timed out; the red/green HEAD must be passed so a real head failure or timeout is never masked as unresolved). Every other composition, and any genuinely unknown result string, is still rejected fail-closed. Result, reason, request and receipt identities are retained unchanged.

Validation (run in the fix worktree)

  • cargo fmt --all --check — clean.
  • cargo clippy --locked --workspace --all-targets — exit 0; only pre-existing warnings in files untouched by this diff (src/proof/red_green.rs:385 unused import — explicitly tolerated; tests/pr_context_hydration.rs:40 unused mut; tests/common/executable_fixture.rs:26 never-used method).
  • cargo test --locked --bin ub-review terminal — 64 passed, 0 failed (includes the two new regression tests).
  • cargo test --locked --bin ub-review skipped_unresolved — 4 passed, 0 failed (new terminal tests plus existing decision_core/gate consumer tests).
  • cargo test --locked --bin ub-review worker_proof — 13 passed, 0 failed (worker producer compatibility, including unresolved_worker_request_never_spawns_the_proof_command).
  • Discriminating check (negative mutant): with the guard reverted to origin/main, skipped_unresolved_receipts_publish_for_supported_command_roles fails with the exact defect message proof receipt proof-receipt-worker has unsupported terminal result skipped_unresolved; with the fix it passes.

Known gaps

Fixes #1420

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 49 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 152 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: b2f04ff8-8589-434d-b01d-865b7844834f
Commits

Reviewing files that changed from the base of the PR and between e65132a and 952092a.

Files selected for processing: 3

  • .ripr/suppressions.toml
  • src/work_queue/terminal.rs
  • src/work_queue/terminal_status_tests.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@EffortlessSteven
EffortlessSteven force-pushed the fix/1420-admit-skipped-unresolved-terminal branch from 6083b7f to b7ac50e Compare November 5, 2026 00:02
@EffortlessSteven
EffortlessSteven force-pushed the fix/1420-admit-skipped-unresolved-terminal branch from 0bab6ac to dda2ed0 Compare November 5, 2026 00:33
@EffortlessSteven
EffortlessSteven merged commit b899c18 into main Nov 5, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(terminal): admit unresolved proof receipts by command role

1 participant