Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions .github/workflows/cbz-source514-hosted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,25 @@ jobs:
print('RETAINED_ORIGINAL_RED_STREAM',item.filename)
print(archive.read(item).decode('utf-8'))
PY
- name: Verify recorder contracts and all three reason-bound source mutations
- name: Retain exact 99-module census overlap RED
env:
GH_TOKEN: ${{ github.token }}
run: |
gh api repos/d6g8k5htny-coder/Math-/actions/artifacts/12931294592/zip > "$RUNNER_TEMP/cbz-source514-overlap-original-red.zip"
python - "$RUNNER_TEMP/cbz-source514-overlap-original-red.zip" <<'PY'
import hashlib,sys,zipfile
raw=open(sys.argv[1],"rb").read()
if hashlib.sha256(raw).hexdigest() != "80da0006a541b084df5a939c6a032bb41a6e180058f3250f7489c6179fccaeee":
raise SystemExit("original overlap RED artifact hash mismatch")
with zipfile.ZipFile(sys.argv[1]) as archive:
matches=[n for n in archive.namelist() if n.endswith("independent-compiled-census.stdout")]
if len(matches)!=1: raise SystemExit("missing or ambiguous original census stdout")
original=archive.read(matches[0]).decode("utf-8")
marker="code-generator metadata unexpectedly has a kernel declaration: _private.SourceFourierSeries.0.I4Source.modeCoefficient.match_1.splitter"
if marker not in original: raise SystemExit("original overlap failure not present")
print("ORIGINAL_OVERLAP_RED",marker)
PY
- name: Verify recorder contracts and all ten reason-bound source mutations
run: |
python -B -S tools/cbz_source514_mutations.py --output "$RUNNER_TEMP/cbz-source514-recorder-tests"
- name: Obtain immutable mathematical source
Expand Down Expand Up @@ -96,7 +114,7 @@ jobs:
cd "$GITHUB_WORKSPACE"
python -B -S replay/cbz/evidence/kernel/additional/replay-tool/run_lean_selftest.py --lean "$LEAN_BIN" --collector collector/formal/gate_helper.py --collector-sha256 ff8a5374597772b2d37054fd722c2243c4b552a63802c69f7c605519832be6c4 --output "$RUNNER_TEMP/cbz-source514-lean-selftest-normal"
python -B -S -O replay/cbz/evidence/kernel/additional/replay-tool/run_lean_selftest.py --lean "$LEAN_BIN" --collector collector/formal/gate_helper.py --collector-sha256 ff8a5374597772b2d37054fd722c2243c4b552a63802c69f7c605519832be6c4 --output "$RUNNER_TEMP/cbz-source514-lean-selftest-optimized"
- name: Build exact 92 modules and replay complete owned proof closure into an empty kernel
- name: Build exact 99 modules and replay complete owned proof closure into an empty kernel
run: |
python -B -S tools/cbz_source514_hosted.py --source candidate --replay replay --collector collector --plan cbz/source514-hosted/domain.json --output "$RUNNER_TEMP/cbz-source514-observation" --carrier . --carrier-head "${{ github.sha }}"
- name: Preserve every raw result and source, including unsuccessful attempts
Expand Down
26 changes: 21 additions & 5 deletions cbz/source514-hosted/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Frozen source514 qualification

This narrow execution carrier serves CBZ criteria3,6,7,9 and11. It does not change mathematical sources or claim a federation baseline. The historical PR514 source is checked out at86c00d4c08c6c2af0529ec1744693de3ca6ac6e4; all67 production and25 consumed support modules are built serially. The seven unconsumed elder source copies remain preserved and outside this proof-closure claim.
This narrow execution carrier serves CBZ criteria3,6,7,9 and11. It does not change mathematical sources or claim a federation baseline. The historical PR514 source is checked out at86c00d4c08c6c2af0529ec1744693de3ca6ac6e4; all 67 production, 25 derivative-support and seven actually imported elder modules are built serially and included in source binding and the owned-declaration census. Model application and premise inhabitation remain outside the claim.

