Skip to content

[anneal] Add TaintMonoid, Receipt v3, and --allow-sorry-in-proof - #3970

Open
joshlf wants to merge 1 commit into
joshlf-anneal-cl3b-claimauditfrom
joshlf-anneal-cl3b-taint-v3
Open

joshlf wants to merge 1 commit into
joshlf-anneal-cl3b-claimauditfrom
joshlf-anneal-cl3b-taint-v3

Conversation

@joshlf

@joshlf joshlf commented Nov 20, 2026

Copy link
Copy Markdown
Member

Human review surface

Implements CL 3b-3 of docs/elaborator-containment-design.md:

  • Bump verification receipt schema_version from 2 to 3.
  • Introduce a closed sorted VerificationTaint set (sorry_in_proof,
    unpinned_lean, unsandboxed_elaboration) governed by the Uniform
    Flag-Driven Taint Law across passing and all failure receipts.
  • Wire global --allow-sorry-in-proof into TargetAuditRequest and
    fail-closed validate_sorry_declarations (cross-checking both
    audit.sorryDeclarations and audit.axioms for sorryAx).
  • Surface elaboration_sandbox on FailureReceipt once sandbox selection
    completes and fail closed on missing or flag-contradicting sandboxes.
  • Gate --export-lean-lib full proof .olean export strictly behind all
    post-audit binding, provenance, sandbox, and taint checks.
  • Update CLI, integration, mvp_e2e, Starnix CI, and docs to Receipt v3.

Layer 19 of 19 in the migrated Anneal verification stack under anneal/.

Public Anneal source checkpoint.

Authored by an AI agent acting on joshlf's behalf.

Implements CL 3b-3 of docs/elaborator-containment-design.md:

- Bump verification receipt schema_version from 2 to 3.
- Introduce a closed sorted VerificationTaint set (sorry_in_proof,
  unpinned_lean, unsandboxed_elaboration) governed by the Uniform
  Flag-Driven Taint Law across passing and all failure receipts.
- Wire global --allow-sorry-in-proof into TargetAuditRequest and
  fail-closed validate_sorry_declarations (cross-checking both
  audit.sorryDeclarations and audit.axioms for sorryAx).
- Surface elaboration_sandbox on FailureReceipt once sandbox selection
  completes and fail closed on missing or flag-contradicting sandboxes.
- Gate --export-lean-lib full proof .olean export strictly behind all
  post-audit binding, provenance, sandbox, and taint checks.
- Update CLI, integration, mvp_e2e, Starnix CI, and docs to Receipt v3.

Source: https://github.com/joshlf/anneal/tree/bf7c496a225b19faa57f1bcd4482733f5507e72a
Agent-authored-by: AI agent acting on joshlf's behalf
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T15:40:48.280966Z 7341798 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7341798621

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Ok(audit) => audit,
Err(e) => {
if args.export_lean_lib && e.code == 1 {
let _ = checker.export_target_oleans_gated(&work.join("lean-lib"), false);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Propagate partial-export failures

When --export-lean-lib is requested and the audit rejects the proof with exit code 1, this discards any error from export_target_oleans_gated. An I/O failure or an unexpected symlink/non-regular artifact therefore still produces an ordinary proof_failed receipt and may retain evidence without the promised partial Lean library, masking a potentially hostile elaborator side effect. Preserve the previous behavior of reporting the export failure as tool_failed.

Useful? React with 👍 / 👎.

Comment thread anneal/docs/mvp.md
Comment on lines +429 to +430
`"none"`; omitted on pre-sandbox failure receipts), optional
`"sorry_declarations"` (present iff `--allow-sorry-in-proof` is active), and

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Limit the sorry-declarations guarantee to successful receipts

The documented “present iff” contract does not hold for failure receipts: FailureReceipt has no sorry_declarations field, so passing --allow-sorry-in-proof with a malformed request, staging failure, rejected specification, or later tool failure emits the taint atom but omits this key. Receipt consumers following this schema description can therefore reject valid failure receipts or assume missing metadata indicates the flag was inactive; either qualify this as a successful-receipt field or include it consistently where promised.

Useful? React with 👍 / 👎.

@joshlf
joshlf added this pull request to stack #3976 November 20, 2026 17:58

This branch has not been deployed

No deployments
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