Files
EscapistsReintroduced/docs/evidence/mounted-pair-2026-10-03/finish.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

45 lines
6.8 KiB
Python

from pathlib import Path
import hashlib,json,subprocess,shutil,sys
R=Path('/home/jakub/devel/escapistsrereintroduced');B=Path('/tmp/erri-pair-root-0054');E=R/'docs/evidence/mounted-pair-2026-10-03';N=R/'docs/evidence/native-2026-10-03-mounted-pair-normal'
load=lambda p:json.loads(p.read_text())
sha=lambda p:hashlib.sha256(p.read_bytes()).hexdigest()
def write(p,v):p.write_text(json.dumps(v,indent=2)+'\n')
b=load(B/'baseline.json');installed=load(B/'installed.json');suite=load(B/'suite-result.json');inputs=load(B/'suite-inputs.json')
assert suite['exit']==0 and suite['inputs_unchanged'] and suite['regression_programs']==294
assert len({x['path'] for x in suite['programs']})==294 and all(x['exit']==0 for x in suite['programs'])
assert all(sha(R/n)==h for n,h in inputs.items())
assert all(sha(R/n)==h for n,h in installed.items())
assert all(sha(R/n)==h for n,h in b['files'].items() if n not in installed)
sys.path.insert(0,str(R/'tools'));from source_manifest import addon_manifest
source=addon_manifest(R);runner=load(N/'runner.json.txt');report=load(N/'report.json')
assert source==load(N/'source-sha256.json')==load(N/'launch-source-sha256.json')
assert report['assertions_passed']==63 and report['smoke_completions']==1 and not report['script_or_runtime_failures'] and len(report['engine_errors'])==13
assert runner['cleanup_confirmed'] and runner['source_unchanged_after_run'] and runner['external_addons_unchanged_after_run'] and sha(N/'console.log.txt')==runner['console_sha256']
index=hashlib.sha256(subprocess.check_output(['git','diff','--cached','--binary'],cwd=R)).hexdigest();assert index==b['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())
candidate=R/'.build/playtest-2026-10-02-convoy-survivors';seal=load(R/'docs/evidence/playtest-refresh-2026-10-02-convoy-survivors/candidate-sha256.json');assert {str(p.relative_to(candidate)):sha(p) for p in candidate.rglob('*') if p.is_file()}==seal
assert Path('/tmp/erri-pair-geometry-0054/native-review.json').is_file()
E.mkdir(exist_ok=False)
for name in ['baseline.json','installed.json','preservation.json','run-suite.py','suite-inputs.json','suite-result.json','full-suite.log','normal.log','finish.py','column-pair.log','name-fix.json','name-fix-test.log']:
shutil.copyfile(B/name,E/name)
shutil.copytree(B/'pre-native-name-fix',E/'pre-native-name-fix')
for folder,name in [('/tmp/erri-pair-service-0054','service'),('/tmp/erri-pair-geometry-0054','geometry-and-review'),('/tmp/erri-pair-hq-0054','hq')]:
shutil.copytree(folder,E/name,ignore=shutil.ignore_patterns('__pycache__','*.pyc'))
write(E/'source-after.json',source)
result={'feature':'Two original convoy escorts dispatched to spaced positions on one road from delivered HQ memory','authored_files':len(source),'changed_production_files':[n for n in installed if n.startswith('addons/')],'regression_programs':294,'native_assertions':63,'native_completions':1,'native_script_failures':0,'native_engine_errors':13,'strict_native_failure_retained':True,'native_archive':str(N.relative_to(R)),'cleanup_source_external_unchanged':True,'original_tracked_files_unchanged':len(original),'prior_paths_preserved_except_allowlisted':len(b['files']),'candidate_files_unchanged':len(seal),'index_diff_sha256':index,'first_native_compile_failure':'docs/evidence/native-2026-10-03-mounted-pair-compile','native_compiler_fix':'Renamed new choice.Vehicle field to choice.Escort; native Vehicle type collision. Dispatch adapter changed correspondingly.','package_refreshed':False,'release_qualified':False,'limits':['Native run proves compilation and ordinary local escape integration, not paired physical driving/holding/rejoining.','Native AddWaypoint/ClearOrder operations are not transactional; callbacks cancel exact owned claims after commit begins.','Human escape, real multiplayer/JIP/reconnect/twelve-player play and comparative FPS remain unverified.','Existing development package predates paired interception and remains unchanged.']}
write(E/'review.json',result)
status=R/'docs/current-status.md';first,tail=status.read_text().split('\n',1)
section="""**3 October 2026 — HQ can dispatch a pair of original convoy escorts:** two armed escorts from the same finite convoy can receive separate radio orders to spaced positions on one actual road ahead of delivered travel memory. Both receipts are required before either detour begins. Interrupted delivery, stale history or loss of an original crew cancels the pair; there is no replacement partner, deadline renewal or new combat force. Single-escort fallback, force limits and the total two-road-survey budget remain intact.
All **294 registered regression programs pass**. Independent review corrected a feasible-pair selection gap; source tests cover radio arrival order, interrupted delivery, waypoint allocation failure, exact ownership and two-escort column rejoining. A hidden/muted normal Everon run completes **63 assertions and one round**, with **zero script/runtime failures and thirteen retained engine errors**. The first native compile caught a field/type naming conflict; its failed result is retained, and the corrected source was retested. Cleanup and unchanged source/external inputs are confirmed. This establishes compilation and ordinary-loop integration, not native physical paired interception, human play, multiplayer or FPS. Existing missions, the Git index and the previous playtest package are preserved; that package predates this addition. [Implementation and evidence](evidence/mounted-pair-2026-10-03/review.json).
"""
status.write_text(first+'\n\n'+section+'\n'+tail.lstrip('\n'))
doc=R/'docs/mounted-interception.md';doc.write_text(doc.read_text().replace('The existing packaged playtest predates this implementation.', 'The existing packaged playtest predates this paired extension.'))
for name in ['docs/original-feature-coverage.json','docs/original-feature-coverage.md']:
p=R/name;old='One existing armed convoy escort can receive a finite road-interception radio order from delivered travel history; native interception movement/hold/rejoin remain unqualified.'
new='One or two original armed escorts from the same convoy can receive finite road-interception orders from delivered travel history. A pair occupies spaced positions on one road only after both real downlinks arrive; native interception movement/hold/rejoin remain unqualified.'
text=p.read_text();assert text.count(old)==1;p.write_text(text.replace(old,new))
write(E/'documentation.json',{n:{'before':inputs[n],'after':sha(R/n)} for n in ['docs/current-status.md','docs/mounted-interception.md','docs/original-feature-coverage.json','docs/original-feature-coverage.md']})
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(result,indent=2))