one time bootstrap path

This commit is contained in:
2026-05-02 00:36:00 +02:00
parent 911ca45618
commit 76f5ecb1b4
12 changed files with 328 additions and 27 deletions

View File

@@ -42,20 +42,29 @@ def test_deterministic_scanner_extracts_structural_facts(tmp_path):
assert languages == {"Python": 2}
def test_scanner_records_scope_with_source_role(tmp_path):
def test_scanner_records_intent_and_scope_with_distinct_source_roles(tmp_path):
repo = tmp_path / "sample"
repo.mkdir()
(repo / "INTENT.md").write_text(
"# INTENT\n\nProvides planned OIDC profile enforcement.\n",
encoding="utf-8",
)
(repo / "SCOPE.md").write_text(
"# SCOPE\n\n## One-liner\n\nProvides OIDC profile enforcement.\n",
"# SCOPE\n\n## One-liner\n\nCurrently provides OIDC profile enforcement.\n",
encoding="utf-8",
)
result = DeterministicScanner().scan(repo)
intent_fact = next(fact for fact in result.facts if fact.kind == "intent")
assert intent_fact.name == "INTENT"
assert intent_fact.path == "INTENT.md"
assert intent_fact.metadata["source_role"] == "intent_summary"
scope_fact = next(fact for fact in result.facts if fact.kind == "scope")
assert scope_fact.name == "SCOPE"
assert scope_fact.path == "SCOPE.md"
assert scope_fact.metadata["source_role"] == "scope_summary"
assert scope_fact.metadata["source_role"] == "derived_scope"
def test_scanner_readme_only_fixture_records_docs_without_interfaces(tmp_path):