P08-03: 配置の通常操作受入
This commit is contained in:
@@ -568,10 +568,13 @@ def action_gate(row, typed, root=HERE.parent):
|
||||
require(row['report']['error_codes'][0] == code and row['status'] == message, 'reason mismatch')
|
||||
require(not row['report']['can_build'] and not results, 'preview rejection bypassed')
|
||||
preserve(before, after, results)
|
||||
elif label == 'missing_connection' and not results:
|
||||
elif label == 'missing_connection':
|
||||
require(not results, 'preview rejection bypassed')
|
||||
require(not row['report']['can_build'], 'preview/command disagreement')
|
||||
require('STAIR_LANDING_MISSING' in row['report']['error_codes'], 'preview reason differs from Runtime reason')
|
||||
require(row['report']['reasons'] and row['status'] == row['report']['reasons'][0]['message'], 'connection reason mismatch')
|
||||
reason = next((entry for entry in row['report'].get('reasons', []) if isinstance(entry, dict) and entry.get('code') == 'STAIR_LANDING_MISSING'), {})
|
||||
message = reason.get('message')
|
||||
require(isinstance(message, str) and bool(message) and row['status'] == '配置不可: '+message and 'STAIR_LANDING_MISSING' not in row['status'], 'connection reason mismatch')
|
||||
preserve(before, after, [])
|
||||
elif kind == 'cancel':
|
||||
require(not results and row['status'] == '撤去を取り消しました。', 'cancel submitted command')
|
||||
@@ -622,9 +625,6 @@ def action_gate(row, typed, root=HERE.parent):
|
||||
require(set(resources_a) == set(resources_b) and all(resources_b[k] == v - cost.get(k, 0) for k, v in resources_a.items()), 'build cost mismatch')
|
||||
if label == 'supported_connected':
|
||||
require(row['report']['connection']['status'] == 'CONNECTED', 'positive connection absent')
|
||||
if label == 'missing_connection':
|
||||
require(row['status'] == '操作に失敗しました: '+result['message'], 'connection reason mismatch')
|
||||
require(not row['report']['can_build'], 'preview/command disagreement')
|
||||
|
||||
def check(project_root, evidence_dir):
|
||||
root, evidence = Path(project_root).resolve(), Path(evidence_dir).resolve()
|
||||
|
||||
Reference in New Issue
Block a user