feat(harness): allocate canonical issue-scoped broker runtime
This commit is contained in:
@@ -17,6 +17,36 @@ CANONICAL = "<harness-root>/repositories/<owner>/<repo>/worktrees/issue-<number>
|
||||
|
||||
|
||||
class VerificationContractDocumentationTests(unittest.TestCase):
|
||||
def test_runtime_policy_is_broker_owned_and_separate_from_verification(self):
|
||||
text = CACHE.read_text(encoding="utf-8")
|
||||
self.assertIn("runtime/<workflow-run-id>", text)
|
||||
self.assertIn("broker.handle", text)
|
||||
self.assertIn("broker.sock", text)
|
||||
self.assertIn("ready JSON", text)
|
||||
self.assertIn("runtime 생성은 승인이나 admission을 의미하지 않는다", text)
|
||||
self.assertIn("active resource", text)
|
||||
self.assertIn("unknown", text)
|
||||
self.assertIn("성공 기록을 실패로 덮어쓰지 않는다", text)
|
||||
for path in SKILLS.values():
|
||||
with self.subTest(path=path.name):
|
||||
role = path.read_text(encoding="utf-8")
|
||||
gate = role.split("## Managed-lock broker gate", 1)[1].split("\n## ", 1)[0]
|
||||
self.assertIn("broker-generated", gate)
|
||||
self.assertIn("ready JSON", gate)
|
||||
self.assertNotIn("pre-created", gate)
|
||||
self.assertNotIn("pre-create", gate)
|
||||
|
||||
def test_role_runtime_startup_precedes_and_does_not_replace_admission(self):
|
||||
roles = [path for path in (ROOT / 'harness/agents').rglob('SKILL.md')
|
||||
if 'broker-generated runtime' in path.read_text()]
|
||||
self.assertEqual(len(roles), 6)
|
||||
for path in roles:
|
||||
with self.subTest(role=path.parent.name):
|
||||
gate = path.read_text().split('## Managed-lock broker gate', 1)[1].split('\n## ', 1)[0]
|
||||
self.assertIn('ready 이후 각 workflow의 진입 검증·승인 조건을 확인한다', gate)
|
||||
self.assertIn('Runtime 생성은 approval이나 worktree admission을 대신하지 않는다', gate)
|
||||
self.assertIn('ready JSON의 `handle`/`socket`', gate)
|
||||
|
||||
def test_evidence_plan_disables_python_bytecode_in_clean_checkout(self):
|
||||
import json
|
||||
template = ROOT / "harness/agents/impl/skills/gitea-issue-rework/templates/evidence-plan.json"
|
||||
|
||||
Reference in New Issue
Block a user