Files
jakub 6a667d8deb Capture current mission, AI, map and administration development
Include the current addon, terrain integrations, tools, regression tests and recorded development evidence.
2026-10-13 22:52:53 +02:00

42 lines
3.7 KiB
Python

from pathlib import Path
import hashlib,json,shutil,subprocess,sys
r=Path('/home/jakub/devel/escapistsrereintroduced')
b=Path('/tmp/erri-playtest-2121')
e=r/'docs/evidence/playtest-refresh-2026-10-02-convoy-survivors'
c=r/'.build/playtest-2026-10-02-convoy-survivors'
sha=lambda p:hashlib.sha256(p.read_bytes()).hexdigest()
load=lambda p:json.loads(p.read_text())
def write(p,v):p.write_text(json.dumps(v,indent=2)+'\n')
baseline=load(b/'baseline.json')
allowed={'README.md','docs/current-status.md','docs/playtest-build.md'}
changed=[n for n,h in baseline['files'].items() if not (r/n).is_file() or sha(r/n)!=h]
assert set(changed)==allowed,changed
index=hashlib.sha256(subprocess.check_output(['git','diff','--cached','--binary'],cwd=r)).hexdigest()
assert index==baseline['index_diff_sha256']
original=load(Path('/tmp/erri-heartbeat-20260930-1542-reference.json'))
assert all(sha(Path('/home/jakub/devel/escapists')/n)==h for n,h in original.items())
old=r/'.build/playtest-2026-10-02-transfer-fixes'
oldseal=load(r/'docs/evidence/playtest-refresh-2026-10-02-transfer-fixes/candidate-sha256.json')
assert {str(p.relative_to(old)):sha(p) for p in old.rglob('*') if p.is_file()}==oldseal
review=load(Path('/tmp/erri-playtest-review-2156/final-review.json'))
assert review['complete'] is True
assert load(Path('/tmp/erri-package-prep-2121/docs-proposal.json'))['target_writes'] is True
sys.path.insert(0,str(r/'tools'))
from source_manifest import addon_manifest
assert addon_manifest(r)==load(b/'frozen-source.json')
handoff=load(c/'handoff.json')
assert handoff['normal_mission_ready'] and handoff['local_participant_verified']
assert handoff['repository_regression_programs']==291 and not handoff['release_qualified']
e.mkdir(exist_ok=False)
for n in ['baseline.json','frozen-source.json','suite-inputs.json','suite-result.json','regressions.log','freeze.py','run-suite.py','source-bundle.log','finish-evidence.py']:
shutil.copyfile(b/n,e/n)
shutil.copyfile('/tmp/erri-playtest-review-2156/final-review.json',e/'independent-review.json')
shutil.copyfile('/tmp/erri-playtest-review-2156/snapshot-review.json',e/'snapshot-review.json')
shutil.copytree('/tmp/erri-package-prep-2121',e/'preparation',ignore=shutil.ignore_patterns('__pycache__','*.pyc'))
shutil.copyfile('/tmp/erri-next-gameplay-2156/proposal.json',e/'unverified-next-gameplay-proposal.json')
seal={str(p.relative_to(c)):sha(p) for p in sorted(c.rglob('*')) if p.is_file()}
write(e/'candidate-sha256.json',seal)
write(e/'review.json',{'kind':'UNQUALIFIED DEVELOPMENT CANDIDATE','authored_files':420,'pak_payload_files':361,'runtime_files':3,'candidate_files':len(seal),'source_zip_sha256':sha(c/'source.zip'),'regression_programs':291,'normal_route_reused_for_exact_source':True,'normal_assertions':63,'normal_completions':1,'normal_script_failures':0,'normal_engine_errors':13,'packed_normal_mission_and_local_prisoner':True,'packed_script_failures':0,'packed_engine_errors':17,'strict_failures_retained':True,'release_qualified':False,'published':False,'current_authored_source_matches':True,'original_reference_files_unchanged':len(original),'existing_paths_preserved_except_documentation':len(baseline['files'])-len(changed),'documentation_updates':changed,'index_diff_sha256':index,'previous_candidate_files_unchanged':len(oldseal),'independent_review_sha256':sha(e/'independent-review.json'),'unverified_next_proposal':'Event-time vehicle capture parity candidate only; no implementation or native reproduction.'})
write(e/'evidence-sha256.json',{str(p.relative_to(e)):sha(p) for p in sorted(e.rglob('*')) if p.is_file()})
print(json.dumps({'evidence':str(e),'candidate_files':len(seal),'previous_candidate_preserved':len(oldseal),'original_preserved':len(original)},indent=2))