Files
EscapistsReintroduced/docs/evidence/crash-start-2026-10-03/validation/summarize_native.py
T
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

13 lines
1.5 KiB
Python

from pathlib import Path
import hashlib,json,sys
R=Path('/home/jakub/devel/escapistsrereintroduced');B=Path('/tmp/erri-crash-root-1852')
sha=lambda p:hashlib.sha256(p.read_bytes()).hexdigest()
records={}
for label in sys.argv[1:]:
d=R/'docs/evidence'/('native-2026-10-03-'+label)
report=json.loads((d/'report.json').read_text());runner=json.loads((d/'runner.json.txt').read_text());source=json.loads((d/'launch-source-sha256.json').read_text())
records[label]={'assertions':report['assertions_passed'],'completions':report['smoke_completions'],'script_failures':len(report['script_or_runtime_failures']),'retained_engine_errors':len(report['engine_errors']), 'result':runner['result'], 'cleanup_confirmed':runner['cleanup_confirmed'], 'source_unchanged':runner['source_unchanged_after_run'], 'external_inputs_unchanged':runner['external_addons_unchanged_after_run'], 'display':runner['display'],'audio':runner['audio'], 'source_files':len(source),'current_addon_source_exact':all((R/n).is_file() and sha(R/n)==h for n,h in source.items()), 'current_addon_source_deltas':{n:{'launched':h,'current':sha(R/n)} for n,h in source.items() if sha(R/n)!=h}, 'archive_hashes':{str(p.relative_to(d)):sha(p) for p in d.rglob('*') if p.is_file()}}
assert runner['cleanup_confirmed'] and runner['source_unchanged_after_run'] and runner['external_addons_unchanged_after_run']
(B/'native-summary.json').write_text(json.dumps(records,indent=2)+'\n')
print(json.dumps({k:{a:b for a,b in v.items() if a!='archive_hashes'} for k,v in records.items()},indent=2))