`tools/cbz_source514_hosted.py` reuses the published self-tested bounded Lean replay generator from main66c54f8c161c3af467e5d1d715066c96b3a0561b and the existing C297 raw execution recorder from Math8151f592918a845bf19eb8eafaf8444540a32734. The collector's full SHA256 isff8a5374597772b2d37054fd722c2243c4b552a63802c69f7c605519832be6c4. Source HEAD and exact working bytes are compared with immutable Git blobs before and after execution, including files hidden by assume-unchanged flags. Every dependency additionally binds the exact complete index, working modes and bytes to the frozen tree; visible untracked paths and ignored Lean shadows outside .lake are rejected. All actual owned and dependency olean/ilean/dynamic-library objects are bound before and after census and kernel replay. Locked dependencies with no compiled object directory are recorded explicitly as absent; their later appearance also fails the stability check. Loaded recorder/tool bytes are hashed before compilation and executed from those same immutable bytes. The registered67+25 domain must equal the frozen TOML. Loaded launcher bytes are compiled from an immutable Git blob and compared with its declared source identity; the plan is parsed from the same immutable bytes whose identity is recorded. Both carrier inputs are rebound after execution.
`tools/cbz_source514_hosted.py` reuses the published self-tested bounded Lean replay generator from main66c54f8c161c3af467e5d1d715066c96b3a0561b and the existing C297 raw execution recorder from Math8151f592918a845bf19eb8eafaf8444540a32734. The collector's full SHA256 isff8a5374597772b2d37054fd722c2243c4b552a63802c69f7c605519832be6c4. Source HEAD and exact working bytes are compared with immutable Git blobs before and after execution, including files hidden by assume-unchanged flags. Every dependency additionally binds the exact complete index, working modes and bytes to the frozen tree; visible untracked paths and ignored Lean shadows outside .lake are rejected. All actual owned and dependency olean/ilean/dynamic-library objects are bound before and after census and kernel replay. Locked dependencies with no compiled object directory are recorded explicitly as absent; their later appearance also fails the stability check. Loaded recorder/tool bytes are hashed before compilation and executed from those same immutable bytes. The registered 67+25+7 domain must equal the frozen TOML and exact elder roots. Loaded launcher bytes are compiled from an immutable Git blob and compared with its declared source identity; the plan is parsed from the same immutable bytes whose identity is recorded. Both carrier inputs are rebound after execution.

The independent census enumerates compiled module-table constants (with all code-generator ownership metadata explicitly recorded outside the kernel census), records every owned constant's literal type, kind and source-range origin, and is compared with the replay program's separate full environment ownership enumeration. The existing verified program checks every selected module, every owned declaration and its complete transitive type/value closure, rejects unsafe/partial constants and nonstandard axioms, and calls pinned Lean4.34.1's empty trust-level-zero Kernel.Environment.replay. Only Classical.choice, Quot.sound and propext are admitted. Mathematical model adequacy, satisfiability of all hypotheses and prose applications are outside this claim.

Run the recorder contracts and all three source mutations in both Python modes:
Run the recorder contracts and all ten source mutations in both Python modes:

```sh
python3.11 -B -S tools/cbz_source514_mutations.py --output /new/recorder-selftest
```

The45 finite contract cases include dirty bytes under assume-unchanged, valid-but-different Git heads, loaded-code identity, missing/reordered/duplicate domain entries and malformed/incomplete compiled censuses. The mutation threshold is100% of three uniquely anchored source guard removals in both Python modes, requiring the named assertion failure; launch/import/syntax failures do not count as kills. The workflow also runs the original replay reader's31 cases and three source mutants, followed by its actual Lean positive/adverse fixtures and six generated-auditor mutants in both modes before any package admission.
The finite contract cases include dirty bytes under assume-unchanged, valid-but-different Git heads, loaded-code identity, missing/reordered/duplicate domain entries and malformed/incomplete compiled censuses. The mutation threshold is100% of ten uniquely anchored source guard removals in both Python modes, requiring the named assertion failure; launch/import/syntax failures do not count as kills. The workflow also runs the original replay reader's31 cases and three source mutants, followed by its actual Lean positive/adverse fixtures and six generated-auditor mutants in both modes before any package admission.

Prepare clean source/replay/collector checkouts at the above exact commits, install the package's pinned Lean/Mathlib dependencies, then run:

