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
120 changes: 120 additions & 0 deletions .github/workflows/cbz-source514-hosted.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: CBZ source514 frozen kernel qualification
'on':
pull_request:
paths:
- '.github/workflows/cbz-source514-hosted.yml'
- 'tools/cbz_source514_hosted.py'
- 'tools/cbz_source514_mutations.py'
- 'tests/test_cbz_source514_hosted.py'
- 'cbz/source514-hosted/**'
workflow_dispatch:
permissions:
contents: read
actions: read
concurrency:
group: cbz-source514-${{ github.sha }}
cancel-in-progress: false
jobs:
source514-frozen-kernel:
runs-on: ubuntu-24.04
timeout-minutes: 120
env:
LEAN_NUM_THREADS: '2'
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0
with:
python-version: '3.11.16'
- name: Read retained raw RED streams from the original native artifacts
env:
GH_TOKEN: ${{ github.token }}
run: |
gh api repos/d6g8k5htny-coder/Math-/actions/artifacts/12929346355/zip > "$RUNNER_TEMP/source514-original-census-red.zip"
gh api repos/d6g8k5htny-coder/Math-/actions/artifacts/12928801439/zip > "$RUNNER_TEMP/source514-original-recorder-red.zip"
python - "$RUNNER_TEMP/source514-original-census-red.zip" "$RUNNER_TEMP/source514-original-recorder-red.zip" <<'PY'
import hashlib,sys,zipfile
expected=['e4602537b4b8e8929a63fb2ca316f4a5b4c10b9606d1dd54379511b54f81e586','6b655de27b769e1968a36d40e87ee376730efe778cd77068a4fdfd3321231a37']
for filename,wanted in zip(sys.argv[1:],expected):
data=open(filename,'rb').read()
if hashlib.sha256(data).hexdigest()!=wanted:
raise ValueError('original RED artifact digest differs')
with zipfile.ZipFile(filename) as archive:
for item in archive.infolist():
if item.filename.endswith(('independent-compiled-census.stdout','independent-compiled-census.stderr','normal-baseline.stderr')):
if item.file_size>1048576:
raise ValueError('unexpected diagnostic stream size')
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
run: |
python -B -S tools/cbz_source514_mutations.py --output "$RUNNER_TEMP/cbz-source514-recorder-tests"
- name: Obtain immutable mathematical source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
repository: d6g8k5htny-coder/Math-
ref: 86c00d4c08c6c2af0529ec1744693de3ca6ac6e4
path: candidate
persist-credentials: false
- name: Obtain already-qualified replay tool and its complete self-tests
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
repository: d6g8k5htny-coder/main
ref: 66c54f8c161c3af467e5d1d715066c96b3a0561b
path: replay
sparse-checkout: cbz/evidence/kernel/additional/replay-tool
persist-credentials: false
- name: Obtain immutable collector and established phase recorder
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
repository: d6g8k5htny-coder/Math-
ref: 8151f592918a845bf19eb8eafaf8444540a32734
path: collector
sparse-checkout: |
formal
frontiers/regular_superlevel_geometry_20261020
persist-credentials: false
- name: Verify original Python replay reader and its source mutations
run: |
python -B -S replay/cbz/evidence/kernel/additional/replay-tool/run_mutations.py --output "$RUNNER_TEMP/cbz-source514-replay-python-tests"
- name: Install exact Lean and pinned Mathlib dependency cache
uses: leanprover/lean-action@24581d74d674803a25a81b10b059c5c0cdd344c6
with:
lake-package-directory: candidate/frontiers/source_derivative_gaussian_20261025
auto-config: 'false'
build: 'false'
test: 'false'
lint: 'false'
use-mathlib-cache: 'true'
use-github-cache: 'false'
- name: Actual Lean adverse fixtures and all six generated-auditor mutants in both modes
run: |
cd candidate/frontiers/source_derivative_gaussian_20261025
LEAN_BIN="$(lake env which lean)"
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
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
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
with:
name: cbz-source514-${{ github.run_id }}-${{ github.run_attempt }}
path: |
${{ runner.temp }}/cbz-source514-*
candidate/frontiers/source_derivative_gaussian_20261025/*.lean
candidate/frontiers/source_derivative_gaussian_20261025/inputs/**/*.lean
candidate/frontiers/source_derivative_gaussian_20261025/lakefile.toml
candidate/frontiers/source_derivative_gaussian_20261025/lake-manifest.json
candidate/frontiers/source_derivative_gaussian_20261025/lean-toolchain
cbz/source514-hosted/domain.json
tools/cbz_source514_hosted.py
tools/cbz_source514_mutations.py
tests/test_cbz_source514_hosted.py
include-hidden-files: true
if-no-files-found: error
retention-days: 90
31 changes: 31 additions & 0 deletions cbz/source514-hosted/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 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.

`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.

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:

```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.

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

```sh
python3.11 -B -S tools/cbz_source514_hosted.py --source /path/to/source --replay /path/to/replay --collector /path/to/collector --plan cbz/source514-hosted/domain.json --output /new/actual-observation --carrier /path/to/carrier --carrier-head <exact-carrier-commit>
```

