Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
82f4de1
test(formal): expose declaration-admission blind spots
d6g8k5htny-coder Oct 6, 2026
73c30c0
formal: harden source declaration admission
d6g8k5htny-coder Oct 6, 2026
2f21eaf
test(formal): repin hardened gate
d6g8k5htny-coder Oct 6, 2026
369c81d
test(formal): repin hardened gate
d6g8k5htny-coder Oct 6, 2026
a316fe0
docs(formal): document declaration admission
d6g8k5htny-coder Oct 6, 2026
8c1231b
docs(formal): remove stale suite count
d6g8k5htny-coder Oct 6, 2026
f5c9dff
docs(formal): record RF-GATE-01 hardening
d6g8k5htny-coder Oct 6, 2026
81078fa
formal: bind declaration admission controls
d6g8k5htny-coder Oct 6, 2026
9f71025
fix(formal): repair declaration scanner helper
d6g8k5htny-coder Oct 6, 2026
8bd9153
test(formal): repin final hardened gate
d6g8k5htny-coder Oct 6, 2026
40d1716
test(formal): repin final hardened gate
d6g8k5htny-coder Oct 6, 2026
419d369
test(formal): repin final hardened gate
d6g8k5htny-coder Oct 6, 2026
943466c
test(formal): repin final hardened gate
d6g8k5htny-coder Oct 6, 2026
4fe469d
test(formal): repin final hardened gate
d6g8k5htny-coder Oct 6, 2026
c7555fe
formal: bind final declaration-admission bytes
d6g8k5htny-coder Oct 6, 2026
b07e063
fix(formal): remove orphaned predecessor tail
d6g8k5htny-coder Oct 6, 2026
4224142
test(formal): repin repaired admission gate
d6g8k5htny-coder Oct 6, 2026
6a43eed
test(formal): repin repaired admission gate
d6g8k5htny-coder Oct 6, 2026
0a131f7
test(formal): repin repaired admission gate
d6g8k5htny-coder Oct 6, 2026
1c7dad3
test(formal): repin repaired admission gate
d6g8k5htny-coder Oct 6, 2026
8a9e3ba
test(formal): repin repaired admission gate
d6g8k5htny-coder Oct 6, 2026
3eaf30b
formal: bind repaired admission gate
d6g8k5htny-coder Oct 6, 2026
b3e44d6
fix(formal): correct raw-regex escapes
d6g8k5htny-coder Oct 6, 2026
40484e3
fix(formal): use intended regex escapes
d6g8k5htny-coder Oct 6, 2026
d279f1e
test(formal): repin corrected admission gate
d6g8k5htny-coder Oct 6, 2026
b5c9712
test(formal): repin corrected admission gate
d6g8k5htny-coder Oct 6, 2026
6f457c8
test(formal): repin corrected admission gate
d6g8k5htny-coder Oct 6, 2026
3a71f73
test(formal): repin corrected admission gate
d6g8k5htny-coder Oct 6, 2026
380b1ba
test(formal): repin corrected admission gate
d6g8k5htny-coder Oct 6, 2026
38ec7fc
formal: bind final RF-GATE-01 repair
d6g8k5htny-coder Oct 6, 2026
1fa9023
RF-GATE-01: incorporate reviewed compiled inventory on current main
d6g8k5htny-coder Oct 25, 2026
e8f4387
RF312: fix helper loading and bind actual compatibility bytes
d6g8k5htny-coder Oct 25, 2026
2e49c1d
RF312: make the layered gate observe the effective ROOT; synthetic fi…
claude Oct 26, 2026
66d66e4
Merge Math- main (7d63d08f) into chatgpt/formal-admission-hardening-2…
claude Oct 26, 2026
f0c34c5
fix(formal): bind declared RF312 manifest overlay receipts
d6g8k5htny-coder Oct 28, 2026
80946e1
test(formal): use the actual production identity declaration
d6g8k5htny-coder Oct 28, 2026
b0ac898
fix(d2): bind composite core receipts to qualified source cut
d6g8k5htny-coder Oct 28, 2026
1c22fa4
test(d2): exclude runtime caches from source fixtures
d6g8k5htny-coder Oct 28, 2026
825905c
Merge current main into reviewed formal receipt binding candidate
d6g8k5htny-coder Oct 28, 2026
d88e482
fix(legacy): model captured stdout in diagnostic reference
d6g8k5htny-coder Oct 28, 2026
d916c8b
ci(d2): allocate bounded time for complete Atom replay
d6g8k5htny-coder Oct 28, 2026
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
2 changes: 1 addition & 1 deletion .github/workflows/d2-atom-integral.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ permissions:
jobs:
d2-atom-integral:
runs-on: ubuntu-latest
timeout-minutes: 30
timeout-minutes: 60
env:
LEAN_NUM_THREADS: 2
steps:
Expand Down
24 changes: 24 additions & 0 deletions companions/d2_atom_integral_20261006/SCOPE.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,27 @@ bytes. The new tests are synthetic and do not execute Lean. New
current-commit kernel receipts and hosted checks are still required after
publication. Alignment remains PENDING_INDEPENDENT_REVIEW; scientific
effect NONE.

