[verified] Bind test inventories to exact Git sources
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
"""Contract wiring for the read-only inventory source-binding preflight."""
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
|
||||
|
||||
class InventoryBindingDocumentationTests(unittest.TestCase):
|
||||
def test_all_consumer_roles_require_binding_before_check_tests(self):
|
||||
paths = [
|
||||
'agents/impl/skills/gitea-issue-implementation/SKILL.md',
|
||||
'agents/impl/skills/gitea-issue-rework/SKILL.md',
|
||||
'agents/spec/skills/gitea-implementation-spec-review/SKILL.md',
|
||||
'agents/review/skills/gitea-code-review/SKILL.md',
|
||||
]
|
||||
for path in paths:
|
||||
with self.subTest(path=path):
|
||||
text = (ROOT / path).read_text()
|
||||
self.assertIn('test_inventory_binding.py', text)
|
||||
self.assertIn('check-tests 이전', text)
|
||||
self.assertIn('독립적으로 고정한 revision과 stage', text)
|
||||
|
||||
def test_canonical_reference_defines_exact_cli_and_scope_digest(self):
|
||||
text = (ROOT / 'operations/repository-cache.md').read_text()
|
||||
self.assertIn('### Test inventory Git source-binding preflight', text)
|
||||
for value in ['--git-dir', '--expected-revision', '--expected-stage',
|
||||
'gitea-agent.test-inventory-binding/v1', 'file_sha256',
|
||||
'scope_paths', 'scope_sha256', 'ensure_ascii=True',
|
||||
'/usr/bin/git', '/proc/self/fd/']:
|
||||
self.assertIn(value, text)
|
||||
|
||||
def test_binding_limits_do_not_create_product_or_execution_requirements(self):
|
||||
text = (ROOT / 'operations/repository-cache.md').read_text()
|
||||
self.assertIn('named symbol·parameter 존재나 실제 collection 실행을 인증하지 않는다', text)
|
||||
self.assertIn('현재 collection을 baseline으로 재명명하지 않는다', text)
|
||||
self.assertIn('별도 checkout이나 전체 테스트 재실행을 요구하지 않는다', text)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user