Expand All @@ -28,4 +28,20 @@ Preserved test-first RED: b841fcc18ad7ebbe136ff7d237c8b61455e8e02f, native run40

Additional observed RED: native run40946268822/job123702332184 at source787ad73c42805155a50afca5a30b02e48e39726e ran43 cases and observed one real Git-replacement false acceptance plus one inherited-GIT_DIR redirect error. The repair reuses main701's no-replacement/sanitized-Git environment pattern for every command, including cat-file batch. Existing fixed-scope guard mutation thresholds are unchanged.

Original all92-module build: run40943603468/job123693053386 compiled every selected module with exit0. Its census then failed because it demanded a kernel declaration for `_private.SourceFourierSeries.0.I4Source.modeCoefficient.match_1.splitter._boxed`. Pinned Lean4.34.1's `ModuleData` explicitly defines extraConstNames as code-generator ownership metadata absent from the ConstantInfo mapping. The repaired census retains and prints every such extra name as NON_KERNEL_CODE_GENERATOR_OWNERSHIP and fails if it unexpectedly has a kernel declaration. Every actual kernel declaration remains checked by the independent full module-table census and the separate complete environment ownership enumeration; no mathematical theorem, bound, failed proof or test is dropped. The original failed diagnostic stream is retained, checksum-verified and printed by subsequent hosted attempts. This is a precise kernel/IR boundary, not a weakened proof obligation.
Original all92-module build: run40943603468/job123693053386 compiled every selected module with exit0. Its census then failed because it demanded a kernel declaration for `_private.SourceFourierSeries.0.I4Source.modeCoefficient.match_1.splitter._boxed`. Pinned Lean4.34.1 uses `extraConstNames` for additional code-generator ownership metadata; some such names have no kernel declaration while others overlap real declarations. That old census wrongly required every extra name to be non-kernel; the later 99-module run disproved this assumption. The revised carrier is designed to compare every selected actual kernel declaration with the separate environment ownership enumeration; no mathematical theorem, bound, failed proof or test is dropped. The original failed diagnostic stream is retained, checksum-verified and printed by subsequent hosted attempts. This is a precise kernel/IR boundary, not a weakened proof obligation.

## Corrected source and object boundary

Independent review showed that seven SourceElderInputs roots are transitively imported by the production modules. The previous 92-module report omitted those source bindings and their owned-module census; prior runs remain historical and do not certify complete source custody. The revised carrier binds and replays all 99 roots and rejects symlinked compiled-object roots, ancestors, and nested entries. Inherited LEAN_PATH and LEAN_SRC_PATH are removed before execution. The in-memory Python 3.11 normal-mode adverse fixture run observed 10 failures among 16 tests on the prior source and no errors; the exact source and raw output are retained in this directory. A subsequent 16-case normal-mode run on the candidate before the separate environment-guard addition observed exit0; it is not a full suite or kernel qualification. Fresh native tests, all ten mutations in both modes and actual 99-module replay remain required. Observation recorded 2026-10-29 20:36:47 UTC.

## Real kernel declarations that overlap code-generator metadata

The 99-module run 40950630609 built all 99 modules, then failed its census on `_private.SourceFourierSeries.0.I4Source.modeCoefficient.match_1.splitter`, a real declaration also listed as code-generator ownership metadata. Its original artifact 12931294592 is retained and checked against SHA-256 `80da0006a541b084df5a939c6a032bb41a6e180058f3250f7489c6179fccaeee`. No full replay passed in that run.

The revised census scans all loaded module declaration tables for the actual owner of each selected extra name and distinguishes true non-kernel metadata from overlaps. It refuses missing or ambiguous provenance; repeated metadata names in different modules are recorded as distinct module/name pairs. An overlap owned by a selected module must occur exactly once in that module's kernel census. External overlaps are recorded without promotion.

The replay program now enumerates environment declarations against unique selected-declaration table ownership rather than `getModuleIdxFor?`, whose map also consumes code-generator metadata. The original pinned collector and generated program's proof-closure/kernel logic remain unchanged, and both the original and corrected program hashes will be recorded when execution is observed. The updated workflow includes an actual frozen SourceFourierSeries overlap fixture, a positive kernel replay, and an omitted-seed mutation requiring the specific count-mismatch rejection. New Python source mutations cover ambiguous/missing overlap handling and the replay replacement anchor. All tests, actual fixture execution, 99-module replay and downloaded artifact verification remain pending until observed on the corrected head.

