c528dd268f
Include callable skill and live-GUI prerequisites, epoch sensor reads, packed snapshots, sampled bit-exact kinematics, and verified-tick rendering without changing the physical/control schedule. Record bounded analytic S1 GUI/headless qualification, original failures and CPU evidence (1557 passed, 6 skipped). Preserve accepted_skill=false and sub-real-time limitations. Exclude native authorities, caches, large media and local delivery copies; retain sealed artifact digest.
30 lines
2.2 KiB
Python
30 lines
2.2 KiB
Python
#!/usr/bin/python3.12
|
|
import pathlib,json,hashlib,shutil
|
|
A=pathlib.Path(__file__).resolve().parent;D=A.parent;P=pathlib.Path(json.loads((A/'assembly.json').read_text())['package']);sha=lambda p:hashlib.sha256(p.read_bytes()).hexdigest()
|
|
I={x['package']:x for x in json.loads((P/'evidence-inventory.json').read_text())}
|
|
def copy(src,dst):
|
|
dst.parent.mkdir(parents=True,exist_ok=True);shutil.copy2(src,dst);I[str(dst.relative_to(P))]={'original':str(src),'package':str(dst.relative_to(P)),'sha256':sha(src),'bytes':src.stat().st_size}
|
|
for src in A.iterdir():
|
|
if src.is_file() and src.suffix in {'.json','.md','.log','.xml','.py','.txt'}:copy(src,P/'evidence/v042/parent'/src.name)
|
|
for name in ['README.md','current_status.md','next_stage.md','evidence_index.md','contact_cycle_sim_performance_v042_result.md']:
|
|
shutil.copy2(D/'docs'/name,P/'docs'/name)
|
|
shutil.copy2(D/'docs/contact_cycle_sim_performance_v042_result.md',P/'RESULTS.md')
|
|
(P/'evidence-inventory.json').write_text(json.dumps(list(I.values()),indent=2)+'\n')
|
|
# Remove only this generated package's test/bytecode caches, never user/shared
|
|
# caches or any source/evidence. First preseal cache assertion failure is retained.
|
|
shutil.rmtree(P/'.pytest_cache',ignore_errors=True)
|
|
caches=list(P.rglob('__pycache__'))
|
|
if caches:
|
|
receipt={'preseal_observation':'First refresh asserted because generated bytecode cache remained after CPU verification. No runtime source mismatch; no archive had been sealed.',
|
|
'removed_only_package_generated_dirs':[str(p.relative_to(P)) for p in caches]}
|
|
(A/'delivery-cache-cleanup.json').write_text(json.dumps(receipt,indent=2)+'\n')
|
|
for p in caches:
|
|
assert not p.is_symlink();shutil.rmtree(p)
|
|
assert not list(P.rglob('__pycache__'))
|
|
a=json.loads((A/'runs/display-S1-05/campaign/approval.json').read_text())['sources'];assert all(sha(P/n)==h for n,h in a.items())
|
|
if (A/'delivery-cache-cleanup.json').exists():
|
|
copy(A/'delivery-cache-cleanup.json',P/'evidence/v042/parent/delivery-cache-cleanup.json')
|
|
(P/'evidence-inventory.json').write_text(json.dumps(list(I.values()),indent=2)+'\n')
|
|
assert all(sha(P/x['package'])==x['sha256'] for x in I.values())
|
|
print('evidence inventory verified',len(I),'authority41 unchanged')
|