generated from coulomb/repo-seed
Constrain provider vocabulary candidate promotion
This commit is contained in:
@@ -517,6 +517,53 @@ def test_candidate_generator_does_not_promote_llm_provider_mentions_to_capabilit
|
||||
] == []
|
||||
|
||||
|
||||
def test_candidate_generator_does_not_promote_owned_provider_vocabulary_to_capability():
|
||||
repository = Repository(
|
||||
id=1,
|
||||
name="RepoScoping",
|
||||
url="/tmp/repo-scoping",
|
||||
description="Maps repositories into reviewable capability graphs.",
|
||||
branch="main",
|
||||
status="analyzed",
|
||||
)
|
||||
facts = [
|
||||
fact(1, "documentation", "README", "README.md"),
|
||||
fact(2, "interface", "python route decorator", "src/api.py", '@app.get("/repos")'),
|
||||
fact(
|
||||
3,
|
||||
"llm_provider",
|
||||
"OpenRouter",
|
||||
"src/repo_registry/repo_scanning/scanner.py",
|
||||
"openrouter",
|
||||
{"source_role": "implementation_source", "utility_relationship": "owned"},
|
||||
),
|
||||
fact(
|
||||
4,
|
||||
"provider_registry",
|
||||
"LLM provider registry",
|
||||
"src/repo_registry/repo_scanning/scanner.py",
|
||||
metadata={
|
||||
"source_role": "implementation_source",
|
||||
"utility_relationship": "owned",
|
||||
},
|
||||
),
|
||||
fact(
|
||||
5,
|
||||
"credential_config",
|
||||
"OpenRouter API key",
|
||||
"src/repo_registry/repo_scanning/scanner.py",
|
||||
"OPENROUTER_API_KEY",
|
||||
{"source_role": "implementation_source", "utility_relationship": "configure"},
|
||||
),
|
||||
]
|
||||
|
||||
graph = CandidateGraphGenerator().generate(repository, facts)
|
||||
|
||||
capability_names = {capability.name for capability in graph[0].capabilities}
|
||||
assert "Route LLM Requests Across Providers" not in capability_names
|
||||
assert "Expose Repository Interface" in capability_names
|
||||
|
||||
|
||||
def test_candidate_generator_excludes_mention_only_providers_from_promoted_capability():
|
||||
repository = Repository(
|
||||
id=1,
|
||||
|
||||
Reference in New Issue
Block a user