P08-03: 配置の通常操作受入

This commit is contained in:
Agent Control Runner
2026-10-15 00:32:39 +09:00
parent f5f85ae08c
commit d369d1c399
5 changed files with 175 additions and 12 deletions
+5 -2
View File
@@ -235,13 +235,16 @@ def make(base, source, checker):
'events':[{'synthetic':True}]})
put(out/(prefix+'ack.json'), {'target_pid':pid,'sequence':sequence,
'request_sha256':sha(out/(prefix+'request.json')), 'input_receipt':receipt,
'screen_before':directory+'/screen.png','screen_after':directory+'/screen.png'})
'screen_before':prefix+'screen-before.png','screen_after':prefix+'screen-after.png'})
row['requests'].append(prefix+'ack.json')
def chunk(kind, body):
return struct.pack('>I',len(body))+kind+body+struct.pack('>I',zlib.crc32(kind+body))
(folder/'screen.png').write_bytes(b'\x89PNG\r\n\x1a\n'+
screenshot = (b'\x89PNG\r\n\x1a\n'+
chunk(b'IHDR',struct.pack('>IIBBBBB',1,1,8,2,0,0,0))+
chunk(b'IDAT',zlib.compress(b'\0\0\0\0'))+chunk(b'IEND',b''))
for ack_name in row['requests']:
for side in ('before', 'after'):
(out/Path(ack_name).parent/('screen-'+side+'.png')).write_bytes(screenshot)
actions = []
for label in checker.WRITER: