Skip to content

Add located failure receipts for regen_verify, compile_clean, and drift gates - #7854

Merged
briansrls merged 7 commits into
mainfrom
session/wise-otter-576
Aug 6, 2026
Merged

briansrls merged 7 commits into
mainfrom
session/wise-otter-576

Conversation

@briansrls

@briansrls briansrls commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Floor gate failures (regen_verify_gate_passes, dag_compile_clean_gate_passes, generated_artifact_drift_gate_passes) previously surfaced only returned Bool(false) in CI — no file, path, or drift detail. This wires the existing _passes → _failure_receipt companion channel (same mechanism as extdeps_scope_placement_gate) for all three gates.

  • regen_verify: captures regen_stage0 stderr (including Changed generated file(s): …) via WitnessBin.Run; records detail once, failure receipt consumes without re-running regen.
  • compile_clean: extends the in-run compile receipt with the first hard diagnostic; consume_floor_compile_clean_gate_failure_detail projects it for the companion.
  • generated_artifact_drift: records the path from the single observe_generated_artifact_population pass; companion reads retained detail instead of re-observing.

Seed-growth trade: This adds three host builtins (consume_regen_verify_gate_failure_detail, consume_generated_artifact_drift_gate_failure_detail, consume_floor_compile_clean_gate_failure_detail) plus interpreter registrations — surface growth on the Rust seed, which §7 says should shrink toward zero. The alternative is for each companion to re-derive failure by re-running the gate observation, which forks authority (§3) and, for regen_verify, would execute regen a second time — turning a diagnostic into expensive duplicate work. Retention is the cheaper and correct half; it extends an established channel rather than minting one: consume_floor_compile_clean_gate_verdict already exists on main with multiple call sites in cli_run.rs.

Carried main defect (not receipts work): Compiler-level touched paths widened this PR's discovery affected set enough to reach src/v2/test/lens_mock_totality/ for the first time, surfacing a pre-existing #7834 wall site on main. One-line fix in witness_template.dag: total_consumer_handles(case) — positional only on the function-value parameter. Diagnostic: call shape mismatch calling function value 'total_consumer_handles': named argument 'case' is not supported — use positional arguments. Censused: the only genuine site under src/v2/test/lens_mock_totality/. A second carried defect: dag/gunbc/plans/branch_merge_admission_model.dag was import-stripped and resolved only by pool-membership coincidence; whole-tree compile-clean exposes cell not found — restored explicit imports (same fix as #7857).

Receipt in production (this branch): Before: detail=returned Bool(false). After: detail=returned Bool(false) | compile-clean: dag/gunbc/plans/branch_merge_admission_model.dag:15:27: error: function 'cell' not found in scope — the located diagnostic the PR exists to produce.

Test plan

  • cargo test -p v1-compiler floor_compile_clean_gate_refuses_on_failed_compile_receipt
  • cargo test -p v1-compiler regen_verify_gate_failure_detail_* (round-trip + missing-record refusal)
  • claim_batch --source-root dag --source-root src/v2 --entry dag/test/claim/floor_gate_failure_receipt_witness_test.dag — 7/7 PASS
  • cron_mock_totality_test.dag resolves after witness_template positional fix

Positive controls (receipt fires with located detail): regen_verify_failure_detail_names_drifted_file_holds, generated_artifact_drift_verdict_names_planted_path_holds, dag_compile_clean_failure_reason failure arm in dag_compile_clean_failure_reason_empty_only_on_success, floor_gate_failure_receipt_companion_names_holds.

Negative controls (success path stays quiet — empty reason, companion not the story): regen_verify_failure_reason_empty_only_on_success, generated_artifact_drift_failure_reason_empty_only_on_success, dag_compile_clean_failure_reason_empty_only_on_success (each asserts the reason projection is "" on ExitSuccess only).

@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review August 5, 2026 16:19
@gunbai-bot gunbai-bot Bot changed the title Floor gates are undiagnosable: add failure receipts to regen_verify / compile_clean / generated_artifact_drift (the mechanism exists 3 lines above them) Add located failure receipts for regen_verify, compile_clean, and drift gates Aug 5, 2026
@cursor

cursor Bot commented Aug 5, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

Brian Searls and others added 5 commits August 5, 2026 20:57
…ft gates.

Floor gate Bool witnesses now record verdict detail once and expose it through
the existing _passes → _failure_receipt companion channel so CI failures name
drifted paths instead of only returned Bool(false).

Co-authored-by: Cursor <cursoragent@cursor.com>
Record failure detail only on gate failure (not success), return
"gate body did not run" only when no record exists, and add unit
tests for the regen_verify detail round-trip.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot
gunbai-bot Bot force-pushed the session/wise-otter-576 branch from 0140785 to 331f87a Compare August 5, 2026 20:58
Brian Searls and others added 2 commits August 5, 2026 21:18
main_wet updates v1_interpreter_dispatch_generated.rs from the primitive
surface roster so the five new failure-receipt primitives compile, and
syncs ci.yml timeouts with the ci_spec overhead bump already on branch.

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls
briansrls merged commit 70b422f into main Aug 6, 2026
5 checks passed
@briansrls
briansrls deleted the session/wise-otter-576 branch August 6, 2026 00:30
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.

1 participant