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

49 lines
4.4 KiB
Python

from pathlib import Path
import sys,json,hashlib,shutil,subprocess,re
ROOT=Path('/home/jakub/devel/escapistsrereintroduced');sys.path.insert(0,str(ROOT/'tools'))
from source_bundle import inventory
from native_report import analyze
RUN=Path('/tmp/erri-dedicated-packed-20261002-objective-map');DEST=ROOT/'docs/evidence/dedicated-packed-2026-10-02-objective-map'
def sha(p):return hashlib.sha256(p.read_bytes()).hexdigest()
def write(p,v):p.write_text(json.dumps(v,indent=2)+'\n')
before=json.loads(Path('/tmp/erri-dedicated-packed-1049-baseline.json').read_text())
assert inventory(ROOT)==before['authored']
assert hashlib.sha256(subprocess.check_output(['git','diff','--cached','--binary'],cwd=ROOT)).hexdigest()==before['index_diff_sha256']
assert all((sha(ROOT/p) if (ROOT/p).is_file() else None)==v for p,v in before['unstaged'].items())
original=Path('/home/jakub/devel/escapists');ref=json.loads(Path('/tmp/erri-heartbeat-20260930-1542-reference.json').read_text())
assert all(sha(original/p)==v for p,v in ref.items())
assert json.loads((RUN/'postrun-processes.json').read_text())['absent']
result=json.loads((RUN/'result.json').read_text());assert result['supervisor_reaped']
DEST.mkdir()
for name in ['runner.py','command.json','result.json','isolation-preflight.json','package-before.json','package-after.json','external-before.json','external-after.json','external-policy.json','binary.json','preservation.json','postrun-processes.json']:
shutil.copyfile(RUN/name,DEST/name)
shutil.copyfile(RUN/'stdout.log',DEST/'stdout.log.txt')
logs=list((RUN/'profile/logs').glob('logs_*'));assert len(logs)==1
for name in ['console.log','script.log','error.log','rereintroduced-hq.log']:
p=logs[0]/name
if p.is_file():shutil.copyfile(p,DEST/(name+'.txt'))
for name in ['external_addons.py','dedicated_native.py','native_report.py']:
shutil.copyfile(ROOT/'tools'/name,DEST/name)
for folder,name in [('/tmp/erri-dedicated-review-1049','admission-review'),('/tmp/erri-hq-review-1049','hq-review')]:
source=Path(folder);out=DEST/name;out.mkdir()
for p in source.iterdir():
if p.is_file():shutil.copyfile(p,out/p.name)
shutil.copyfile('/tmp/erri-dedicated-packed-1049-baseline.json',DEST/'source-and-working-tree-before.json')
console=(DEST/'console.log.txt').read_text();report=analyze(console,'console.log.txt')
report['scope']='isolated native Linux dedicated packed-only empty-server startup; no clients, authentication, input, multiplayer, complete escape, FPS comparison or release qualification'
report['normal_header_loaded']="Starting new playthrough nr.0 '' for mission '{C1E20667DCE324ED}Missions/ERR_Everon.conf'" in console
report['mission_systems_loaded']='Initializing world systems @"{C50579A2EC48E8EF}Configs/Systems/MissionSystems.conf"' in console
report['prison_phase_reached']='Reintroduced [mission]: phase 0 -> 1' in console
loaded=re.findall(r"gproj: '[^']+' guid: '([A-F0-9]{16})'",console)
expected=set(json.loads((RUN/'external-before.json').read_text()))|{'2528466DE220D91C','5614BBCCBB55ED1C','58D0FB3206B6F859'}
report['loaded_ids']=loaded;report['exact_ten_addon_closure']=len(loaded)==len(expected) and set(loaded)==expected
report['observation_after_prison_seconds']=15
report['supervisor_exit']=result['exit'];report['clean_shutdown_proven']=False
report['release_qualified']=False;report['strict_verdict']='failed: retained engine errors and supervisor termination; no gameplay acceptance'
assert report['normal_header_loaded'] and report['mission_systems_loaded'] and report['prison_phase_reached'] and report['exact_ten_addon_closure']
assert not report['script_or_runtime_failures'] and len(report['engine_errors'])==11
write(DEST/'report.json',report)
review={'original_reference_files_unchanged':len(ref),'authored_files_unchanged':len(before['authored']),'inherited_unstaged_files_unchanged':len(before['unstaged']),'cached_diff_unchanged':True,'candidate_416_files_unchanged':json.loads((RUN/'preservation.json').read_text())['package_unchanged'],'external_and_binary_unchanged':True,'native_process_absence_confirmed':True,'production_code_changed':False,'full_suite_rerun':False,'previous_283_program_suite_covers_unchanged_source':True,'native_script_runtime_failures':0,'retained_engine_errors':11,'real_players':0,'gameplay_multiplayer_fps_release_unqualified':True,'vanilla_payload_full_hash_inventory_captured':False,'published':False,'committed':False}
write(DEST/'review.json',review)
print(DEST);print(json.dumps(review,indent=2))