)]}'
{
  "commit": "8c7111c9574bf07cdfa45257dea331941d0ff947",
  "tree": "3a07b6e593ffa7f3928aa7c9c4a7ed65506c19cc",
  "parents": [
    "b7c4bf00860f7ecdc58a31c5e9fe59acecb29513"
  ],
  "author": {
    "name": "Josh Liebow-Feeser",
    "email": "joshlf@users.noreply.github.com",
    "time": "Thu Dec 03 07:28:10 2026 +0000"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu Dec 03 07:28:10 2026 +0000"
  },
  "message": "[trusted] Skip elaboration kernel check on authored proofs (#333)\n\nWhen verifying a pinned target, Lean\u0027s kernel previously checked every\nauthored `Proof` declaration twice: once during elaboration (`lean -o`\nwith `-Ddebug.skipKernelTC\u003dfalse`) and again during `TrustedBoundary`\n`\"target-audit\"` replay (and independently in `con-ron`). On\n`rfl`-heavy proof units, skipping the redundant elaboration-time kernel\ncheck cuts elaboration time while producing byte-identical `.olean`s for\nproofs that do not branch on kernel-checking failures.\n\nScoped review-rule relaxation: relax the unconditional\n`-Ddebug.skipKernelTC\u003dfalse` rule strictly for authored (non-bundled,\nnon-generated) `TargetRole::Proof` target modules on pinned `cargo\nanneal verify` runs (via `run_target_with_progress_and_options(...,\ntrue, ...)`) when stage `[6/6]` audit will run and `--export-lean-lib`\nis not requested. Keep `-Ddebug.skipKernelTC\u003dfalse` for\n`Checker::run_target` / `run_target_with_progress` (preserving existing\n`export_target_oleans` compatibility), `--fast-check` (which skips\nstage `[6/6]` audit), `--export-lean-lib`, bundled `Anneal.*` theory,\nrunner-generated modules (such as `Proof.IdTree`), `Model`, `Capture`,\n`Specification`, `Expected`, unpinned runs, and all\nrepository/Pass-1/Pass-2 compilation. Update `AGENTS.md`,\n`.gemini/styleguide.md`, `skills/trust-review/SKILL.md`, and\n`docs/trust/elaborator-containment-design.md` to record this scoped\nrelaxation.\n\nEncode `skipKernelTC` into `OleanCache` module keys via\n`canonical_compile_flags_with_skip_kernel_tc` so cached shards never\nalias across modes, and latch `last_proof_skipped_kernel_tc` on\n`Checker` when a `skipKernelTC\u003dtrue` module enters compilation so\n`export_target_oleans` / `export_target_oleans_gated(_, true)` fails\nclosed if any authored `Proof` module was compiled with\n`-Ddebug.skipKernelTC\u003dtrue`.\n\nTo preserve verdict equivalence for persisted unreached authored\ndeclarations (which previously failed at elaboration time if ill-typed\nor if a non-`unsafe` declaration referenced an `unsafe` declaration or a\nsafe declaration referenced a `partial` declaration), `\"target-audit\"`\nnow:\n1. rejects any non-`unsafe` authored `Proof` declaration that directly\n   references an `unsafe` declaration, and any safe (`!isUnsafe \u0026\u0026\n   !isPartial`) authored `Proof` declaration that directly references a\n   `partial` declaration (checks Lean\u0027s elaborator defers to the\n   kernel); and\n2. replays every remaining replayable persisted constant declared in\n   non-bundled `Proof` modules (including `.opaqueInfo` such as `partial\n   def` and `.axiomInfo`) onto the post-replay kernel environment inside\n   a throwaway kernel environment, leaving `checkedEnv` and\n   `replayedDeclarations` unchanged.\n\nOnly non-persisted elaboration-only commands (such as `example ... :\u003d by\ndecide +kernel`, discarded before `.olean` serialization) and unreached\nnon-replayable authored roots (`unsafe`, `partial`, `quot`) or unreached\ndeclarations whose transitive closures depend on them (other than\nnon-`unsafe`-referencing-`unsafe` and safe-referencing-`partial`, which\nare rejected above) are skipped; neither can enter `Proof.verify`\u0027s\n`.olean` closure or affect verification soundness. `--export-lean-lib`\nand `Checker::run_target` keep `-Ddebug.skipKernelTC\u003dfalse` so\n`cargo-anneal` does not skip elaboration kernel checking on exported\nproof modules.\n\nWhen a run with `skipKernelTC\u003dtrue` fails either with a `\"target-audit\"`\ncode-2 kernel replay rejection or with a `compile-*` code-1 rejection\n(for example a failing `decide +kernel` proof deferred out of\n`compile-*`, such as a falsified mutation control in\n`verify_starnix_e2e.py`, or a backtracking tactic like `first | decide\n+kernel | \u003calt\u003e` or `try decide +kernel; simp` that fails during\n`compile-*` or commits to a failing branch when kernel checking is\ndeferred), `cargo anneal verify` re-runs once through the full\n`allow_skip_kernel_tc \u003d false` incumbent pipeline so genuine\nproof-author kernel errors surface with incumbent `compile-*`\n`proof_failed` (exit `1`) diagnostics and backtracking proofs produce\nthe same verdict as `-Ddebug.skipKernelTC\u003dfalse`.\n\nAdd unit tests for `should_skip_elaboration_kernel_tc` (including\nexcluding runner-generated `Proof.IdTree`), `OleanCache` key\nseparation, and `should_recheck_skip_kernel_tc_failure`, plus\ntarget-audit regression tests asserting exit code 2 for a forged\nunreached ill-typed theorem, real surface-syntax\n`-Ddebug.skipKernelTC\u003dtrue` elaboration of a safe theorem referencing\nan `unsafe` def, real surface-syntax `-Ddebug.skipKernelTC\u003dtrue`\nelaboration of a safe def referencing a `partial` well-founded\n`._unsafe_rec` auxiliary, `decide +kernel` replay-rejection -\u003e\n`allow_skip_kernel_tc \u003d false` `compile-Proof` exit-1 fallback, and\nunreached `partial def` (`.opaqueInfo`) + `decide +kernel` completeness\nrejection, plus `export_target_oleans` fail-closed /\ndefault-`run_target`-allowed checks and unchanged `replayedDeclarations`\n(verified directly on `TrustedBoundary.lean` via\n`InspectorRequest::TargetAudit` as well as end-to-end) on valid\nunreached helpers.\n\nAgent-authored-by: AI agent acting on Josh Liebow-Feeser\u0027s behalf",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "fb71c6b5a9418c4c2272f1b0e066b550ee236222",
      "old_mode": 33188,
      "old_path": ".gemini/styleguide.md",
      "new_id": "678ff67aee01d4f3b849c2402d6252e2c982c596",
      "new_mode": 33188,
      "new_path": ".gemini/styleguide.md"
    },
    {
      "type": "modify",
      "old_id": "26ba6269183fb0cdb21a8d29883684bd28cfefd3",
      "old_mode": 33188,
      "old_path": "AGENTS.md",
      "new_id": "cd3a725807e3630e701ca5e4b6d3b1ffc7d83a30",
      "new_mode": 33188,
      "new_path": "AGENTS.md"
    },
    {
      "type": "modify",
      "old_id": "f605e7f43511a9604b9a78279c468f459504c955",
      "old_mode": 33188,
      "old_path": "docs/trust/elaborator-containment-design.md",
      "new_id": "dfcdc7207487547a4718435eea4b6db5cabae6dd",
      "new_mode": 33188,
      "new_path": "docs/trust/elaborator-containment-design.md"
    },
    {
      "type": "modify",
      "old_id": "cfc4f87c0f1433ec2870791ffa56529f28059aec",
      "old_mode": 33188,
      "old_path": "skills/trust-review/SKILL.md",
      "new_id": "b56efe5f17a20abf5ba282d02a89e32a771bc493",
      "new_mode": 33188,
      "new_path": "skills/trust-review/SKILL.md"
    },
    {
      "type": "modify",
      "old_id": "a41da5219caae7758959ebe7b11696c54b23ff04",
      "old_mode": 33188,
      "old_path": "tests/audit/tests/target_audit/uninventoried_and_alternate_replay/sorry_alternates/ill_typed_alternates.rs",
      "new_id": "8fa611f0ef0874522b44794947bac450571f0855",
      "new_mode": 33188,
      "new_path": "tests/audit/tests/target_audit/uninventoried_and_alternate_replay/sorry_alternates/ill_typed_alternates.rs"
    },
    {
      "type": "modify",
      "old_id": "ba81e229c2343bf7043f610cbdfce84f0b736921",
      "old_mode": 33188,
      "old_path": "trusted/audit/TrustedBoundary.lean",
      "new_id": "2e864e863479313717b632f67e11f47c106e3e07",
      "new_mode": 33188,
      "new_path": "trusted/audit/TrustedBoundary.lean"
    },
    {
      "type": "modify",
      "old_id": "196ee4682f88cd0660c435214f23551568e7824b",
      "old_mode": 33188,
      "old_path": "trusted/cargo-anneal/src/olean_cache.rs",
      "new_id": "7e0b6383c1b21a4985c1b270dcad29b73ea23f78",
      "new_mode": 33188,
      "new_path": "trusted/cargo-anneal/src/olean_cache.rs"
    },
    {
      "type": "modify",
      "old_id": "76cfc694eb2dd684556111f03c170137af863547",
      "old_mode": 33188,
      "old_path": "trusted/cargo-anneal/src/stage.rs",
      "new_id": "c4d13129208fa02a286ba8cefacb895247f54b60",
      "new_mode": 33188,
      "new_path": "trusted/cargo-anneal/src/stage.rs"
    },
    {
      "type": "modify",
      "old_id": "6b0f0dbc12d0da1054a7e3dee8b811d5e4e0f465",
      "old_mode": 33188,
      "old_path": "trusted/cargo-anneal/src/target.rs",
      "new_id": "2222a29dfac0e3e6eb45917cd62473865c53f09c",
      "new_mode": 33188,
      "new_path": "trusted/cargo-anneal/src/target.rs"
    },
    {
      "type": "modify",
      "old_id": "201206eda6a068f02115681c6572864fc7102c01",
      "old_mode": 33188,
      "old_path": "trusted/cargo-anneal/src/verify.rs",
      "new_id": "4bbb1bfbbae483c5970de1c1453654d416152e92",
      "new_mode": 33188,
      "new_path": "trusted/cargo-anneal/src/verify.rs"
    }
  ]
}
