41 lines
1.7 KiB
Python
41 lines
1.7 KiB
Python
"""Procedural consumer wiring is not proof of live agent execution."""
|
|
from harness.tests._support.paths import HARNESS as SOURCE_HARNESS
|
|
from pathlib import Path
|
|
from harness.tests._support.contracts import read_contract
|
|
import unittest
|
|
|
|
ROOT = SOURCE_HARNESS
|
|
ROLES = [
|
|
'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',
|
|
]
|
|
|
|
|
|
class DelegationEvidenceContractTests(unittest.TestCase):
|
|
def test_consumers_require_gate_before_adoption(self):
|
|
for path in ROLES:
|
|
with self.subTest(path=path):
|
|
text = read_contract(ROOT / path)
|
|
for required in ['## Delegation evidence acceptance gate', 'delegation_evidence.py', '위임 결과 채택 이전']:
|
|
self.assertIn(required, text)
|
|
|
|
def test_canonical_contract_names_cli_and_schema(self):
|
|
text = (ROOT / 'operations/repository-cache.md').read_text()
|
|
for required in ['### Delegation evidence acceptance preflight',
|
|
'--bundle-root', '--context', '--result', '--git-dir',
|
|
'gitea-agent.delegation-evidence-context/v1',
|
|
'gitea-agent.delegation-evidence-result/v1']:
|
|
self.assertIn(required, text)
|
|
|
|
def test_source_modes_and_coverage_limits_are_explicit(self):
|
|
text = (ROOT / 'operations/repository-cache.md').read_text()
|
|
for required in ['captured_worktree', 'base_revision', 'git_tree']:
|
|
self.assertIn(required, text)
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|