[verified] Document dependency provenance and probe JSON framing

This commit is contained in:
2026-10-12 12:10:32 +00:00
parent 64b5746879
commit 613a7ae24a
2 changed files with 41 additions and 0 deletions
@@ -0,0 +1,33 @@
"""Static documentation contracts; no dependency resolver or probe parser is executed."""
from pathlib import Path
import unittest
ROOT = Path(__file__).resolve().parents[3]
SKILL = ROOT / 'harness/agents/review/skills/gitea-code-review/SKILL.md'
class ReviewProbeDocumentationTests(unittest.TestCase):
def test_documentation_contract_requires_dependency_provenance_and_failure_preservation(self):
text = SKILL.read_text()
heading = '### Dependency provenance와 probe JSON framing'
self.assertIn(heading, text)
section = text.split(heading, 1)[1].split('\n## ', 1)[0]
for rule in ('별도로 승인된', '실제 interpreter', 'resolved dependency 버전',
'source revision', 'lockfile', '실패한 resolution·collection',
'baseline', '제품 회귀', '새 venv', '설치·pinning 권한',
'기존 evidence'):
with self.subTest(rule=rule):
self.assertIn(rule, section)
def test_documentation_contract_requires_exactly_one_framed_record_and_safe_errors(self):
section = SKILL.read_text().split('### Dependency provenance와 probe JSON framing', 1)[1].split('\n## ', 1)[0]
for rule in ('producer와 consumer', '고유 marker', '정확히 하나의 완전한 JSON record',
'누락·중복·malformed·truncation', '전체 stdout', 'brace',
'warning', 'exit status', 'TDD RED', 'timeout', '출력 한도',
'redaction', 'generic parser'):
with self.subTest(rule=rule):
self.assertIn(rule, section)
if __name__ == '__main__':
unittest.main()