From bf2d75c9b01aeb1a21144aa80b0971bfcf86569c Mon Sep 17 00:00:00 2001 From: Agent Control Runner Date: Wed, 14 Oct 2026 10:06:59 +0900 Subject: [PATCH] =?UTF-8?q?P08-03:=20=E9=85=8D=E7=BD=AE=E3=81=AE=E9=80=9A?= =?UTF-8?q?=E5=B8=B8=E6=93=8D=E4=BD=9C=E5=8F=97=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/fixtures/p08-03/repair13_images.py | 50 ------------------------ 1 file changed, 50 deletions(-) delete mode 100644 tests/fixtures/p08-03/repair13_images.py diff --git a/tests/fixtures/p08-03/repair13_images.py b/tests/fixtures/p08-03/repair13_images.py deleted file mode 100644 index ba8647b..0000000 --- a/tests/fixtures/p08-03/repair13_images.py +++ /dev/null @@ -1,50 +0,0 @@ -"""Synthetic JPEG marker streams and R09-shaped pins; never capture evidence. - -Streams exercise the structural parser, not a decoder or visual acceptance. -Independent of all operational Root handoff documents. -""" -import hashlib -import json -import shutil -import struct - -def put(path, value): - path.write_text(json.dumps(value, sort_keys=True)+'\n') - -def jpeg(width=1280, height=752, progressive=False): - def segment(marker, body): - return bytes((255, marker))+struct.pack('>H', len(body)+2)+body - frame = segment(0xc2 if progressive else 0xc0, - b'\x08'+struct.pack('>HH', height, width)+b'\x01\x01\x11\x00') - scan = segment(0xda, b'\x01\x01\x00\x00\x3f\x00')+b'\x12\xff\x00\x34\xff\xd0\x56' - return b'\xff\xd8'+segment(0xe0, b'SYNTHETIC')+frame+scan+(scan if progressive else b'')+b'\xff\xd9' - -def make(base, candidate): - out, original = base/'canonical', base/'original' - out.mkdir(); index = {'commit':candidate, 'artifacts':{}} - measurement = {'scope':'synthetic post-collection measurement', 'images':[]} - for role, count in (('reader',5), ('writer',64)): - for i in range(1,count+1): - for side in ('before','after'): - name = f'os-pair/{role}-request-{i:04d}/screen-{side}.png' - path = out/name; path.parent.mkdir(parents=True, exist_ok=True) - path.write_bytes(jpeg(progressive=i%2 == 0)) - measurement['images'].append({'file':name, 'source_sha256':hashlib.sha256(path.read_bytes()).hexdigest(), - 'width':1280,'height':752,'format_by_magic':'JPEG'}) - for name in ('runner-input.json','runner-ended.json','os-runs/writer/ended.json','os-runs/reader/ended.json'): - path = out/name; path.parent.mkdir(parents=True,exist_ok=True); put(path, {'synthetic':True}) - refresh(out, index, measurement) - shutil.copytree(out, original) - def pin(name): - p=original/name - return {'path':str(p),'bytes':p.stat().st_size,'sha256':hashlib.sha256(p.read_bytes()).hexdigest()} - pins = {'original_root':str(original),'native_candidate':candidate,'index':pin('index.json'), - 'runner_input':pin('runner-input.json'),'runner_ended':pin('runner-ended.json'), - 'OS':{role:{'receipt':pin('os-runs/'+role+'/ended.json')} for role in ('writer','reader')}} - return out, original, index, measurement, pins - -def refresh(out, index, measurement): - index['artifacts'] = {p.relative_to(out).as_posix():{'bytes':p.stat().st_size, - 'sha256':hashlib.sha256(p.read_bytes()).hexdigest()} for p in out.rglob('*') if p.is_file() and p.name != 'index.json'} - put(out/'index.json',index) - measurement['original_index_sha256'] = hashlib.sha256((out/'index.json').read_bytes()).hexdigest()