## RF312 source/receipt engineering proposal, 28 October 2026

This dated private proposal preserves the mathematical text and historical evidence above.
Its source basis is RF312 `80946e1cf311b3cbbb051bb3662357b11f8b3d75`, formal tree
`8922fd8c833df0c52d4a8c7b5c3ad802b93098d4`, with the unchanged nine formal Lean/root
blobs, 63 target entries, source modules, dependencies, toolchain and companion Lean/contract bytes.
These are source identities and declared dependencies, not a fresh proof or applicability review.

The raw manifest SHA256 is `ba7d11e43574e39da3c759e0501399a6dcd1b7da32b157a4a6b01f5c133b3062`;
the core receipt instead binds composite source `481653d73d00f64bf06fefbf24be994f60ebe5c54f826abf899461f6e6937066`.
The fixed strict RF312 overlay contract must match; no raw-receipt fallback is admitted.
The reused identity validator lies outside the formal tree, at `tools/required_formal_check.py`
(blob `0b9d694bdf888c75826ca07ae176c5a5c43b8880`, SHA256
`6c27355237b45d3999298522c141984ff5b7c114f18b3c555cc45989976fc6dc`). Its source bytes are
checked before those verified bytes are evaluated; drift, symlink, missing overlay and wrong regimes refuse.
Its identity is also retained in the source snapshot across execution. Atom's two imported companion
Lean pins and all existing runtime re-observation checks are preserved.

