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.
50 lines
5.7 KiB
Python
50 lines
5.7 KiB
Python
#!/usr/bin/python3.12
|
|
"""Final independent static/process/GPU/protected/accounting checks. No physics."""
|
|
import pathlib,json,hashlib,sys,time,datetime,ctypes
|
|
A=pathlib.Path(__file__).resolve().parent;D=A.parent
|
|
read=lambda p:json.loads(p.read_text());sha=lambda p:hashlib.sha256(p.read_bytes()).hexdigest()
|
|
seal=read(A/'package-verification.json');P=pathlib.Path(seal['package']);S=pathlib.Path(read(A/'staging.json')['root']);scope=read(A/'scope.json');assert not (A/'task-complete.json').exists()
|
|
assert sha(pathlib.Path(seal['archive']))==seal['archive_sha256']
|
|
for line in (P/'SHA256SUMS').read_text().splitlines():
|
|
h,n=line.split(' ',1);assert sha(P/n)==h,n
|
|
auth=read(A/'runs/display-S1-05/campaign/approval.json')['sources'];assert all(sha(P/n)==sha(S/n)==sha(D/n)==h for n,h in auth.items())
|
|
protected=read(A/'protected-registration.json')['protected'];bad=[n for n,h in protected.items() if not pathlib.Path(n).is_file() or sha(pathlib.Path(n))!=h];assert not bad,bad
|
|
identities=[];intervals=[];cases=[]
|
|
for r in (A/'runs').iterdir():
|
|
c=read(r/'campaign/campaign-result.json');o=read(r/'observer/result.json');identities += [i for row in c['rows'] for i in row['owned_identities']];intervals.append({'case':r.name,'begin_wall':o['began_wall'],'end_wall':o['ended_wall'],'Kit':len(c['rows'])});cases.append(c)
|
|
intervals.sort(key=lambda x:x['begin_wall']);assert all(x['end_wall']<=y['begin_wall'] for x,y in zip(intervals,intervals[1:])),intervals
|
|
alive=[]
|
|
for pid,birth in identities:
|
|
try:
|
|
st=pathlib.Path(f'/proc/{pid}/stat').read_text()
|
|
if int(st[st.rfind(')')+2:].split()[19])==birth:alive.append([pid,birth])
|
|
except FileNotFoundError:pass
|
|
assert not alive,alive
|
|
sys.path.insert(0,str(S/'scripts'));import functional_flow_launch_v2 as f
|
|
identity=read(A/'runs/headless-S1-06/campaign/approval.json')['gpu_identity'];gpu=f.ownership.GPUOwnership(identity);review=gpu.check(type('EmptyOwned',(),{'discover':lambda self:{}})(),final=True);clients={k:sorted(v) for k,v in gpu.clients().items()};assert not clients['compute']
|
|
# This scan is a final owned-storage inventory, not a claim to monitor all
|
|
# shared caches continuously. pytest root is conservatively counted even if
|
|
# it includes unrelated tests. Symlinks are listed but never followed.
|
|
entries=[];seen=set();bytes_=0;gaps=[]
|
|
roots=[A,pathlib.Path('/tmp/pytest-of-cen')]
|
|
for root in roots:
|
|
if not root.exists():continue
|
|
for p in root.rglob('*'):
|
|
if p.is_symlink():continue
|
|
try:
|
|
if p.is_file():
|
|
n=str(p.resolve())
|
|
if n not in seen:
|
|
seen.add(n);s=p.stat().st_size;bytes_+=s;entries.append({'path':n,'bytes':s,'sha256':sha(p) if root==A else None,'scope':'task-root' if root==A else 'conservative-shared-pytest-temp'})
|
|
except (FileNotFoundError,PermissionError) as e:gaps.append({'path':str(p),'error':type(e).__name__})
|
|
for p in [D/'setup-preflight.json',*(D/n for n in auth),D/'docs/contact_cycle_sim_performance_v042_result.md']:
|
|
n=str(p.resolve())
|
|
if n not in seen:seen.add(n);s=p.stat().st_size;bytes_+=s;entries.append({'path':n,'bytes':s,'sha256':sha(p),'scope':'additional-source/probe/result'})
|
|
reserve=16*1024**2;accounted=bytes_+reserve;elapsed=time.time()-datetime.datetime.fromisoformat(scope['start']).timestamp();kits=sum(len(c['rows']) for c in cases);actual=sum(c['actual_final_physics_calls'] for c in cases);reserved=sum(c['reserved_physics_calls'] for c in cases)
|
|
assert kits==11 and actual==67500 and reserved==73500
|
|
assert kits<=scope['limits']['kit_launches'] and reserved<=scope['limits']['physics_calls'] and accounted<=scope['limits']['owned_bytes'] and elapsed<scope['limits']['seconds'] and not gaps
|
|
inventory={'generated':datetime.datetime.now().astimezone().isoformat(),'entries':entries,'files':len(entries),'observed_logical_bytes':bytes_,'receipt_reserve_bytes':reserve,'accounted_bytes_including_reserve':accounted,'scope_roots':list(map(str,roots)),'gaps':gaps,'shared_native_cache_hard_quota_claim':False,'intervals':intervals,'serial_campaign_intervals':True,'owned_identities_checked':len(identities),'owned_alive':alive,'protected_files':len(protected),'protected_mismatches':bad,'gpu_clients':clients,'gpu_strict_final_review':review,'archive_sha256':seal['archive_sha256']}
|
|
(A/'final-inventory.json').write_text(json.dumps(inventory,indent=2)+'\n');assert (A/'final-inventory.json').stat().st_size<reserve-65536
|
|
complete={'completed':datetime.datetime.now().astimezone().isoformat(),'task':'bounded application performance + analyticS1 result sealed','accepted_skill':False,'training_steps':0,'Kit_instances':kits,'reserved_physics_calls':reserved,'actual_physics_calls':actual,'elapsed_seconds':elapsed,'accounted_owned_bytes_including_reserve':accounted,'scope_limits':scope['limits'],'protected_files_unchanged':len(protected),'owned_identities_checked':len(identities),'owned_alive':alive,'strict_final_GPU_clients':clients,'package':str(P),'archive':seal['archive'],'archive_sha256':seal['archive_sha256'],'archive_bytes':seal['archive_bytes'],'package_verification_sha256':sha(A/'package-verification.json'),'final_inventory_sha256':sha(A/'final-inventory.json'),'GUI_render_submissions_per_second':35.30043787880234,'GUI_window_overlay_observed_FPS':33.98,'GUI_sim_time_ratio':0.07060087575760468,'headless_sim_time_ratio':0.18325004295397335,'qualification':'current-source analyticS1GUI/headless6cycles each;70tensorbyte-identical to0.4.1GUI11; not1x/fullGPU/fullmatrix/u256/nativefaultinjection/globaldeterminism','unresolved_scope_limits':'README / RESULTS; firstindependentheadlesspostexitGPUadmissionexceptioncauseunknownpreserved; laterstrictchecknotretroactiveexplanation; firstpackagingCPUfixturefailurepreservedandpayloadrepaired','no_more_automatic_native_work':True}
|
|
(A/'task-complete.json').write_text(json.dumps(complete,indent=2)+'\n');print(json.dumps(complete,indent=2))
|