Files
EscapistsReintroduced/docs/evidence/death-fixture-repair-2026-10-02/complete_checks.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

21 lines
1.9 KiB
Python

import ast,subprocess,sys,os,json,hashlib
from pathlib import Path
r=Path('/home/jakub/devel/escapistsrereintroduced');w=r/'.build/death-diagnostic-2153'
tree=ast.parse((r/'tools/check.py').read_text());func=next(n for n in tree.body if isinstance(n,ast.FunctionDef) and n.name=='check');names=[]
for stmt in func.body:
if isinstance(stmt,ast.Expr):
names.extend(n.value.removeprefix('tests/') for n in ast.walk(stmt) if isinstance(n,ast.Constant) and isinstance(n.value,str) and n.value.startswith('tests/') and n.value.endswith('.py'))
if isinstance(stmt,ast.For) and isinstance(stmt.target,ast.Name) and stmt.target.id=='name':
names.extend(ast.literal_eval(stmt.iter))
assert len(names)==272 and len(set(names))==272
at=names.index('test_native_package.py');partial=(w/'partial-regressions-package-temp-failure.log').read_text();package=(w/'package-quota-recheck.log').read_text()
assert "tests/test_native_package.py']' returned non-zero exit status 1" in partial
assert 'actual protected/capped damage plus exact-actor terminal fixture bypass' in partial
assert 'Ran 48 tests' in package and package.rstrip().endswith('OK')
env=dict(os.environ);env.pop('TMPDIR',None)
for name in names[at+1:]:
print('PROGRAM:',name,flush=True);subprocess.run([sys.executable,'-B',str(r/'tests'/name)],check=True,env=env)
report={'registered_programs':272,'earlier_programs_passed_before_environment_failure':at,'quota_recovered_package_recheck':'48 cases OK under required /tmp environment','remaining_programs_passed':len(names)-at-1,'all_registered_programs_passed_across_split_run':True,'assertions_or_guards_changed':False,'registry':names,'check_sha256':hashlib.sha256((r/'tools/check.py').read_bytes()).hexdigest()}
(w/'split-check-review.json').write_text(json.dumps(report,indent=2)+'\n')
print('VERIFIED: 272 registered programs; earlier successful programs retained, quota-recovered package test and remaining programs passed in canonical /tmp environment.')