Remove owner-authorized individual Runner attempt caps and record Opus work direction
This commit is contained in:
+58
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"task_id": "P08-02",
|
||||
"state": "implementing",
|
||||
"submitted": "e59206b9b2578ddb4a1ec023f836d413a7a8fbfb",
|
||||
"repairs_retained": 3,
|
||||
"individual_cap": null,
|
||||
"actual_implementer_run": "c515ac662e484e8e8c90024b3c73ff53",
|
||||
"actual_pid": 65613,
|
||||
"commander_direction": "../unlimited-individual-limits-r01/OPUS_P08_RUN_DIRECTION.json",
|
||||
"original_unit_accepted": false,
|
||||
"original_denominator": {
|
||||
"packages": 30,
|
||||
"units": 88,
|
||||
"partial_credit": false
|
||||
},
|
||||
"all_conditions": [
|
||||
"mixed_construction",
|
||||
"occupancy_change",
|
||||
"actual_actor_positions",
|
||||
"combined_rescue_logistics_ev",
|
||||
"no_overlap_orphan_loss",
|
||||
"unsolvable_preservation"
|
||||
],
|
||||
"reuse_evidence": [
|
||||
{
|
||||
"sha": "e59206b9b2578ddb4a1ec023f836d413a7a8fbfb",
|
||||
"import_pid": 52821,
|
||||
"parse_pid": 52931,
|
||||
"passed": true,
|
||||
"application": "diagnoses existing source; final changed fixture requires final native parse"
|
||||
},
|
||||
{
|
||||
"sha": "e59206b9b2578ddb4a1ec023f836d413a7a8fbfb",
|
||||
"writer_pid": 52976,
|
||||
"failed": true,
|
||||
"application": "resource setup failure; no mixed migration acceptance"
|
||||
},
|
||||
{
|
||||
"diagnostic_pid": 55276,
|
||||
"application": "missing materials10, diagnostic logging only; no acceptance"
|
||||
},
|
||||
{
|
||||
"application": "raw oldhistory fullSHA roundtrip Git2versions and verified gzip; reusable provenance"
|
||||
}
|
||||
],
|
||||
"missing": [
|
||||
"same-final-sha full ON/OFF success/refusal native writer/reader proof",
|
||||
"actual normal OS input evidence",
|
||||
"final regression",
|
||||
"independent gameplay review",
|
||||
"integration and ledger closure"
|
||||
],
|
||||
"dependencies": [
|
||||
"registered catalog definition costs reused; no production economic values invented",
|
||||
"private native profile/save isolation",
|
||||
"normal menu interaction setup"
|
||||
]
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
"""Execute unchanged submitted P08 collector with storage-only closed-phase hook."""
|
||||
from pathlib import Path
|
||||
import importlib.util,argparse,json,sys,hashlib
|
||||
sys.dont_write_bytecode=True
|
||||
parser=argparse.ArgumentParser();parser.add_argument('--commit',required=True);parser.add_argument('--output',type=Path,required=True);args=parser.parse_args()
|
||||
root=Path('/Users/korizatou114/Projects/TheTree-managed-worktrees/p08-02/P08-02-implement')
|
||||
coordinator=Path(__file__).resolve().parent
|
||||
|
||||
def load(name,path):
|
||||
s=importlib.util.spec_from_file_location(name,path);m=importlib.util.module_from_spec(s);s.loader.exec_module(m);return m
|
||||
|
||||
driver=load('submitted_p08_collector',root/'tools/run_p08_mixed_migration.py')
|
||||
storage=load('closed_phase_storage',coordinator/'native_storage_guard.py')
|
||||
original_module=driver.module
|
||||
traces=[]
|
||||
|
||||
def module(name,path):
|
||||
m=original_module(name,path)
|
||||
if name=='p08_standard_runner':
|
||||
original=m.execute_phase
|
||||
def execute(*values,**kwargs):
|
||||
row=original(*values,**kwargs)
|
||||
print(json.dumps({'phase':values[3],'passed':row['passed'],'actual_pid':row.get('actual_pid'),'exit':row.get('exit_code'),'error':row.get('validation_error'),'guard_error':row.get('guard_error')}),flush=True)
|
||||
if row['passed']:
|
||||
changes=storage.compress_closed_phase(args.output,row)
|
||||
traces.append({'phase':values[3],'ended_native_pid':row.get('actual_pid'),'storage_only_changes':changes})
|
||||
print(json.dumps({'phase':values[3],'closed_proofs_preserved_and_compressed':len(changes)}),flush=True)
|
||||
return row
|
||||
m.execute_phase=execute
|
||||
return m
|
||||
|
||||
driver.module=module
|
||||
native=argparse.Namespace(project_root=root,output=args.output.resolve(),commit=args.commit,godot='/Applications/Godot.app/Contents/MacOS/Godot',collect=True)
|
||||
code=driver.collect(native)
|
||||
record={'target_commit':args.commit,'native_exit':code,'storage_helper_sha256':hashlib.sha256((coordinator/'native_storage_guard.py').read_bytes()).hexdigest(),'collector_sha256':hashlib.sha256((root/'tools/run_p08_mixed_migration.py').read_bytes()).hexdigest(),'snapshots_or_timepoints_omitted':0,'worker_source_changed':False,'phase_traces':traces,'original_unit_accepted':False}
|
||||
(coordinator/'NATIVE_STORAGE_COLLECTION_TRACE.json').write_text(json.dumps(record,ensure_ascii=False,indent=2)+'\n')
|
||||
raise SystemExit(code)
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
"""Coordinator storage only: transparently compress closed, owned phase proof files.
|
||||
|
||||
No snapshot/timepoint filtering. No changes to worker code or native outputs.
|
||||
Call only after execute_phase returned and actual engine_ended is true.
|
||||
"""
|
||||
from pathlib import Path
|
||||
import hashlib,json,os,subprocess
|
||||
|
||||
def compress_closed_phase(out, phase_row):
|
||||
if phase_row.get('engine_ended') is not True:
|
||||
raise RuntimeError('Owned native child must actually have ended')
|
||||
out=Path(out).resolve()
|
||||
rows=[]
|
||||
candidates=[p for p in sorted((out/'pairs').rglob('*')) if p.is_file() and not p.is_symlink() and p.suffix in ('.var','.json') and p.stat().st_size>=65536 and not p.stat().st_flags&32] if (out/'pairs').exists() else []
|
||||
for offset in range(0,len(candidates),128):
|
||||
probe=subprocess.run(['/usr/sbin/lsof','-t','--',*[str(p) for p in candidates[offset:offset+128]]],capture_output=True,text=True)
|
||||
if probe.stdout.strip(): raise RuntimeError('Owned proof has open handles')
|
||||
for p in candidates:
|
||||
if not p.is_file() or p.is_symlink() or p.suffix not in ('.var','.json'):
|
||||
continue
|
||||
old=p.stat()
|
||||
if old.st_flags & 32 or old.st_size < 65536: continue
|
||||
data_sha=hashlib.sha256(p.read_bytes()).hexdigest()
|
||||
temp=p.with_name(p.name+'.owned-hfs-temporary')
|
||||
if temp.exists(): raise RuntimeError('Storage temporary collision')
|
||||
subprocess.run(['/usr/bin/ditto','--hfsCompression','--noclone',str(p),str(temp)],check=True)
|
||||
now=temp.stat()
|
||||
if hashlib.sha256(temp.read_bytes()).hexdigest()!=data_sha or (now.st_size,now.st_mode,now.st_uid,now.st_gid,now.st_mtime_ns)!=(old.st_size,old.st_mode,old.st_uid,old.st_gid,old.st_mtime_ns):
|
||||
raise RuntimeError('Content/metadata preservation failed')
|
||||
if hashlib.sha256(p.read_bytes()).hexdigest()!=data_sha:
|
||||
raise RuntimeError('Original proof changed before replacement')
|
||||
os.replace(temp,p)
|
||||
if hashlib.sha256(p.read_bytes()).hexdigest()!=data_sha:
|
||||
raise RuntimeError('Post-replacement content mismatch')
|
||||
rows.append({'path':str(p.relative_to(out)),'bytes':old.st_size,'sha256':data_sha,'physical_before':old.st_blocks*512,'physical_after':p.stat().st_blocks*512,'whole_bytes_and_mode_owner_mtime_preserved':True})
|
||||
return rows
|
||||
Reference in New Issue
Block a user