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

This commit is contained in:
Agent Control Runner
2026-10-14 20:45:46 +09:00
parent 7297a4c050
commit fd643f55a2
9 changed files with 138 additions and 9 deletions
+20 -1
View File
@@ -116,9 +116,28 @@ class EvidenceTests(unittest.TestCase):
def test_agreeing_preview_refusal(self):
row = self.action_row('missing_connection')
self.assertEqual(row['status'], row['report']['reasons'][0]['message'])
self.assertEqual(row['status'], '配置不可: '+row['report']['reasons'][0]['message'])
self.action_check(row)
def test_connection_status_corruptions(self):
for status in ('先に階段の一つ下の階に通路を作ってください。', '配置不可: STAIR_LANDING_MISSING', '配置不可: wrong message'):
with self.subTest(status=status):
row = self.action_row('missing_connection')
row['status'] = status
self.action_check(row, 'connection reason mismatch')
def test_connection_reason_missing_or_empty(self):
for reasons in ([], [{'code':'OTHER', 'message':'other'}], [{'code':'STAIR_LANDING_MISSING', 'message':''}]):
with self.subTest(reasons=reasons):
row = self.action_row('missing_connection')
row['report']['reasons'] = reasons
self.action_check(row, 'connection reason mismatch')
def test_connection_preview_rejection_bypassed(self):
row = self.action_row('missing_connection')
row['results'] = [{'code':'VALIDATION_FAILED', 'details':{'reason':'STAIR_LANDING_MISSING'}, 'message':row['status']}]
self.action_check(row, 'preview rejection bypassed')
def test_preview_command_disagreement(self):
row = self.action_row('missing_connection')
row['report']['can_build'] = True