Protocol unit fixtures are synthetic and execute no Lean or finite-law diagnostic. They do not
supply a core or companion kernel/runtime receipt. Existing receipts/reviews remain historical;
fresh actual current-composition core and all three D2 hosted/negative-control/runtime checks,
qualified review and separate integration remain required. Scientific effect NONE; alignment and
scientific acceptance are unchanged. No existing312 source/ref or integration custody follows.
24 changes: 12 additions & 12 deletions companions/d2_atom_integral_20261006/SOURCE_FILES.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"core_tree": "fc0b11706d064b9de42331ee0a2464865107b87b",
"core_tree": "8922fd8c833df0c52d4a8c7b5c3ad802b93098d4",
"files": {
".github/workflows/d2-atom-integral.yml": {
"bytes": 1942,
"git_blob": "70100d3205a492bdf3583153d4f82f7e6f2eac7a",
"sha256": "c9b7f107af2dff4cfb71496616a6514a41af39291799b6ec9287977791053a99"
"git_blob": "19467302e94fb03e4afa8e05e7be545a15195917",
"sha256": "790bca4b320dd9cdf1f309cd126ed1334c54680a72b4e3693964386a9ea5d694"
},
"companions/d2_atom_integral_20261006/Contract.lean": {
"bytes": 3433,
Expand All @@ -17,24 +17,24 @@
"sha256": "247507c4b7aeaccc033cd4d648442172d61227bb27239a7dacccd0f2fa1ba6c3"
},
"companions/d2_atom_integral_20261006/SCOPE.md": {
"bytes": 10928,
"git_blob": "71008894a5a3aa01da18163afbce1903dabe51df",
"sha256": "90f12484ead012929ce0664ed0d4ef90f40c2d75d39d2d8580115f19b2db40ec"
"bytes": 12754,
"git_blob": "a5b523d5c7a704f368fb51c58b15e0e3fbc926ac",
"sha256": "aa3e0d19cda6a032384a00aa994950a1cf14e94143d5bc0400a4210acd7bddb2"
},
"companions/d2_atom_integral_20261006/check.py": {
"bytes": 10044,
"git_blob": "eb918b7ee775c0bb61a9ffff2cadba0b76e40673",
"sha256": "df3f8aec73478b74d0d0f2f06d2655097f80b9d9ebbb4c720d6a63076493315d"
"bytes": 11895,
"git_blob": "791ce1ddd1cb2df075a118f061922d323e42ac3d",
"sha256": "14c432a63a2cc9c74d3698be87927fa5e518e64b62a670ac0a3b579095e77749"
},
"companions/d2_atom_integral_20261006/replay.sh": {
"bytes": 3471,
"git_blob": "7dcfcf055f01a973e9e934abe0d732a580685568",
"sha256": "89d9a0c64fd88aa8cf8c6614df84b3f543c3d4ecc87ad2e529feffda90091c75"
},
"companions/d2_atom_integral_20261006/test_check.py": {
"bytes": 8946,
"git_blob": "efa3793f8ffeecc3e504b559601d52c6e68008f0",
"sha256": "83750832498ac74f96297174c494262537069c9c82eacb7aa2315f39a77ad454"
"bytes": 19049,
"git_blob": "59ef016d445913dcb9d6e43ae5cf6774bbbd1ecd",
"sha256": "31658f7cc26a65102710cc7f29e477412403871b724a4b9a861f7c1172a6b99c"
}
},
"scientific_effect": "NONE",
Expand Down
52 changes: 46 additions & 6 deletions companions/d2_atom_integral_20261006/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@
PACKAGE='companions/d2_atom_integral_20261006'
WORKFLOW='.github/workflows/d2-atom-integral.yml'
REPO='d6g8k5htny-coder/Math-'
CORE_TREE='fc0b11706d064b9de42331ee0a2464865107b87b'
CORE_MANIFEST='7149915669414e22f593ce2c6540c5e10d922eb758c7464794fc64764e679778'
CORE_GATE='25e08d9054b929dd657668e4ee4a3524688dc476e5af958f950de3b919f04e9a'
CORE_TREE='8922fd8c833df0c52d4a8c7b5c3ad802b93098d4'
CORE_MANIFEST='ba7d11e43574e39da3c759e0501399a6dcd1b7da32b157a4a6b01f5c133b3062'
CORE_GATE='509b6eb3b5ee2dc7e42810a40b07192b0feaf3924c9dbb398db43cb44e16e731'

CORE_SOURCE_IDENTITY='481653d73d00f64bf06fefbf24be994f60ebe5c54f826abf899461f6e6937066'
CORE_IDENTITY_PATH='tools/required_formal_check.py'
CORE_IDENTITY_SHA256='6c27355237b45d3999298522c141984ff5b7c114f18b3c555cc45989976fc6dc'
CORE_IDENTITY_BLOB='0b9d694bdf888c75826ca07ae176c5a5c43b8880'
CONSUMED={
'companions/d2_moment_bridge_20261006/D2MomentBridge.lean':'b3184107e290189b91e3e18fd2aa1cb631bb9bde',
'companions/d2_square_schur_20261006/D2SquareSchur.lean':'4855c92d55254969e1de7f8cf8dec2bdc027cf69'}
Expand Down Expand Up @@ -54,6 +59,38 @@ def reject(_):raise ValueError('noninteger JSON number')
def git(*args):
return subprocess.run(['git',*args],cwd=ROOT,check=True,capture_output=True,text=True,timeout=30).stdout.strip()

