Repository navigation
Split Step.lean into 7 clusters and decouple leaf guard refutations - #176
Conversation
d8f983a to
d6d311e
Compare
|
🤖 Review Receipt for rebased and re-sliced PR #176 ( Comparison Tuple
Human review surface
Verification
Authored by an AI agent acting on joshlf'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:4b8726f5400c3bdb4e7d5ce1a10f2606c141f35a:d6d311e3d6ec4b5c6729d990b1a5fe306ee8edd8(base=4b8726f5400c,head=d6d311e3d6ec,tree=caa94d1b707b) - Separation:
author_family=agentvs.reviewer_family=multi - Coverage: 50 inspected, 0 inapplicable, 0 blocked (of 50 changed file(s))
| Seat | Family | Role | Status | Verdict | Findings | Latency |
|---|---|---|---|---|---|---|
seat1 |
claude-frontier-thinking |
tcb_and_api_critic |
completed |
findings |
1 | 2969s |
seat2 |
gemini-frontier-thinking |
tcb_and_spec_critic |
completed |
clean |
0 | 1050s |
seat3 |
gemini-executable-falsifier |
sandboxed_probe_runner |
completed |
findings |
1 | 1366s |
Deduplicated Findings
| ID | Sev | Consensus | Verification | Location | Summary |
|---|---|---|---|---|---|
G2-R1-01 |
P1 | 1 (seat3) | probe_confirmed |
ci/test_render_correspondence_provenance.py:102 |
test_renders_valid_schema_and_all_canonical_entries hardcodes len(data['trusted_lean']) == 35, failing with 42 != 35 after TRUSTED_BUNDLE_SOURCES expanded for the 7 Step/*.lean submodules |
G2-R1-02 |
P2 | 2 (seat1, seat2) | static_verified |
ci/check_guard_mutation.py:146 |
The Step barrel is newly exempted from guard-mutation coverage. The commit body doesn't disclose this, nothing enforces that the barrel stays declaration-free, and the trust doc still lists Step.lean as guard-bearing with CanaryFixtures as the only exclusion. |
G2-R1-01 [P1] (ci/test_render_correspondence_provenance.py:102, Pass 2 §5 (ci & workflows), probe_confirmed): test_renders_valid_schema_and_all_canonical_entries hardcodes len(data['trusted_lean']) == 35, failing with 42 != 35 after TRUSTED_BUNDLE_SOURCES expanded for the 7 Step/*.lean submodules
- Invariant: Blocking CI test suite anneal-ci-tests (ci/checks.toml -> ci/run_anneal_check.sh ci-tests) must pass against the canonical TRUSTED_BUNDLE_SOURCES inventory registered in trusted/cargo-anneal/src/trusted_bundle.rs
- Evidence: Adding trusted/lean/Trusted/MirSemantics/Step/{AssignV2,CallsTermV2,CoreDispatchV2,EvalStep,PlacesV2,RvaluesV2,V1Core}.lean to TRUSTED_BUNDLE_SOURCES (trusted/cargo-anneal/src/trusted_bundle.rs:47-93) raised the trusted_lean file count from 35 to 42 (updated in docs/semantics/PROFILE_CARD.md:47). Executing python3 -I -B -m unittest discover -s ci -p 'test_render_correspondence_provenance.py' -v inside isolated bwrap reproduced AssertionError: 42 != 35 at ci/test_render_correspondence_provenance.py:102 (FAILED (failures=1)).
G2-R1-02 [P2] (ci/check_guard_mutation.py:146, Pass 2 §5 (ci & workflows), static_verified): The Step barrel is newly exempted from guard-mutation coverage. The commit body doesn't disclose this, nothing enforces that the barrel stays declaration-free, and the trust doc still lists Step.lean as guard-bearing with CanaryFixtures as the only exclusion.
- Invariant: Rule-relaxation disclosure in the commit body (AGENTS.md Code Review Rules: undisclosed relaxations block); the standing docs rule; the coverage invariant that every Trusted/MirSemantics file outside NON_GUARD_SEMANTICS_MODULES must have active guard-mutation coverage (ci/test_check_guard_mutation.py ~L157).
- Evidence: Head adds "Trusted/MirSemantics/Step" to NON_GUARD_SEMANTICS_MODULES (ci/check_guard_mutation.py:144-147). The commit body only mentions 'recursive module discovery and singleton-cone enforcement'. No check asserts the barrel stays free of declarations (grep for barrel/NON_GUARD finds only membership/overlap/missing-file checks at ~L5032-5054), so guard logic later added to Step.lean would be silently unmutated. docs/trust/auditing-and-comparator.md:345-351 still says 'all eleven guard-bearing Trusted/MirSemantics/ modules (... Step.lean ...)' with 'the twelfth file, CanaryFixtures.lean' as the sole exclusion; head has 17 guard-bearing modules and 2 exclusions. Sound today, since the barrel has zero declarations, so this is not a soundness defect. Fix: disclose the exemption, add a static check that Step.lean contains only header/imports/doc, and update the trust doc.
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] (docs/trust/auditing-and-comparator.md:345): Guard-mutation architecture prose still enumerates eleven guard-bearing Trusted/MirSemantics modules including Step.lean instead of the seventeen modules after the Step/* cluster split.G2-R1-A02[P3] (ci/fixtures/guard_mutation/StepCoreDispatchRefutations.lean:1): Several refutations moved from end-to-end checks to helper-level checks, narrowing baseline regression coverage of call-site wiring without saying so.G2-R1-A03[P3] (ci/fixtures/guard_mutation/StepPlacesSanity.lean:96): Stale section comment '-- Trusted/MirSemantics/Bytes.lean Profile v2 guards' was copied into StepPlacesSanity.lean above Step.PlacesV2 sanity helpers.G2-R1-A04[P3] (ci/fixtures/guard_mutation/StepRvaluesSanity.lean:97): Stale section comment '-- Trusted/MirSemantics/Bytes.lean Profile v2 guards' was copied into StepRvaluesSanity.lean above Step.RvaluesV2 sanity canaries.G2-R1-A05[P3] (ci/fixtures/guard_mutation/StepRvaluesSanity.lean:152): alloc_sanity_box_as_ref duplicates the exact evalCastKindV2 equality already proven in step_rvalues_sanity_basic (line 64) within the same fileG2-R1-A06[P3] (tools/anneal-mir-eval/tests/semantics.rs:2586): Out-of-diff comments still cite line ranges in the old monolithic Step.lean (e.g. Step.lean:1561-1583, panic_counterexamples.rs Step.lean:5493), which now point into a 26-line barrel.G2-R1-A07[P3] (trusted/lean/Trusted/MirSemantics/Step/V1Core.lean:70): check_pr_hygiene.py emitted 5 pre-existing wrapped-inline-code-span warnings carried over verbatim from Step.lean plus review-size budget advisory (44363 lines across 49 reviewable files)
Executed Sandbox Probes
seat3repo_hygiene_and_split_equivalence: outcome=passseat3workflow_permissions_auth_secret_containment_checklist_items_1_to_8: outcome=inapplicableseat3bwrap_profile_card_root_manifest_guard_list: outcome=passseat3bwrap_test_render_correspondence_provenance: outcome=failseat3bwrap_ci_static_checks_suite: outcome=passseat3bwrap_ci_python_unittests: outcome=pass_with_timeouts_and_missing_env_toolsseat3bwrap_lean4_diamond_stale_helper_probe: outcome=passseat3bwrap_rustfmt_check: outcome=fail_preexisting_only
d6d311e to
1356c40
Compare
|
🤖 Review Receipt for PR #176 ( Comparison Tuple
Gate 2 Round 1 Findings Closed
Human review surface
Verification
Authored by an AI agent acting on joshlf'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 — CLEAN (tier2a_core_tcb, Round 2)
- Identity:
multi:4aad511ad14a32cc68e506675727bb9558b88dfd:1356c40f206b77dae97352c8d0bc44caa76cb862(base=4aad511ad14a,head=1356c40f206b,tree=5d2216aeb8e1) - Separation:
author_family=agentvs.reviewer_family=multi - Coverage: 52 inspected, 0 inapplicable, 0 blocked (of 52 changed file(s))
- Review mode:
delta_escalatedrelative to the prior Gate 2 review at headd6d311e3d6ec4b5c6729d990b1a5fe306ee8edd8(escalated to the full panel: Q1 delta guard forces the full panel)
| Seat | Family | Role | Status | Verdict | Findings | Latency |
|---|---|---|---|---|---|---|
seat1 |
claude-frontier-thinking |
tcb_and_api_critic |
completed |
clean |
0 | 715s |
seat2 |
gemini-frontier-thinking |
tcb_and_spec_critic |
completed |
clean |
0 | 1253s |
seat3 |
gemini-executable-falsifier |
sandboxed_probe_runner |
completed |
clean |
0 | 1492s |
No unresolved P0-P2 findings raised across completed seats.
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] (ci/check_guard_mutation.py:141): No Review Receipt with a Human review surface block was among the staged artifacts; the commit/PR body does disclose the NON_GUARD barrel relaxation and its enforcement.G2-R2-A02[P3] (ci/check_guard_mutation.py:5050): _collect_fixture_semantics_imports only follows imports that are BASELINE semantics modules or fixture files, so a fixture importing the Trusted.MirSemantics umbrella (or another trusted module re-exporting semantics) would bypass the stale-downstream check.G2-R2-A03[P3] (ci/fixtures/guard_mutation/StepPlacesSanity.lean:96): Stale copy-paste section banner references Bytes.lean inside StepPlacesSanity.lean (and similarly at ci/fixtures/guard_mutation/StepRvaluesSanity.lean:97).G2-R2-A04[P3] (ci/fixtures/guard_mutation/StepRvaluesSanity.lean:152): alloc_sanity_box_as_ref duplicates step_rvalues_sanity_basic verbatim in the same sanity module.G2-R2-A05[P3] (ci/test_check_guard_mutation.py:292):GuardMutationUnitTests.test_barrel_semantics_modules_must_be_declaration_freecallsbarrel.write_text(...)ontrusted/lean/Trusted/MirSemantics/Step.leaninside a directory copied viashutil.copytreein_create_isolated_extract_anneal_rootwithout ensuring owner write permissions (chmod u+w). On read-only source checkouts (0444), the test fails withPermissionError: [Errno 13] Permission denied(Ran 1 test in 0.069s,ERROR); addingchmodu+wonbarrelmakes the test pass (Ran 1 test in 1.193s,OK). Standard0644checkouts andcheck_guard_mutation.pyitself are unaffected.G2-R2-A06[P3] (trusted/lean/Trusted/MirSemantics/Step.lean:1): Two out-of-diff comments still point at Step.lean for Profile v1 rules now located in Step/V1Core.lean (theory/Anneal/SafeTwin/Equiv.lean:60, docs/trust-model.md:739).
Executed Sandbox Probes
seat1bwrap: validate_catalog_invariants(lean_only=True) on candidate: outcome=0 errorsseat1bwrap: _validate_declaration_free_barrel sensitivity (attribute/open/set_option/public meta import/doc+def): outcome=all rejected; nested-comment and trailing line-comment cases correctly acceptedseat1bwrap: append 'def rogue' to barrel then validate: outcome=1 error 'non-barrel statement forbidden' (guard is live)seat1bwrap: ci/generate_semantics_profile_card.py --check: outcome=OK content_sha256=3cdcc40d...seat1bwrap: unittest leaf_decoupled/barrel/invariants/semantics_modules: outcome=3 tests OKseat3Mandatory.github/workflows/*.ymlpermissions/auth/secret-containment checklist: outcome=inapplicableseat3Repo-wide static hygiene &sha256sum --check --strict trusted/root-manifest.sha256(bwrap): outcome=passedseat3``Step.lean-> 7Step/*.lean` AST declaration parity & tactic-freedom (`bwrap`)`: outcome=`passed`seat3Guard-mutation TOML catalog,SEMANTICS_DOWNSTREAMclosure,needs_wf_helper, & barrel adversarial probes (bwrap): outcome=passedseat3Fast static CI scripts (bwrap): outcome=passedseat3``ci/test_render_correspondence_provenance.py,test_check_phase0_tripwires.py`, `GuardMutationShardTests`, and 8 sibling `ci/test_*.py` suites (`bwrap`)`: outcome=`passed`seat3``test_check_guard_mutation.GuardMutationUnitTests(bwrap`)`: outcome=`partial`seat3Pinned Leanv4.35.0,anneal-audit, andcargo testcompilation: outcome=not_executed
1356c40 to
54ebd51
Compare
|
🤖 Review Receipt for PR #176 ( Comparison Tuple
Rebase & Pre-PR Gate-1 Hardening Summary
Human review surface
Verification (
|
Reduce guard-mutation compile cones and eliminate shared-file edit collisions across `Trusted.MirSemantics.Step` and `ci/fixtures/guard_mutation/StepRefutations.lean`: - Split `trusted/lean/Trusted/MirSemantics/Step.lean` into seven acyclic submodules under `trusted/lean/Trusted/MirSemantics/Step/` (`V1Core`, `PlacesV2`, `CoreDispatchV2`, `RvaluesV2`, `AssignV2`, `CallsTermV2`, `EvalStep`) behind a `public import` stability barrel at `Step.lean`, preserving all `Trusted.MirSemantics.*` definitions, constant names, and types verbatim with zero behavioral changes and zero edits to downstream `.lean` proof consumers. - Register all seven `Step/*.lean` submodules in `TRUSTED_BUNDLE_SOURCES` (`trusted/cargo-anneal/src/trusted_bundle.rs`), regenerate `docs/semantics/PROFILE_CARD.md`, update the `trusted_lean` inventory count assertion (`35 -> 42`) in `ci/test_render_correspondence_provenance.py`, update `LeanDagSpec` in `tests/differential/src/lean_runner.rs` and `tests/itree_diff/src/lean_trace_runner.rs`, and repoint `Step.lean` references in `tools/anneal-corpus-scan/canonical_taxonomy_v1.json` and `tools/anneal-mir-eval/src/eval.rs`. - Decouple leaf refutations (Phase 0a/0b): split `StepRefutations.lean` into seven domain refutation modules, migrate non-`Step` refutations and canaries to their owning fixtures (`CoreContractsRefutations`, `AllocRefutations`, `BytesRefutations`, `EnumRefutations`, `StateRefutations`), introduce dedicated leaf sanity fixtures (`StepPlacesSanity`, `StepCoreDispatchSanity`, `StepRvaluesSanity`, `StepAssignSanity`, `CoreContractsSanity`, `AllocContractsSanity`), and prune `SEMANTICS_DOWNSTREAM` to singleton mutant rebuild cones for `CoreContracts`, `AllocContracts`, `Step/PlacesV2`, `Step/CoreDispatchV2`, `Step/RvaluesV2`, and `Step/AssignV2`. - Split `ci/guard_mutation/mir_step.toml` into seven per-cluster TOML shards (`mir_step_*.toml`) while keeping the existing TOML guard catalog format intact, and update `ci/check_guard_mutation.py`, `ci/test_check_guard_mutation.py`, and `docs/trust/auditing-and-comparator.md` for recursive module discovery, singleton-cone enforcement, and the seventeen guard-bearing `Trusted/MirSemantics/` modules. - Rule-relaxation disclosure: add `Trusted/MirSemantics/Step` to `NON_GUARD_SEMANTICS_MODULES` in `ci/check_guard_mutation.py` because `Step.lean` is now a pure `public import` stability barrel with zero declarations while all seven `Step/*.lean` submodules carry active guard-mutation coverage. To ensure guard logic can never silently land in the exempted barrel, register `Trusted/MirSemantics/Step` in `BARREL_SEMANTICS_MODULES` and enforce in `validate_catalog_invariants` (with negative unit tests in `ci/test_check_guard_mutation.py`) that every barrel module contains only comments, `module`/`prelude` headers, and `import`/`public import` directives. Agent-authored-by: AI agent acting on joshlf's behalf
|
🤖 Review Receipt for PR #176 ( Comparison Tuple
Rebase & Pre-PR Gate-1 Summary
Human review surface
Verification (
|
54ebd51 to
53ea8d1
Compare
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 — CLEAN (tier2a_core_tcb, Round 3)
- Identity:
multi:cf1cd6e064db3ee9037c393c3be01a17510632f1:53ea8d1e5a9d78a65dcc1cdd1eab0e92df180405(base=cf1cd6e064db,head=53ea8d1e5a9d,tree=d038b887f6af) - Separation:
author_family=agentvs.reviewer_family=multi - Coverage: 58 inspected, 0 inapplicable, 0 blocked (of 58 changed file(s))
- Review mode:
delta_escalatedrelative to the prior Gate 2 review at head1356c40f206b77dae97352c8d0bc44caa76cb862(escalated to the full panel: Q1 delta guard forces the full panel)
| Seat | Family | Role | Status | Verdict | Findings | Latency |
|---|---|---|---|---|---|---|
seat1 |
claude-frontier-thinking |
tcb_and_api_critic |
completed |
clean |
0 | 968s |
seat2 |
gemini-frontier-thinking |
tcb_and_spec_critic |
completed |
clean |
0 | 970s |
seat3 |
gemini-executable-falsifier |
sandboxed_probe_runner |
completed |
clean |
0 | 1454s |
No unresolved P0-P2 findings raised across completed seats.
Non-blocking advisories (P3, not Gate 2 findings)
These notes do not block merge and do not require another Gate 2 round.
G2-R3-A01[P3] (ci/fixtures/guard_mutation/StepCoreDispatchRefutations.lean:1): 26 refutations were rewritten from end-to-end checks (evalStepV2/evalTerminatorV2) to leaf-level checks, so they no longer show a guard is observable end to end.G2-R3-A02[P3] (ci/fixtures/guard_mutation/StepPlacesSanity.lean:96): Leftover section-banner comment copied from ProfileV2Refutations.lean labels StepPlacesSanity and StepRvaluesSanity canaries as Bytes.lean guards.G2-R3-A03[P3] (ci/scripts/scaffold_mir_gap.py:18): The commit/PR body doesn't list the scaffold_mir_gap.py and test_scaffold_mir_gap.py changes (removed mir_step.toml fallback, new sanity_module/needs_wf_helper fields).G2-R3-A04[P3] (global): While the six newly added leaf *Sanity.lean fixtures defineemptyMemoryexplicitly, pre-existing references to unboundemptyMemory/emptyCallerMemory(relying on LeanautoImplicitwhen_compile_moduleomits-DautoImplicit=false) remain in StepCallsTermRefutations.lean, StepV1Refutations.lean, and BytesRefutations.lean. Pre-existing non-regression.
Executed Sandbox Probes
seat3repo_hygiene_and_workflow_checklist: outcome=passedseat3root_manifest_sha256: outcome=passedseat3profile_card_tripwires_lockstep_tcb_metrics: outcome=passedseat3step_submodule_equivalence_dag_bundle: outcome=passedseat3guard_catalog_migration_and_barrel_bypass: outcome=passedseat3fixture_theorem_migration_and_sensitivity: outcome=passedseat3mir_total_dag_and_cross_file_refs: outcome=passedseat3python_ci_unit_tests_bwrap: outcome=passed
|
Authored by an AI agent acting on joshlf's behalf. Posted |
Reduce guard-mutation compile cones and eliminate shared-file edit collisions across
Trusted.MirSemantics.Stepandci/fixtures/guard_mutation/StepRefutations.lean:trusted/lean/Trusted/MirSemantics/Step.leaninto seven acyclic submodules undertrusted/lean/Trusted/MirSemantics/Step/(V1Core,PlacesV2,CoreDispatchV2,RvaluesV2,AssignV2,CallsTermV2,EvalStep) behind apublic importstability barrel atStep.lean, preserving allTrusted.MirSemantics.*definitions, constant names, and types verbatim with zero behavioral changes and zero edits to downstream.leanproof consumers.Step/*.leansubmodules inTRUSTED_BUNDLE_SOURCES(trusted/cargo-anneal/src/trusted_bundle.rs), regeneratedocs/semantics/PROFILE_CARD.md, update thetrusted_leaninventory count assertion (35 -> 42) inci/test_render_correspondence_provenance.py, updateLeanDagSpecintests/differential/src/lean_runner.rsandtests/itree_diff/src/lean_trace_runner.rs, and repointStep.leanreferences intools/anneal-corpus-scan/canonical_taxonomy_v1.jsonandtools/anneal-mir-eval/src/eval.rs.StepRefutations.leaninto seven domain refutation modules, migrate non-Steprefutations and canaries to their owning fixtures (CoreContractsRefutations,AllocRefutations,BytesRefutations,EnumRefutations,StateRefutations), introduce dedicated leaf sanity fixtures (StepPlacesSanity,StepCoreDispatchSanity,StepRvaluesSanity,StepAssignSanity,CoreContractsSanity,AllocContractsSanity), and pruneSEMANTICS_DOWNSTREAMto singleton mutant rebuild cones forCoreContracts,AllocContracts,Step/PlacesV2,Step/CoreDispatchV2,Step/RvaluesV2, andStep/AssignV2.ci/guard_mutation/mir_step.tomlinto seven per-cluster TOML shards (mir_step_*.toml) while keeping the existing TOML guard catalog format intact, and updateci/check_guard_mutation.py,ci/test_check_guard_mutation.py, anddocs/trust/auditing-and-comparator.mdfor recursive module discovery, singleton-cone enforcement, and the seventeen guard-bearingTrusted/MirSemantics/modules.Trusted/MirSemantics/SteptoNON_GUARD_SEMANTICS_MODULESinci/check_guard_mutation.pybecauseStep.leanis now a purepublic importstability barrel with zero declarations while all sevenStep/*.leansubmodules carry active guard-mutation coverage. To ensure guard logic can never silently land in the exempted barrel, registerTrusted/MirSemantics/StepinBARREL_SEMANTICS_MODULESand enforce invalidate_catalog_invariants(with negative unit tests inci/test_check_guard_mutation.py) that every barrel module contains only comments,module/preludeheaders, andimport/public importdirectives.Authored by an AI agent acting on joshlf's behalf.