P24-03: 選択と保存の受入

This commit is contained in:
Agent Control Runner
2026-10-13 01:14:19 +09:00
parent 9c711860a8
commit c2b8772e23
7 changed files with 108 additions and 17 deletions
+33 -9
View File
@@ -63,7 +63,12 @@ def verify(base):
for name in CONDITIONS:
row = matrix[name]
require(row.get('source_map') == current, 'condition candidate mismatch: ' + name)
require(row.get('status') == 'executed' and row.get('artifacts'), 'pending condition: ' + name)
# Formal independent review follows machine validation in Runner.
# Keep its condition explicit without requiring a prior duplicate review.
if name == 'final_validation_review':
require(row.get('status') in ('pending_review', 'executed') and row.get('artifacts'), 'final regression evidence missing')
else:
require(row.get('status') == 'executed' and row.get('artifacts'), 'pending condition: ' + name)
for reference in row['artifacts']:
artifact(reference)
@@ -140,23 +145,42 @@ def verify(base):
# OS collector events must identify actual input, target process and captured frames.
os_report = read(artifact(index['os_input']))
require(index['os_input'] in matrix['normal_os_input']['artifacts'], 'OS condition lacks collector artifact')
require(os_report.get('source_map') == current and os_report.get('collector') in ('macOS-CGEventTap', 'Windows-RawInput'), 'OS collector/source mismatch')
require(os_report.get('source_map') == current and os_report.get('collector') in ('macOS-CGEventTap', 'Windows-RawInput', 'CUA-native-app'), 'OS collector/source mismatch')
cua = os_report.get('collector') == 'CUA-native-app'
if cua:
require(os_report.get('trace_provenance') in ('original_tool_receipts', 'faithful_transcription') and isinstance(os_report.get('limitations'), str) and os_report['limitations'].strip(), 'CUA trace provenance/limitations required')
events = os_report.get('events', [])
required_actions = {'select_facility', 'select_guest', 'select_staff', 'select_layer', 'save', 'resume'}
require({e.get('action') for e in events} >= required_actions, 'OS action coverage missing')
require(any(e.get('action') == 'save' and e.get('pid') == observations[0]['pid'] for e in events) and any(e.get('action') == 'resume' and e.get('pid') == observations[1]['pid'] for e in events), 'OS save/resume must target producer/consumer respectively')
for event in events:
require(event.get('pid') in [r['pid'] for r in observations] and type(event.get('monotonic_ns')) is int, 'OS target/time mismatch')
require(event.get('native_type') in ('mouseDown', 'keyDown') and event.get('injected') is False, 'function/emit/synthetic event is not OS input')
require(type(event.get('pid')) is int and event['pid'] in [r['pid'] for r in observations] and type(event.get('monotonic_ns')) is int and event['monotonic_ns'] > 0, 'OS target/time mismatch')
require(event.get('native_type') in ('mouseDown', 'keyDown'), 'engine function/emit is not OS input')
if cua:
require(event.get('delivery') == 'native_os' and event.get('injected') is True, 'CUA must disclose tool-generated native OS delivery')
step = read(artifact(event['tool_step']))
require(step.get('pid') == event['pid'] and step.get('action') == event['action'] and step.get('monotonic_ns') == event['monotonic_ns'], 'CUA step target/action/time mismatch')
require(step.get('api') == 'native_app' and step.get('operation') in ('click', 'key') and isinstance(step.get('arguments'), dict) and step['arguments'], 'actual native app call arguments missing')
require(step.get('screenshot') == event['screenshot'] and step.get('source_map') == current, 'CUA returned screen/source mismatch')
else:
require(type(event.get('injected')) is bool and event.get('delivery') == 'native_os', 'OS delivery/origin disclosure required')
frame = artifact(event['screenshot'])
require({event['screenshot'], event['raw_trace']} <= set(matrix['normal_os_input']['artifacts']), 'OS condition lacks actual frame/trace artifacts')
if cua:
require(event['tool_step'] in matrix['normal_os_input']['artifacts'], 'OS condition lacks native app step artifact')
require(frame.read_bytes().startswith(b'\x89PNG\r\n\x1a\n'), 'OS screenshot missing/invalid')
trace = artifact(event['raw_trace']).read_text()
require(json.dumps(event, sort_keys=True, ensure_ascii=False) in trace, 'OS event missing in collector trace')
review = read(artifact(index['independent_review']))
require(set(matrix['final_validation_review']['artifacts']) >= {regression['input'], regression['ended'], regression['rows'], index['independent_review']}, 'final condition lacks full regression/review artifacts')
require(review.get('source_map') == current and review.get('reviewer') == 'Claude' and review.get('independent_session') and review.get('verdict') == 'pass', 'independent final Claude review missing')
require(set(review.get('condition_ids', [])) == set(CONDITIONS), 'independent review coverage missing')
return {'machine_validation': True, 'formal_acceptance': False, 'conditions': list(CONDITIONS)}
require(set(matrix['final_validation_review']['artifacts']) >= {regression['input'], regression['ended'], regression['rows']}, 'final condition lacks full regression artifacts')
review_status = 'pending'
if matrix['final_validation_review']['status'] == 'executed':
review = read(artifact(index['independent_review']))
require(index['independent_review'] in matrix['final_validation_review']['artifacts'], 'final condition lacks review artifact')
require(review.get('source_map') == current and review.get('reviewer') == 'Claude' and review.get('independent_session') and review.get('verdict') == 'pass', 'independent final Claude review missing')
require(set(review.get('condition_ids', [])) == set(CONDITIONS), 'independent review coverage missing')
review_status = 'executed'
return {'machine_validation': True, 'formal_acceptance': False, 'conditions': list(CONDITIONS), 'independent_review': review_status}
def main():
+1 -1
View File
@@ -2,7 +2,7 @@
"schema_version": 1,
"suite_policies": {
"tests/ui/test_selection_departure.gd": {
"source_sha256": "b43f3fa05e5ab0320e94e317ae75e880746d8557a69ea43bb6a40e93827a4eaf",
"source_sha256": "a9a2ec8dbcb096da7356e8ea29f6bdb6e014e4d9f95e645c84bfea1e4f423701",
"ordinary_cleanup_prepared": true,
"ordinary_control_labels": ["single"],
"old_bounded_teardown": false,