def core_identity():
"""Bind the outside-tree validator before evaluating its verified bytes."""
path = ROOT / CORE_IDENTITY_PATH
require(not any(p.is_symlink() for p in (path, *path.parents)) and path.is_file(),
'core identity validator missing or symlink')
raw = path.read_bytes()
framed = b'blob ' + str(len(raw)).encode() + b'\0' + raw
require(sha(raw) == CORE_IDENTITY_SHA256
and hashlib.sha1(framed).hexdigest() == CORE_IDENTITY_BLOB,
'core identity validator changed')
namespace = {'__name__': 'bound_d2_core_identity', '__file__': str(path)}
exec(compile(raw, str(path), 'exec'), namespace)
manifest = ROOT / 'formal/manifest.json'
manifest_raw = manifest.read_bytes()
require(sha(manifest_raw) == CORE_MANIFEST, 'core manifest changed')
digest = namespace['manifest_identity'](manifest, manifest_raw)
require(digest == CORE_SOURCE_IDENTITY, 'core source identity changed')
return digest


def validate_core_receipt(core, current):
"""The current core receipt binds the composite source, not the raw manifest."""
require(isinstance(core, dict), 'invalid core receipt')
require(core.get('checked_commit') == current['checked_commit'],
'core executed different source')
require(core.get('manifest_sha256') == core_identity(), 'core receipt manifest')
require(core.get('formalization_status') == 'kernel-checked', 'no core kernel receipt')





def source():
meta=strict((SIDE/'SOURCE_FILES.json').read_bytes());head=git('rev-parse','HEAD')
require(set(meta)=={'version','scientific_effect','core_tree','targets','files'},'manifest schema')
Expand All @@ -64,6 +101,7 @@ def source():
require(git('rev-parse',head+':formal')==CORE_TREE,'core tree changed')
require(sha((ROOT/'formal/manifest.json').read_bytes())==CORE_MANIFEST,'core manifest changed')
require(sha((ROOT/'formal/gate.py').read_bytes())==CORE_GATE,'core verifier changed')
core_identity()
if os.environ.get('GITHUB_ACTIONS')=='true':
require(os.environ.get('GITHUB_SHA')==head and os.environ.get('GITHUB_REPOSITORY')==REPO,'host/source mismatch')
require(os.environ.get('GITHUB_RUN_ID') and os.environ.get('GITHUB_RUN_ATTEMPT'),'missing run identity')
Expand All @@ -78,7 +116,10 @@ def source():
require(git('rev-parse',head+':'+name)==ids[name]['git_blob'],'dirty source: '+name)
if name in PAYLOADS:require(meta['files'][name]==ids[name],'source identity: '+name)
if name in CONSUMED:require(CONSUMED[name]==ids[name]['git_blob'],'consumed source changed: '+name)
git('diff','--exit-code','HEAD','--','formal',PACKAGE,WORKFLOW,*CONSUMED)
helper_id=identity((ROOT/CORE_IDENTITY_PATH).read_bytes())
require(git('rev-parse',head+':'+CORE_IDENTITY_PATH)==helper_id['git_blob'],'dirty core identity validator')
ids[CORE_IDENTITY_PATH]=helper_id
git('diff','--exit-code','HEAD','--','formal',PACKAGE,WORKFLOW,CORE_IDENTITY_PATH,*CONSUMED)
return {'checked_commit':head,'repository':REPO,'run_id':os.environ.get('GITHUB_RUN_ID','local'),
'run_attempt':os.environ.get('GITHUB_RUN_ATTEMPT','local'),'core_tree':CORE_TREE,
'sources':ids,'declarations':list(TARGETS),'scientific_effect':'NONE'}
Expand Down Expand Up @@ -149,8 +190,7 @@ def finish(out):
require((out/(label+'.status')).read_bytes()==b'1\n','negative status: '+label)
negative((out/(label+'.log')).read_text(),label,1)
raw=(ROOT/'formal/.lake/formal-evidence/receipt.json').read_bytes();core=strict(raw)
require(core['checked_commit']==current['checked_commit'] and core['manifest_sha256']==CORE_MANIFEST,'core identity')
require(core['formalization_status']=='kernel-checked','no core kernel receipt')
validate_core_receipt(core,current)
final=final_runtime(out,core,strict((ROOT/'formal/manifest.json').read_bytes())['dependency_revisions'])
result={**current,'axioms':ax,'theorem_count':6,'definition_count':0,'core_receipt_sha256':sha(raw),'final_observation':final,
'formalization_status':'kernel-checked','alignment_status':'PENDING_INDEPENDENT_REVIEW',
Expand Down
Loading
Loading