The equivalent hosted command is `.github/workflows/cbz-source514-hosted.yml`. Its artifacts retain actual source identities, program hashes, compiled object hashes, runtime/dependency identities, literal census/types, raw stdout/stderr, every observed exit and timestamps, and failure reports. No console tee is placed inside a log set it hashes. The Python transcript validator states that it does not authenticate executions or verify Lean proofs; the native execution and source/runtime bindings are required evidence.

Initial state: NOT_RUN. Native hosted results must be observed and all artifact hashes checked before claiming qualification. Maintenance owner:none — bounded self-contained execution carrier. The canonical integrator registers observed results in federation GOVERNANCE.md, TOOLING.md, STATUS.md and DECISIONS.md before adoption.

Preserved test-first RED: b841fcc18ad7ebbe136ff7d237c8b61455e8e02f, native run40944659971/job123696737145, original recorder baseline exit1, artifact12928801439 (ZIP SHA2566b655de27b769e1968a36d40e87ee376730efe778cd77068a4fdfd3321231a37). The stricter dependency/object controls were added before implementation; this failed attempt remains retained and is not counted as a mutation kill or a mathematical success.

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.
101 changes: 101 additions & 0 deletions cbz/source514-hosted/domain.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
{
"production": [
"SourceDerivativeGaussian",
"ContactJetCovariance",
"SourceContactCovariance",
"SourceConfluentPins",
"SourceContactSchur",
"SourceDerivativeContinuity",
"ConfluentIntegralIdentities",
"SourceEndpointRegression",
"GaussianRegressionLimits",
"SourceEndpointParameters",
"SourceContactEndpointParameters",
"SourceConfluentLimits",
"SourcePhysicalEndpointKernel",
"SourceEndpointEstimates",
"SourceSmoothConditionalKernel",
"SourceSmoothPalm",
"GaussianWeightedMajorants",
"SourceConditionalMajorant",
"SourcePinCurvatureBounds",
"ScalarProductCurvatureBound",
"SourceCurvatureDecomposition",
"SourceWeightedCurvatureBound",
"SourcePinPreservingQuartic",
"SourceSmoothTopology",
"SourceRawPinConditioning",
"SourceQuarticCaptureAlgebra",
"SourceMorseIncidence",
"SourceSmoothParameterSpace",
"SourceLifetimePairFiniteness",
"SourceCompactTargetMoments",
"AdaptiveFoldScalarBarrier",
"AdaptiveFoldTransverseRidge",
"AdaptiveFoldBoundaryPath",
"SourceAdaptiveFoldChart",
"SourceAdaptiveFoldEstimates",
"SourceActualFoldDeath",
"SourceActualFoldTorus",
"SourceActualFoldH0",
"SourceFoldWeightedProbability",
"SourceGapPinCurvature",
"SourceAllTargetCurvatureResidual",
"SourceGapWeightedNumerator",
"SourceCompactGapNormalizer",
"SourceCompactFoldWeightedProbability",
"SourceActualFoldCandidate",
"SourceFinitePinKernel",
"SourceFiniteTrig",
"SourceRemoteJetWitness",
"SourceRemoteJetGaussian",
"SourceEndpointHessianWitness",
"SourceH0OlderClearance",
"SourceEndpointHessianGaussian",
"SourceTwoRemoteFirstJetWitness",
"SourceIntrinsicH0Interface",
"SourceTwoRemoteFirstJetGaussian",
"SourceIntrinsicH0WeightedProbability",
"SourceRawPinFreeCoordinates",
"SourceFramedConfluentCovariance",
"SourceGapConditionalMorseDistinct",
"SourceActualMorseLocalModel",
"SourceActualTorusSuperlevelLocalBasis",
"SourceActualTorusRegularSlab",
"SourceActualFiniteSuperlevelComponents",
"SourceActualQuotientSaddleCollar",
"SourceActualSaddleUppercuts",
"SourceActualRegularLocalCollar",
"SourceActualLowerSeparation"
],
"support": [
"GaussianSeriesFoundation",
"SpectralWeights",
"SourceFourierSeries",
"SourceC4",
"SourceGaussianLaw",
"SourceLattice",
"SourceKernel",
"SourceCovariance",
"SourceTorus",
"SourceTorusC4",
"SourceSmooth",
"SourceSmoothCarrier",
"ResearchFormalCoreR1.DeterminantMoment",
"ResearchFormalCoreR1.GaussianScalarMoments",
"ResearchFormalCoreR1.GaussianJetMoments",
"ResearchFormalCoreR1.GaussianNormalizer",
"ResearchFormalCoreR1.EndpointGaussianMoments",
"ResearchFormalCoreR1.NormalizerFloor",
"ResearchFormalCoreR1.EndpointNormalizerBridge",
"ResearchFormalCoreR1.GaussianCoupling",
"ResearchFormalCoreR1.GaussianNormalizerLimit",
"ResearchFormalCoreR1.PalmReweighting",
"ResearchFormalCoreR1.GaussianRegressionKernel",
"Lifetime",
"SourceLifetimeGeometry"
],
"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."
}
Loading
Loading