Repeated metadata for the same name must agree on classification, unique declaring module and the observed map owner, while different module/name pairs remain separately recorded. Replay rejects ambiguity involving a selected declaration; unrelated external duplicate tables do not prevent admission of the selected domain. This correction is pending actual execution and artifact validation.

Before labeling any overlap as a kernel declaration, the generated census also requires its name in Lean's checked kernel environment. An actual Lean inverse-guard mutation must refuse a real fixture overlap with the exact kernel-presence diagnostic; this control is pending execution along with the rest of the candidate.
11 changes: 10 additions & 1 deletion cbz/source514-hosted/domain.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,14 @@
],
"schema": "cbz-source514-exact-domain-v1",
"source_commit": "86c00d4c08c6c2af0529ec1744693de3ca6ac6e4",
"boundary": "67 registered production modules plus exactly25 consumed support modules; inputs/elder/{SuperlevelBar,ElderClearance,ReusedCompactFrontier,ClosedSuperlevel,OrdinaryH0,ElderInterval,ElderBridge}.lean are preserved but not imported by any production module and have no proof-closure admission in this run."
"boundary": "67 registered production modules plus exactly 25 SourceDerivativeInputs and 7 SourceElderInputs modules, including the consumed elder import chain. Model application and premise inhabitation are outside this literal replay.",
"elder": [
"SuperlevelBar",
"ElderClearance",
"ReusedCompactFrontier",
"ClosedSuperlevel",
"OrdinaryH0",
"ElderInterval",
"ElderBridge"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
test_complete_registered_domain (isolated_test.RegisteredDomainTests.test_complete_registered_domain) ... ok
test_duplicate_modules_rejected (isolated_test.RegisteredDomainTests.test_duplicate_modules_rejected) ... ok
test_elder_source_directory_is_exact (isolated_test.RegisteredDomainTests.test_elder_source_directory_is_exact) ... ok
test_missing_imported_elder_source_rejected (isolated_test.RegisteredDomainTests.test_missing_imported_elder_source_rejected) ... ok
test_missing_source_rejected (isolated_test.RegisteredDomainTests.test_missing_source_rejected) ... ok
test_omitted_registered_elder_root_rejected (isolated_test.RegisteredDomainTests.test_omitted_registered_elder_root_rejected) ... ok
test_plan_and_configuration_cannot_jointly_omit_elder_root (isolated_test.RegisteredDomainTests.test_plan_and_configuration_cannot_jointly_omit_elder_root) ... ok
test_plan_and_configuration_cannot_replace_elder_root (isolated_test.RegisteredDomainTests.test_plan_and_configuration_cannot_replace_elder_root) ... ok
test_reordered_domain_rejected (isolated_test.RegisteredDomainTests.test_reordered_domain_rejected) ... ok
test_dangling_nested_symlink_is_rejected (isolated_test.CompiledObjectCustodyTests.test_dangling_nested_symlink_is_rejected) ... ok
test_dependency_object_change_rejected_while_owned_object_is_stable (isolated_test.CompiledObjectCustodyTests.test_dependency_object_change_rejected_while_owned_object_is_stable) ... ok
test_dependency_object_root_appearance_is_rejected (isolated_test.CompiledObjectCustodyTests.test_dependency_object_root_appearance_is_rejected) ... ok
test_symlinked_build_ancestor_is_rejected (isolated_test.CompiledObjectCustodyTests.test_symlinked_build_ancestor_is_rejected) ... ok
test_symlinked_build_root_is_rejected (isolated_test.CompiledObjectCustodyTests.test_symlinked_build_root_is_rejected) ... ok
test_symlinked_nested_directory_is_rejected (isolated_test.CompiledObjectCustodyTests.test_symlinked_nested_directory_is_rejected) ... ok
test_unused_dependency_object_root_absence_is_explicit (isolated_test.CompiledObjectCustodyTests.test_unused_dependency_object_root_absence_is_explicit) ... ok

----------------------------------------------------------------------
Ran 16 tests in 0.030s

OK
Loading
Loading