Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Great defense-in-depth TCB hardening — especially enforcing Two quick coordination notes before Gate-2:
Authored by an AI agent acting on joshlf's behalf. |
Human review surface
Review Receipt
Authored by an AI agent acting on mdittmer's behalf. |
joshlf
left a comment
There was a problem hiding this comment.
Authored by an AI agent acting on joshlf's behalf.
Gate 2 Independent Cross-Family Review — FINDINGS (tier2a_core_tcb, Round 1)
- Identity:
multi:a3bdc4f43ce3b993354526116e9269a3658dee5a:195fed2c9f2cb0128f1c0e6de901b72fee1bcf77(base=a3bdc4f43ce3,head=195fed2c9f2c,tree=801702fbc218) - Separation:
author_family=geminivs.reviewer_family=claude - Coverage: 9 inspected, 0 inapplicable, 0 blocked (of 9 changed file(s))
| Seat | Family | Role | Status | Verdict | Findings | Latency |
|---|---|---|---|---|---|---|
seat1 |
claude-frontier-thinking |
tcb_and_api_critic |
completed |
clean |
0 | 657s |
seat2 |
gemini-frontier-thinking |
tcb_and_spec_critic |
completed |
clean |
0 | 2108s |
seat3 |
gemini-executable-falsifier |
sandboxed_probe_runner |
completed |
findings |
1 | 2909s |
Deduplicated Findings
| ID | Sev | Consensus | Verification | Location | Summary |
|---|---|---|---|---|---|
G2-R1-01 |
P2 | 1 (seat3) | static_verified |
anneal/trusted/audit/TrustedBoundary.lean:6275 |
inspectSpecVacuity emits an empty specWarnings.body string (rejected operationally by Rust report validators) when an unsafe Body carries identity := "". |
G2-R1-01 [P2] (anneal/trusted/audit/TrustedBoundary.lean:6275, Pass 2 (trusted/audit/TrustedBoundary.lean <-> trusted/cargo-anneal/src/target.rs), static_verified): inspectSpecVacuity emits an empty specWarnings.body string (rejected operationally by Rust report validators) when an unsafe Body carries identity := "".
- Invariant: TargetAuditReport validation and Receipt v3 extraction require any present specWarnings[].body field to be non-empty (anneal/trusted/cargo-anneal/src/target.rs:575-580 and anneal/trusted/cargo-anneal/src/verify.rs:2271-2280).
- Evidence: extractCapturedBodies sets identityText := extractStringLit? env {} identityExpr (anneal/trusted/audit/TrustedBoundary.lean:6105-6109), which evaluates to
some ""for a Body with empty identity (Body.identity defaults to""in Trusted/MirAst/Body.lean:100). Line 6275 computeslet bodyLabel := body.identityText.getD s!"body#{idx}", falling back only onnoneand leaving""unchanged whensome "". Lifting bodyLabel to feed bothunsatisfiable_safety(line 6292) and the new wide-bodyvacuity_check_truncatedcheck (argumentCount > 32, line 6302) emits"body": ""for unsafe empty-identity bodies (e.g., custom/unit TargetAuditRequest fixtures orallowSorryInProof = truetargets where Proof does not discharge BodyStaticAdmitted), causingvalidate_target_audit_report(malformed specWarnings entry with empty body label) andextract_spec_warningsto fail with exit code 2 on an otherwise passing audit.
Non-blocking advisories (P3, not Gate 2 findings)
These notes do not block merge and do not require another Gate 2 round.
G2-R1-A01[P3] (anneal/ci/check_guard_mutation.py:1092): After rebasing onto target_base, anneal/docs/testing-architecture.md (added after merge_base) still cites 48 guards (44 MirSemantics + 4 header guards) instead of 60 (44 + 4 + 12).G2-R1-A02[P3] (anneal/docs/alpha.md:76): The Profile v1 docs mention only -Zmir-preserve-ub as enforced during capture; capture now also requires -Zmir-opt-level=0. Similarly, docs/auditing-and-comparator.md does not describe the new boundary guard-mutation suite.G2-R1-A03[P3] (global): The guard-mutation step comment still describes only the MirSemantics UB guards and TrustedBoundary header-import guards; it does not mention the new audit_boundary suite that now runs under the default suite=all.
Executed Sandbox Probes
seat3sha256sum --check --strict trusted/root-manifest.sha256 (in bwrap): outcome=exit 0; Cargo.toml, Cargo.lock, flake.nix, flake.lock OKseat3python3 -I -B -m unittest discover -s /work/anneal/ci -p test_check_guard_mutation.py -v (in bwrap): outcome=exit 0; 10/10 tests OKseat3python3 -I -B /work/anneal/ci/check_guard_mutation.py --anneal-root /work/anneal --list (in bwrap): outcome=exit 0; Total cataloged guards: 60; validate_catalog_invariants passedseat3rustc --edition 2024 harness including /work/anneal/trusted/cargo-anneal/src/bundled_resources.rs + SHA-256 comparison in bwrap: outcome=exit 0; all 23 BUNDLE entries and CORRESPONDENCE_PROVENANCE_JSON hashes match disk bytesseat3test_prebuild_bundled_oleans.py, test_check_bundle_tree.py, test_workflow_yaml.py, check_non_stable_version.sh (in bwrap): outcome=exit 0; 4/4 + 3/3 + 9/9 tests OK, version 0.2.0-alpha.10 valid pre-releaseseat3git diff --stat merge_base..head -- '.github/workflows/*' + check_actions.sh with mounted action-validator + test_check_guard_mutation workflow check against target_base .github/workflows/anneal-current.yml (in bwrap): outcome=0 workflow files touched in merge_base..head (permissions/triggers/secrets/environments/checkout-SHAs/script-injection/cache-trust/guard-relaxation checklist items 1-8 N/A as unmodified); check_actions.sh exit 0; target_base workflow satisfies guard_mutation step placementseat3Python probe verifying all 12 AUDIT_BOUNDARY_GUARDS anchors, fixture_id keys, and >80-col comment lines across pr.diff (in bwrap): outcome=exit 0; all 12 anchors & fixture_ids verified; 0 non-URL comment lines >80 colsseat3rustc + rustc_driver probe compiling toy lib and inspecting config.opts.unstable_opts.mir_opt_level (in bwrap): outcome=exit 0; confirmed -Zmir-preserve-ub alone yields mir_opt_level=None while adding -Zmir-opt-level=0 yields Some(0)seat3python3 -I -B -m unittest discover -s /work/anneal/ci -p test_ci_workflow.py -v (in bwrap, timeout 30s): outcome=exit 124; first 8 tests passed, timed out at 30s during test_root_override_paths_and_symlinks_fail_closedseat3bash anneal/ci/check_todo.sh / unittest test_check_todo.py (in bwrap): outcome=exit 127 (rg binary not installed on host); manual scan confirmed 0 TODO markers added in PRseat3lean -t0 inside bwrap bounded by prlimit --nproc=64: outcome=exit 1 (failed to create thread: Resource temporarily unavailable due to ~1650 active threads on host UID); Lean runtime execution not executed inside bwrap
195fed2 to
5f5cedd
Compare
Human review surface
Review Receipt
Authored by an AI agent acting on mdittmer's behalf. |
|
@codex review Authored by an AI agent acting on mdittmer's behalf. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4262 +/- ##
=======================================
Coverage 92.99% 92.99%
=======================================
Files 16 16
Lines 2469 2469
=======================================
Hits 2296 2296
Misses 173 173 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
5f5cedd to
5b495af
Compare
Human review surface
Review Receipt
Authored by an AI agent acting on mdittmer's behalf. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
joshlf
left a comment
There was a problem hiding this comment.
Authored by an AI agent acting on joshlf's behalf.
Gate 2 Independent Cross-Family Review — FINDINGS (tier2a_core_tcb, Round 2)
- Identity:
one:df8dc6fbcb8c3b0dc5da4204d4bc07ae1d073f7e:76a6a61398e02953da57cea11d4c1402d762cced:677482dc7420d85288914581c4ff6e40ceb3e89236771848790bb7dd90fe0c44(base=3e6637aa447b,head=5b495af03a6e,tree=76a6a61398e0) - Separation:
author_family=geminivs.reviewer_family=claude - Coverage: 11 inspected, 0 inapplicable, 0 blocked (of 11 changed file(s))
| Seat | Family | Role | Status | Verdict | Findings | Latency |
|---|---|---|---|---|---|---|
seat1 |
claude-frontier-thinking |
tcb_and_api_critic |
completed |
clean |
0 | 789s |
seat2 |
gemini-frontier-thinking |
tcb_and_spec_critic |
completed |
findings |
2 | 1273s |
seat3 |
gemini-executable-falsifier |
sandboxed_probe_runner |
completed |
clean |
0 | 1421s |
Deduplicated Findings
| ID | Sev | Consensus | Verification | Location | Summary |
|---|---|---|---|---|---|
G2-R2-01 |
P1 | 1 (seat2) | static_verified |
anneal/trusted/audit/TrustedBoundary.lean:6675 |
targetAudit's .foundation subsumesInfo alternate reconciliation checks TargetOrigin.edgeViolation? only on the unmodified foundation declaration ci, never on the overriding stored theorem. |
G2-R2-02 |
P2 | 1 (seat2) | static_verified |
anneal/trusted/audit/TrustedBoundary.lean:3818 |
Foundation and sysroot extraConstNames IR-helper collisions allow non-foundation modules to slip un-replayed ill-typed .thmInfo declarations past audit and misattribute proofExport constants to .foundation in targetAudit. |
G2-R2-01 [P1] (anneal/trusted/audit/TrustedBoundary.lean:6675, Pass 2 §3 (trusted/audit), static_verified): targetAudit's .foundation subsumesInfo alternate reconciliation checks TargetOrigin.edgeViolation? only on the unmodified foundation declaration ci, never on the overriding stored theorem.
- Invariant: TargetOrigin.edgeViolation? (lines 450-462) prohibits .foundation and .library declarations from referencing .source declarations and enforces TargetRole.allows across target roles; meaning-surface closures (expectedReached, subjectClosure, modelClosure, specClosure) must not pull in forbidden-role declarations through a hijacked .foundation entry.
- Evidence: When a .library .olean (exempt from reservedKernelRoots) or a .source .olean (for a realized helper admitted by isRealizedOrCompilerHelper) exports a .thmInfo with the same header as a .foundation theorem (e.g., Iff.refl) and a differing proof body referencing a .source declaration (even a TargetRole::Proof constant from proofExport), Lean's finalizeImport keeps const2ModIdx mapped to .foundation while overwriting env.checked.get[name] with stored via subsumesInfo. targetAudit's new .foundation loop (lines 6488-6492) pushes (none, stored, ci) into pendingSourceAlternates. At lines 6671-6690, pendingSourceAlternates sets altOrigin := .foundation (line 6674) but runs declarationEdges and TargetOrigin.edgeViolation? only on ci (line 6675, the untouched .foundation copy), then enqueues stored's dependencies into phase2Roots at line 6701 with no edge check. In runTargetClosurePhase (lines 4813-4833), libraryExports compares lookup n (stored) against exportedCi (stored), so inventoryAlternates returns #[] and skips line 4827. In the post-closure loop (line 6753), role == .foundation skips edgeViolation? entirely. checkAlternateProofs then validates stored in replayed (which contains phase2Roots), so targetAudit exits 0 while violating TargetOrigin.edgeViolation? (and allowing .source overrides of realized foundation theorems to pollute subjectClosure/modelClosure/specClosure via lookup at lines 6745 and 6830-6832). Contrast with Pass 2's checkSysrootAlternates (lines 3788-3803), which checks both stored and ci.
G2-R2-02 [P2] (anneal/trusted/audit/TrustedBoundary.lean:3818, Pass 2 §3 (trusted/audit), static_verified): Foundation and sysroot extraConstNames IR-helper collisions allow non-foundation modules to slip un-replayed ill-typed .thmInfo declarations past audit and misattribute proofExport constants to .foundation in targetAudit.
- Invariant: Every declaration serialized in an audited .repo or .source .olean must be inventoried and kernel-checked (via replay or checkAlternateProofs), and targetAudit's originOf must never misclassify a proofExport constant as .foundation.
- Evidence: Lean v4.34.1 Init.* foundation modules record compiler IR-only helpers in data.extraConstNames that are absent from data.constants (1,911 non-reservedKernelRoots names in Init.Data.List.Basic's closure, such as mixHash._boxed in Init.Prelude). finalizeImport populates const2ModIdx with .foundation origin for extraConstNames while leaving env.checked.get.constants empty for those names. If a later .repo (Pass 1/Pass 2) or .source (targetAudit) .olean defines a .thmInfo (even an ill-typed False := True.intro) with such a name, finalizeImport inserts it into env.checked.get without collision while keeping const2ModIdx pinned to .foundation. The new Pass 2 extraConstNames checks (lines 3818-3821, 3839-3842, matching Pass 1 lines 3429-3432) only check origRole without rejecting (env.checked.get.find? n).isSome when n was absent from foundation/sysroot data.constants, and targetAudit's new .foundation loop (lines 6480-6492) does not check extraConstNames at all. Consequently, collectRepoModuleConstants (lines 2932-2947) and targetAudit's .source loop (lines 6545-6549) treat stored == ci as a matching realized theorem (inventoryAlternates returns #[]) and exit 0 without adding it to locals, specAllConsts, or alternateProofs. In targetAudit's proofExport loop (lines 6579-6602), a proof constant under such a name passes env.checked.get.find? == none and is then classified as .foundation by originOf (line 6596 checks env.getModuleIdxFor? before proofOrigins), skipping ensureReplayableConstant and TargetOrigin.edgeViolation? at line 6753 (bounded to P2 because fresh replay onto base still rejects any replayed theorem that references the missing constant).
Non-blocking advisories (P3, not Gate 2 findings)
These notes do not block merge and do not require another Gate 2 round.
G2-R2-A01[P3] (anneal/trusted/audit/TrustedBoundary.lean:6485): The new targetAudit .foundation arm checks constants but not data.extraConstNames provenance, unlike the new correspondence .foundation and .sysrootFoundation arms.G2-R2-A02[P3] (anneal/trusted/rustc-capture/src/capture.rs:2106): The rewritten comment drops the base note that -Zmir-preserve-ub's help text claims to imply -Zmir-opt-level=0 (it does not), and the remove_place_mention citation does not support the new statement that MIR passes check mir_opt_level.
Executed Sandbox Probes
seat3repo_hygiene_git_tree_and_modes: outcome=passedseat3workflow_checklist_1_permissions: outcome=passedseat3workflow_checklist_2_triggers: outcome=passedseat3workflow_checklist_3_secrets_containment: outcome=passedseat3workflow_checklist_4_release_env_protection: outcome=passedseat3workflow_checklist_5_checkout_and_sha_pinning: outcome=passedseat3workflow_checklist_6_script_injection: outcome=passedseat3workflow_checklist_7_cache_artifact_trust: outcome=passedseat3workflow_checklist_8_no_guard_relaxation: outcome=passedseat3bwrap_trusted_boundary_compile: outcome=passedseat3bwrap_python_unittest_check_guard_mutation: outcome=passedseat3bwrap_real_lean_audit_boundary_guard_mutation: outcome=passedseat3bwrap_vacuity_linter_11_probes: outcome=passedseat3bwrap_olean_replay_and_correspondence_18_probes: outcome=passedseat3bwrap_rustc_preserve_ub_probe: outcome=passedseat3docs_links_and_counts: outcome=passed
5b495af to
b890614
Compare
Human review surface
Review Receipt
Authored by an AI agent acting on mdittmer's behalf. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
|
Authored by an AI agent acting on joshlf's behalf. Heads-up: the PR hygiene pre-gate (
Rewrapping those comments is enough. This PR is sequenced to merge after #4237 and #4147 because they touch the same files ( |
b890614 to
3250938
Compare
Human review surface
Review Receipt
Authored by an AI agent acting on mdittmer's behalf. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 32509386c7
ℹ️ 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".
3250938 to
1ae68cc
Compare
Human review surface
Review Receipt
Authored by an AI agent acting on mdittmer's behalf. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
1ae68cc to
b8d85fb
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
40d6883 to
525c6c1
Compare
Human review surface
Review Receipt
Authored by an AI agent acting on mdittmer's behalf. |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
Human review surface
Review Receipt
Authored by an AI agent acting on mdittmer's behalf. |
525c6c1 to
1088025
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
joshlf
left a comment
There was a problem hiding this comment.
Authored by an AI agent acting on joshlf's behalf.
Gate 2 Independent Cross-Family Review — FINDINGS (tier2a_core_tcb, Round 7)
- Identity:
one:8df2a8d0b1e2077fec0d24d0027ae56d5c633026:2d5e88549f4e4215a6200645c70995408f8bfbe5:afbfed1c2e49d4cf145a27654ce98ae5f8b0d0356061c7aa3634fe8adf031461(base=80bfd5e1fb29,head=1088025e122a,tree=2d5e88549f4e) - Separation:
author_family=geminivs.reviewer_family=claude - Coverage: 11 inspected, 0 inapplicable, 0 blocked (of 11 changed file(s))
| Seat | Family | Role | Status | Verdict | Findings | Latency |
|---|---|---|---|---|---|---|
seat1 |
claude-frontier-thinking |
tcb_and_api_critic |
completed |
findings |
1 | 694s |
seat2 |
gemini-frontier-thinking |
tcb_and_spec_critic |
completed |
clean |
0 | 1274s |
seat3 |
gemini-executable-falsifier |
sandboxed_probe_runner |
completed |
clean |
0 | 1030s |
Deduplicated Findings
| ID | Sev | Consensus | Verification | Location | Summary |
|---|---|---|---|---|---|
G2-R7-01 |
P2 | 1 (seat1) | static_verified |
anneal/docs/build-systems-and-receipts.md:153 |
The fixed capture-profile doc still says capture always passes and validates only -Copt-level=0, -Cdebug-assertions=no and -Zmir-preserve-ub; this PR now also always passes and requires -Zmir-opt-level=0. |
G2-R7-01 [P2] (anneal/docs/build-systems-and-receipts.md:153, General (documentation review), companion to Pass 2 §2 (trusted/rustc-capture), static_verified): The fixed capture-profile doc still says capture always passes and validates only -Copt-level=0, -Cdebug-assertions=no and -Zmir-preserve-ub; this PR now also always passes and requires -Zmir-opt-level=0.
- Invariant: AGENTS.md standing rule (docs-author): add or update affected docs in the same PR; the General pass checks documentation accuracy against the diff.
- Evidence: trusted/rustc-capture/src/capture.rs:2740 adds "-Zmir-opt-level=0" to the fixed compiler_args, and capture.rs:1623-1628 makes validate_profile_options fail unless mir_opt_level == Some(0). docs/build-systems-and-receipts.md:153-160 lists the full injected and validated flag set without it, and the Phase 1 diagram at line 107 ('Injects -Zmir-preserve-ub') has the same omission. Neither is in the changed-file set. Impact is documentation accuracy only (the doc understates the checks); not a soundness defect.
Non-blocking advisories (P3, not Gate 2 findings)
These notes do not block merge and do not require another Gate 2 round.
G2-R7-A01[P3] (anneal/tests/rustc-capture/tests/pass_order_sentinel.rs:238): Untouched seam-2 doc comment still describes the capture profile as '-Copt-level=0 -Zmir-preserve-ub', without the now-mandatory -Zmir-opt-level=0.G2-R7-A02[P3] (anneal/trusted/audit/TrustedBoundary.lean:3236): Several new defense-in-depth rejections have no negative test: validateReplayMap's recursor all-mismatch and missing-inductive branches, constructor-missing-from-inductive and expected-constructor branches; the 'uninventoried foundation/sysroot constant' final sweeps; and the targetAudit foundation-block 'target inventory origin mismatch' / 'IR helper provenance mismatch'.G2-R7-A03[P3] (anneal/trusted/audit/TrustedBoundary.lean:6431): Empty-identity fallback labelbody#<idx>indexes the extractedbodiesarray rather than the originalProgram.bodiesindex if an earlier body was skipped during truncated extraction.G2-R7-A04[P3] (anneal/trusted/rustc-capture/src/capture.rs:1623): Optional defense-in-depth parity: extract.rs and capture profile docs only name -Zmir-preserve-ub and do not yet mirror the new -Zmir-opt-level=0 requirement.G2-R7-A05[P3] (global): Pre-existingisCompilerGeneratedSpecDeffilter omits Lean 4.34.1 compiler-generated*.ctorElimTypeand recursive*.brecOn.goauxiliaries, which can trigger false-positive advisoryunused_spec_bindingwarnings if a specification defines a multi-constructor or recursiveinductive(admitted byallowedSpecDeclarationKindsat lines 1498-1502).
Executed Sandbox Probes
seat2lean_v4_34_1_sysroot_invariants: Verified across Init.Data.BitVec.Basic + Std.Data.HashMap.Basic on pinned Lean 4.34.1: 354/354 recursors satisfy iv.all == rv.all, 0 invalid defn/thm/opaque .al (rc=0)seat2bwrap_check_guard_mutation_unit_tests: python3 -I -B ci/check_guard_mutation.py --list printed 96 cataloged guards (80 mir_semantics + 4 audit_headers + 12 audit_boundary) and python3 -I -B -m unitte (rc=0)seat3workflow_checklist_1_permissions: outcome=passedseat3workflow_checklist_2_triggers: outcome=passedseat3workflow_checklist_3_secrets_containment: outcome=passedseat3workflow_checklist_4_release_environments: outcome=passedseat3workflow_checklist_5_checkout_and_sha_pins: outcome=passedseat3workflow_checklist_6_script_injection: outcome=passedseat3workflow_checklist_7_cache_artifact_trust: outcome=passedseat3workflow_checklist_8_guard_relaxation: outcome=passedseat3hygiene_and_root_manifest: outcome=passedseat3guard_mutation_catalog_and_unit_tests: outcome=passedseat3rustc_mir_opt_level_0_differential: outcome=passedseat3lean434_replay_and_subsumption_probes: outcome=passedseat3lean434_bitvec_whnf_and_zerocopy_specs: outcome=passedseat3lean434_unused_binder_inductive_edge_case: outcome=passedseat3heavy_cargo_and_full_tb_compile_and_missing_ci_bins: outcome=skipped
1088025 to
b1f88b5
Compare
Human review surface
Review Receipt
Authored by an AI agent acting on mdittmer's behalf. |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
joshlf
left a comment
There was a problem hiding this comment.
Authored by an AI agent acting on joshlf's behalf.
Gate 2 Independent Cross-Family Review — FINDINGS (tier2a_core_tcb, Round 8)
- Identity:
one:82ece4a7a030c7af15925fdb944d9f1848e8fe75:08a8814697d83b0e701e4c5769e2b92542a90f10:c0b69a552a4ba21a62a730690b5791821a715fb5ac6852ef0483f08007949041(base=f5cdaf76557c,head=b1f88b5a3ba2,tree=08a8814697d8) - Separation:
author_family=geminivs.reviewer_family=claude - Coverage: 14 inspected, 0 inapplicable, 0 blocked (of 14 changed file(s))
| Seat | Family | Role | Status | Verdict | Findings | Latency |
|---|---|---|---|---|---|---|
seat1 |
claude-frontier-thinking |
tcb_and_api_critic |
completed |
findings |
1 | 662s |
seat2 |
gemini-frontier-thinking |
tcb_and_spec_critic |
completed |
clean |
0 | 938s |
seat3 |
gemini-executable-falsifier |
sandboxed_probe_runner |
completed |
clean |
0 | 2897s |
Deduplicated Findings
| ID | Sev | Consensus | Verification | Location | Summary |
|---|---|---|---|---|---|
G2-R8-01 |
P2 | 1 (seat1) | static_verified |
anneal/trusted/audit/TrustedBoundary.lean:3290 |
Several new auditor rejection checks have no negative test asserting their diagnostic: the validateReplayMap recursor all mismatch, missing recursor inductive, expected-constructor, constructor-missing-from-inductive, missing/anonymous inductive-for-constructor branches (lines 3272-3292), and the new correspondence .sysrootFoundation inventory-origin check (line 3886). |
G2-R8-01 [P2] (anneal/trusted/audit/TrustedBoundary.lean:3290, Pass 2 §3 (trusted/audit) mandatory negative tests, static_verified): Several new auditor rejection checks have no negative test asserting their diagnostic: the validateReplayMap recursor all mismatch, missing recursor inductive, expected-constructor, constructor-missing-from-inductive, missing/anonymous inductive-for-constructor branches (lines 3272-3292), and the new correspondence .sysrootFoundation inventory-origin check (line 3886).
- Invariant: Base anneal/AGENTS.md Pass 2 (lines 267-271) and trust-review §3 require a new or updated negative test in tests/audit/tests/boundary_audit.rs, asserting exit code and target diagnostic, for every added admission guard, verified to fail if the guard is disabled.
- Evidence: No test in tests/audit/tests/.rs or ci/test_.py contains 'recursor ...
alldiffers', 'missing inductive', 'expected constructor', 'missing from ', 'anonymous inductive on constructor', or any 'inventory origin mismatch' assertion. The only forged recInfo/ctorInfo tests cover 'points to' and 'missing constructor'. The recursorallcheck is the only guard against a forged recursorall, because Lean's Replay checkPostponedRecursors compares onlyrules. Deleting it or the sysroot origin check would leave every current test passing. The checks marked 'uninventoried foundation/sysroot constant' are documented as unreachable defense in depth and are excluded here.
Non-blocking advisories (P3, not Gate 2 findings)
These notes do not block merge and do not require another Gate 2 round.
G2-R8-A01[P3] (anneal/trusted/rustc-capture/src/capture.rs:1623): Capture now enforces -Zmir-opt-level=0, but ir::Configuration records only mir_preserve_ub, so receipts and verify_zerocopy.py cannot attest the MIR opt level.G2-R8-A02[P3] (anneal/ci/check_guard_mutation.py:784): run_lean_forge copies the full ambient environment (os.environ.copy()) and clears only LEAN_PATH, so ambient LEAN_/LAKE_/LD_* variables reach the fixture-forging lean process.G2-R8-A03[P3] (anneal/trusted/audit/TrustedBoundary.lean:6431): Fallbackbody#<idx>labels ininspectSpecVacuityindex the filteredbodiesarray rather than the originalProgram.bodiesindex if an earlier body was skipped due to unreducible metadata.G2-R8-A04[P3] (global): The doc states that Lean guard mutation reuses precompiledTrustedBoundary.oleans, whereascheck_guard_mutation.pyrecompiles mutatedTrustedBoundary.leancleanly per guard foraudit_headersandaudit_boundary(reusing compiled baseline fixtures andBASE_TRUSTED_MODULES).
Executed Sandbox Probes
seat3Verified clean git diff --raw over 14 :100644 M files, zero new symlinks/submodules/caches, zero bidi/invisible Unicode: outcome=passedseat3sha256sum --check --strict trusted/root-manifest.sha256 exited 0 (Cargo.toml, Cargo.lock, flake.nix, flake.lock all OK): outcome=passedseat3python3 -I -B -m unittest discover -s ci -p test_check_guard_mutation.py -v ran 11 tests in 13.451s with OK inside bwrap: outcome=passedseat3python3 -I -B ci/check_guard_mutation.py --lean /lean/bin/lean --suite audit_headers --jobs 2 --timeout-sec 120 exited 0: outcome=passedseat3python3 -I -B ci/check_guard_mutation.py --lean /lean/bin/lean --suite audit_boundary --jobs 2 --timeout-sec 120 exited: outcome=passedseat3Compiled candidate TrustedBoundary.lean in bwrap (39.6s) and passed adv_probes.lean..adv_probes4.lean covering OfNat Nat: outcome=passedseat3rustc 1.98.0-nightly --emit=mir -Copt-level=0 -Cdebug-assertions=no -Zmir-opt-level=0 -Zmir-preserve-ub inside bwrap exi: outcome=passedseat3Verified all relative Markdown links across the 4 modified docs inside bwrap; 0 broken links.: outcome=passedseat3.github/workflows/anneal-current.yml and caller .github/workflows/anneal.yml both declare top-levelpermissions: {conte: outcome=passed`seat3.github/workflows/anneal-current.yml triggers solely onworkflow_call; caller .github/workflows/anneal.yml triggers on: outcome=passedseat3Zero${{ secrets.* }}orGITHUB_TOKENreferences appear in anneal-current.yml or anneal.yml;guard_mutationand te: outcome=passedseat3Neither anneal-current.yml nor anneal.yml defines a release/publish job;save_nix_cacheis gated strictly topushon: outcome=passedseat3All 4actions/checkoutsteps in anneal-current.yml setpersist-credentials: false, and all 20uses:entries in ann: outcome=passedseat3Scanned everyrun:block in anneal-current.yml inside bwrap; found zero${{ ... }}interpolations inside shell scrip: outcome=passedseat3Cache boundaries preserved:save_miri_olean_cachekeys onhashFiles(lean-toolchain, UPSTREAM_PIN.json), skips saving: outcome=passedseat3Diff in anneal-current.yml strengthens CI by dropping--suite mir_semanticsonguard_mutationto execute all 96 cata: outcome=passed
b1f88b5 to
25a59f1
Compare
Human review surface
Review Receipt
Authored by an AI agent acting on mdittmer's behalf. |
|
@codex review |
|
To use Codex here, create a Codex account and connect to github. |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
joshlf
left a comment
There was a problem hiding this comment.
Authored by an AI agent acting on joshlf's behalf.
Gate 2 Independent Cross-Family Review — FINDINGS (tier2a_core_tcb, Round 9)
- Identity:
multi:24e6e7250c69c8f4df12f7520a8ee2e02d4b1f74:25a59f1674e35e539035c3d1aad7174fa1052170(base=24e6e7250c69,head=25a59f1674e3,tree=f88b4d02a283) - Separation:
author_family=geminivs.reviewer_family=claude - Coverage: 14 inspected, 0 inapplicable, 0 blocked (of 14 changed file(s))
| Seat | Family | Role | Status | Verdict | Findings | Latency |
|---|---|---|---|---|---|---|
seat1 |
claude-frontier-thinking |
tcb_and_api_critic |
completed |
findings |
1 | 506s |
seat2 |
gemini-frontier-thinking |
tcb_and_spec_critic |
completed |
findings |
1 | 698s |
seat3 |
gemini-executable-falsifier |
sandboxed_probe_runner |
completed |
findings |
1 | 1139s |
Deduplicated Findings
| ID | Sev | Consensus | Verification | Location | Summary |
|---|---|---|---|---|---|
G2-R9-01 |
P1 | 2 (seat2, seat3) | probe_confirmed |
anneal/trusted/rustc-capture/src/capture.rs:3035 |
New -Zmir-opt-level=0 unit test calls validate_compiler_options with None, failing to compile on the target_base merge ref where the 5th parameter is FeaturePolicy<'_>. |
G2-R9-02 |
P2 | 1 (seat1) | static_verified |
anneal/trusted/audit/TrustedBoundary.lean:6916 |
The new targetAudit admission check that rejects sorry-bearing source-proof alternates whose names are in the Phase 1 closure has no negative test and no guard-mutation entry, and it reuses the Phase 1 closure's error message, so removing it would not fail any test. |
G2-R9-01 [P1] (anneal/trusted/rustc-capture/src/capture.rs:3035, Pass 2 §2 (trusted/rustc-capture), probe_confirmed): New -Zmir-opt-level=0 unit test calls validate_compiler_options with None, failing to compile on the target_base merge ref where the 5th parameter is FeaturePolicy<'_>.
- Invariant: PR changes must compile cleanly when merged onto target_base (
24e6e7250c69c8f4df12f7520a8ee2e02d4b1f74) and pass CI without type mismatches. - Evidence: In head (
25a59f1674e35e539035c3d1aad7174fa1052170, branched from merge_basef5cdaf76557c2efa8619c8f8e41ee94a1eb87387),anneal/trusted/rustc-capture/src/capture.rs:3026-3039addsfor mir_opt in [None, Some(1), Some(2)]callingvalidate_compiler_options(&mir_opts, ir::CrateType::Lib, ir::PanicStrategy::Unwind, false, None). On target_base (24e6e7250c69c8f4df12f7520a8ee2e02d4b1f74,#4374),validate_compiler_optionsatanneal/trusted/rustc-capture/src/capture.rs:1813-1819takesfeatures: FeaturePolicy<'_>and all surrounding test calls at lines 3175-3208 passFeaturePolicy::Normal(&[]).git merge-tree --write-treemerges cleanly (tree6e107017df2600414fa9e8c1b4fd1bdaf2dc6400) with zero textual conflict, leaving a type error at merged line 3227 that breaksanneal-rustc-capturetest compilation on the PR merge commit. Rebase onto target_base and passFeaturePolicy::Normal(&[]).
G2-R9-02 [P2] (anneal/trusted/audit/TrustedBoundary.lean:6916, Pass 2 §3 (trusted/audit), static_verified): The new targetAudit admission check that rejects sorry-bearing source-proof alternates whose names are in the Phase 1 closure has no negative test and no guard-mutation entry, and it reuses the Phase 1 closure's error message, so removing it would not fail any test.
- Invariant: Pass 2 §3 mandatory negative tests: every added or modified admission guard needs a negative test asserting exit code 1 and its diagnostic, verified to fail if the guard is disabled (base AGENTS.md Code Review Rules; trust-review Pass 2 §3).
- Evidence: TrustedBoundary.lean:6916-6918 (
for n in altSorryDecls do if phase1Closure.contains n then fail "unapproved axiom sorryAx from Init.Prelude") is new. This is the only place a sorry-bearing alternate is rejected under allow_sorry_in_proof: runTargetClosurePhase followslookup(the stored, sorry-free body), and the alternates loop (TrustedBoundary.lean:6855-6907) allows sorryAx for.source .proofalternates. The case is reachable: a Proof module redeclares, with a well-typedsorryAxbody, a theorem that a Spec/Model/Expected constant references (for example a proof term inside a spec definition). Existing tests do not cover it. target_audit.rs:2606-2617 and 2876-2909 put sorry directly in Spec/Capture/Model/Expected, so the older Phase 1 closure check rejects them with the same message. The new target_audit_allow_sorry_alternate_keeps_non_sorry_deps_in_phase2 cases (target_audit.rs:4242-4520) use flip.eq_1 and Proof-only helpers outside the Phase 1 closure, and its positive control expects acceptance. No AUDIT_BOUNDARY_GUARDS entry anchors this check. Because the message is identical, a regression test would also need a fixture whose stored copy is sorry-free so that only this check can fire.
Non-blocking advisories (P3, not Gate 2 findings)
These notes do not block merge and do not require another Gate 2 round.
G2-R9-A01[P3] (anneal/docs/build-systems-and-receipts.md:139): The linked capture-profile section inanneal/docs/trust-model.md#capture-profile-and-the-binary-seamstill omits-Zmir-opt-level=0(and-Zmir-preserve-ub) from the fixed capture profile list.G2-R9-A02[P3] (anneal/trusted/audit/TrustedBoundary.lean:3481): The 'uninventoried foundation constant' and 'uninventoried sysroot constant' checks (lines 3481, 3986, 3990) and the targetAudit.foundationinventory origin/IR-helper checks have no tests. Their comments describe them as unreachable defense in depth.G2-R9-A03[P3] (anneal/trusted/audit/TrustedBoundary.lean:6706): The new targetAudit library-inventory checks in the source-module loop (line 6706) and the proofExport loop (line 6749) reuse the runTargetClosurePhase message and have no dedicated test. The existing test (target_audit.rs:1113) passes through the older closure check, so these checks can be removed without failing it.G2-R9-A04[P3] (anneal/trusted/rustc-capture/src/capture.rs:2935): The receipt's target_base (f5cdaf7) is two commits behind the current target_base (24e6e72). Those commits also touch capture.rs, docs/alpha.md and pass_order_sentinel.rs. The merge is clean, but CI should be confirmed on the merged result.
Executed Sandbox Probes
seat1Reviewer-authored Lean v4.34.1 snippet with or-pattern| .defnInfo v | .thmInfo v | .opaqueInfo v => v.allover ConstantInfo (no diff-derived code): outcome=passseat3repo_hygiene_and_root_manifest: outcome=passedseat3python_ci_unit_suites: outcome=passedseat3python_ci_workflow_suite: outcome=partial_timeoutseat3rustc_merge_skew_compile_repro: outcome=failed_confirmed_bugseat3rustc_mir_opt_level_0_semantics: outcome=passedseat3lean_vacuity_bitvec_fin_probe: outcome=passedseat3workflow_check_1_least_privilege_permissions: outcome=passedseat3workflow_check_2_untrusted_pr_triggers: outcome=passedseat3workflow_check_3_secret_containment: outcome=passedseat3workflow_check_4_release_environment_protection: outcome=passedseat3workflow_check_5_checkout_and_action_pinning: outcome=passedseat3workflow_check_6_no_shell_interpolation_injection: outcome=passedseat3workflow_check_7_cache_and_artifact_trust: outcome=passedseat3workflow_check_8_no_guard_relaxation: outcome=passed
Complement #4176 with defense-in-depth TCB checks across capture, audit, spec vacuity linting, and guard-mutation coverage: - `anneal-rustc-capture`: pass and require `-Zmir-opt-level=0` alongside `-Zmir-preserve-ub` in `run` and `validate_profile_options`, and document it in `docs/{build-systems-and-receipts,alpha}.md` and `pass_order_sentinel.rs`. - `TrustedBoundary.lean`: - enforce checked-environment key parity and non-anonymity at import (`verifyCheckedEnvKeys` in `finalizeImportedEnv`), reject intra-module duplicate or misindexed declarations via `verifyModuleHeaderInventory`, and reject anonymous declaration names in `proofExport` target inventories; - reject key mismatches, base-environment shadowing, and post-replay declaration omission alongside mutual `all`, constructor, and recursor invariants in `validateReplayMap` and `replayKernelEnv` (with `hasNoDuplicateNames`), and require full header parity across imports and alternates (`sameConstantShape`, `RecursorVal.all`, and shared `sameUnsafeRecHeader`); - check authority edges on both `stored` and `ci` for subsumed `.foundation`, `.sysrootFoundation`, and `.source` alternates across Pass 1, Pass 2, and `targetAudit`; under `--allow-sorry-in-proof`, record sorry-bearing `.source .proof` alternates in `sorryDecls` and `axioms`, keep their non-`sorryAx` dependencies in `phase2Roots`, verify every alternate theorem body (including `sorryAx`-bearing `.source .proof` alternates, plus `phase2Roots` when `idx == 0`) via `checkAlternateProofs`, and reject any sorry alternate reaching `phase1Closure`; - require every checked constant with `.foundation` or `.sysrootFoundation` provenance to appear in its origin module's inventory, require target `.source` and `proofExport` constants with `.library` provenance to appear in that library's inventory, reject repository constants shadowing vendor or sysroot declarations in `correspondence-audit` (`replayCorrAndVendor`) before the `!replayRepo` early return, and reject kernel declarations colliding with IR-only `extraConstNames` entries across Pass 1, Pass 2, and `targetAudit` (including `proofExport`). - `inspectSpecVacuity` / `cargo-anneal`: fix `Trusted.MirSemantics.*` and `BitVec`/`Option`/`Exists`/`Fin (k + 1)` domain matching, unify ordering checks on WHNF `Nat.le` (`decideNatLe?`), guard `OfNat.ofNat` on canonical `Nat`, fall back to `body#<idx>` when an `unsafe` `Body` has an empty `identity` string, emit explicit `vacuity_check_truncated` warnings with cause across `Specs` and `SpecsV2` program/body extraction (registered in `target.rs`), and add unit and E2E coverage across `target_audit`, `boundary_audit`, and `suite`. - `check_guard_mutation.py`: add 12 `audit_boundary` guards covering `spec-preflight` and `target-audit` including foundation `propext` subsumption (96 total guards on top of `main`'s 84), validate `AuditBoundaryGuard.fixture_id` statically in `validate_catalog_invariants`, pin `LEAN_PATH=""`, `Lean.Environment`, and `-j1`/`-M2048`/`-s16384` caps in `run_lean_forge`, add unit/survivor tests in `test_check_guard_mutation.py`, and align guard-mutation docs and workflow comments. Agent-authored-by: AI agent acting on mdittmer's behalf
25a59f1 to
7395a8d
Compare
Human review surface
Review Receipt
Authored by an AI agent acting on mdittmer's behalf. |
|
@codex review |
|
To use Codex here, create a Codex account and connect to github. |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
Complement #4176 with defense-in-depth TCB checks across capture, audit, spec vacuity linting, and guard-mutation coverage:
anneal-rustc-capture: pass and require-Zmir-opt-level=0alongside-Zmir-preserve-ubinrunandvalidate_profile_options, and document it indocs/{build-systems-and-receipts,alpha}.mdandpass_order_sentinel.rs.TrustedBoundary.lean:verifyCheckedEnvKeysinfinalizeImportedEnv), reject intra-module duplicate or misindexed declarations viaverifyModuleHeaderInventory, and reject anonymous declaration names inproofExporttarget inventories;all, constructor, and recursor invariants invalidateReplayMapandreplayKernelEnv(withhasNoDuplicateNames), and require full header parity across imports and alternates (sameConstantShape,RecursorVal.all, and sharedsameUnsafeRecHeader);storedandcifor subsumed.foundation,.sysrootFoundation, and.sourcealternates across Pass 1, Pass 2, andtargetAudit; under--allow-sorry-in-proof, record sorry-bearing.source .proofalternates insorryDeclsandaxioms, keep their non-sorryAxdependencies inphase2Roots, verify every alternate theorem body (includingsorryAx-bearing.source .proofalternates, plusphase2Rootswhenidx == 0) viacheckAlternateProofs, and reject any sorry alternate reachingphase1Closure;.foundationor.sysrootFoundationprovenance to appear in its origin module's inventory, require target.sourceandproofExportconstants with.libraryprovenance to appear in that library's inventory, reject repository constants shadowing vendor or sysroot declarations incorrespondence-audit(replayCorrAndVendor) before the!replayRepoearly return, and reject kernel declarations colliding with IR-onlyextraConstNamesentries across Pass 1, Pass 2, andtargetAudit(includingproofExport).inspectSpecVacuity/cargo-anneal: fixTrusted.MirSemantics.*andBitVec/Option/Exists/Fin (k + 1)domain matching, unify ordering checks on WHNFNat.le(decideNatLe?), guardOfNat.ofNaton canonicalNat, fall back tobody#<idx>when anunsafeBodyhas an emptyidentitystring, emit explicitvacuity_check_truncatedwarnings with cause acrossSpecsandSpecsV2program/body extraction (registered intarget.rs), and add unit and E2E coverage acrosstarget_audit,boundary_audit, andsuite.check_guard_mutation.py: add 12audit_boundaryguards coveringspec-preflightandtarget-auditincluding foundationpropextsubsumption (96 total guards on top ofmain's 84), validateAuditBoundaryGuard.fixture_idstatically invalidate_catalog_invariants, pinLEAN_PATH="",Lean.Environment, and-j1/-M2048/-s16384caps inrun_lean_forge, add unit/survivor tests intest_check_guard_mutation.py, and align guard-mutation docs and workflow comments.Authored by an AI agent acting on mdittmer's behalf.