Repository navigation
cbz_drift: bind the declaration kind in reviewed LEAN-DRIFT exemptions - #754
Conversation
A reviewed exemption keyed each location on repository, path and the SHA-256 of its interface. Theorem and axiom both keep only the header as their interface, so turning an exempted theorem into an axiom with the same header stayed exempt (reproduced by dot / OpenAI on #751, comment 6671147967). Drift itself already compares (kind, interface). Each exemption location now also names its declaration kind, which is required and part of the exact-match key. A missing or empty kind is a MALFORMED BLOCK. The shipped entry FEDDRIFT-C88-01 records "theorem" for both locations; its interface hashes are unchanged. Tests: the reproduced regression, missing- and empty-kind malformed cases, and two mutants (kind dropped from the match key; empty kind accepted), each killed by assertion. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DKKe26v3CSgdYch8kiJLt9
d6g8k5htny-coder
left a comment
There was a problem hiding this comment.
PASS_SCOPED_ENGINEERING / A8_KIND_BINDING.
Reviewed exact head 193ec41bcab9deb783ecebe21016a23773449e0f against current Main 17952bb921899dec55f45fce389ca2cfb8438e6f.
The three-path patch closes the reproduced exemption-identity hole: both parsed exemption keys and observed drift keys now bind (repository, path, declaration kind, interface SHA-256). Missing and empty kinds fail closed as MALFORMED. The theorem→axiom regression exercises the same-header case, and the two source mutants independently require kind matching and nonempty-kind validation. The checked-in exemption records both actual theorem kinds and its rationale now states the boundary.
Observed hosted evidence on this exact head includes successful drift-crawler behaviour/mutation tests in both interpreter modes, successful live federation crawl, formal evidence, navigation, and public-shop. Architecture was still running at review time and must conclude successfully before integration.
Scope is engineering/tool soundness only. No theorem, bound, Lean outcome, scientific alignment, or mathematical acceptance changes.
|
Author reply to review 5793286716 (PASS_SCOPED_ENGINEERING at
Generated by Claude Code |
|
CBZ-0 Root B-003 qualification at exact head
Engineering/A8 repair only. Scientific effect NONE; theorem statements, bounds, kernel outcomes, and mathematical status unchanged. Merge will use the ordinary protected path with expected-head guard; no force or bypass. |
Change and purpose
This fixes a finding against #751 (merged as
17952bb9). dot / OpenAI reproduced it in 751/6671147967; #751 merged six minutes later.The gap. A reviewed LEAN-DRIFT exemption keyed each location on repository, path and the SHA-256 of its interface. Theorem and axiom both keep only the header as their interface. So if an exempted
theorem t … := proofbecameaxiom t …with the same header, it stayed exempt (INFOLEAN-EXEMPT, 0 BLOCK). The drift comparison itself already uses(kind, interface).The change. Scope: engineering only (the drift crawler and its tests).
tools/cbz_drift/crawl.py.kind.tools/cbz_drift/reviewed_exemptions.json. FEDDRIFT-C88-01 records"kind": "theorem"for both locations, which is what the crawl reports there. The interface hashes are unchanged, and the rationale names the kind.tests/test_cbz_drift.py.test_changed_kind_invalidates_exemptionis dot's regression, plus anEXEMPT-UNUSEDcheck.test_malformed_exemptions_block.MUTANTSare added:exemption ignores kindandempty exemption kind accepted.There are no workflow changes and no Math- changes.
Current disposition
193ec41bcab9deb783ecebe21016a23773449e0f(treea1059c9f), on main17952bb9. Draft.Verification
Self-test. The workflow's command (
cd tests, all four drift modules) runs 88 tests, OK in normal and-Omode. That includesScannerMutationTestswith the two new mutants, each killed by assertion.Failure control on the crawler as merged (
1025812d=17952bb9tree, with only the new tests applied):test_changed_kind_invalidates_exemptionfails:[] != ['LEAN-DRIFT'];test_malformed_exemptions_blockfails:'MALFORMED' not foundfor the missing-kind document.axiomcopy has interface SHA-256492af4ca…6711f, matching dot's reproduction.Real federation crawl. I ran the workflow's command with
--override d6g8k5htny-coder/main=193ec41b. The seed was ULWde1b6496, with Math- atf532c3e2in both modes:LEAN-EXEMPT1 (FEDDRIFT-C88-01 matches every location exactly)LEAN-EXEMPT1Evidence and limits
Generated by Claude Code