"""Static documentation contracts, not agent behavior or automatic loop detection.""" from pathlib import Path import unittest ROOT = Path(__file__).resolve().parents[3] SKILL = ROOT / 'harness/agents/review/skills/gitea-code-review/SKILL.md' class ReviewConvergenceDocumentationTests(unittest.TestCase): def test_documentation_contract_requires_recurrence_escalation_and_bound_evidence(self): text = SKILL.read_text() heading = '### 재리뷰 수렴과 에스컬레이션' self.assertIn(heading, text) section = text.split(heading, 1)[1].split('\n## ', 1)[0] for rule in ('수정 matrix', 'source delta', '영향 경로', 'head와 실행 입력', '미변경 코드', '첫 리뷰 누락', '재차 반복', '자동 rework handoff를 중단', '소유자', '남은 findings', 'closure plan', '확인 불가', '자동 승인', 'blocker를 면제', '현재 head의 spec·code pass', '새 counter', '자동 반복 탐지기', '기존 journal'): with self.subTest(rule=rule): self.assertIn(rule, section) if __name__ == '__main__': unittest.main()