Implement approved bounded S3-A queue with first-trial cost checkpoint

This commit is contained in:
Frank14f committed 2026-11-15 17:00:10 +08:00
1 parent b0390231f0
commit 6142ad69d0
12 files changed
+19110

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
"""Execution pins and one-main-review gate; original approved code stays unchanged."""
from pathlib import Path
from freeze_g1_components import sha
from s2_custody_common import checked, read_json
from run_s3a_score import review_gate
def contract(root):
root = Path(root)
c = review_gate(root)
implementation = read_json(root/'implementation.json')
if implementation['contract_sha256'] != sha(root/'contract.json'):
raise ValueError('Implementation bound to different scientific contract')
checked(root/'main-review.json', implementation['review_sha256'])
for path, digest in implementation['code_sha256'].items():
checked(path, digest)
frozen = read_json(root/'implementation-freeze.json')
if not frozen.get('git_commit') or frozen['implementation_sha256'] != sha(root/'implementation.json'):
raise ValueError('Implementation must be Git frozen before launch')
if len(c['jobs']) != 390 or len(c['cells']) != 30 or c['limits']['worker_cpu_seconds'] != 72000:
raise ValueError('Unexpected S3-A scope')
return c