generated from coulomb/repo-seed
Improved datamodel and deterministic generation
This commit is contained in:
@@ -52,13 +52,19 @@ def test_candidate_generator_builds_purpose_seed_from_observed_facts():
|
||||
ability = graph[0]
|
||||
assert ability.name == "Route Incoming Customer Email To The Right Team"
|
||||
assert "Usefulness" not in ability.name
|
||||
assert ability.primary_class == "developer-tooling"
|
||||
assert "interface" in ability.attributes
|
||||
assert ability.source_refs[0].path == "README.md"
|
||||
interface_capability = ability.capabilities[0]
|
||||
assert interface_capability.name == "Expose Repository Interface"
|
||||
assert interface_capability.primary_class == "interface"
|
||||
assert {"surface", "api"} <= set(interface_capability.attributes)
|
||||
assert interface_capability.confidence == 0.75
|
||||
assert interface_capability.inputs == ["HTTP request"]
|
||||
assert interface_capability.outputs == ["HTTP response"]
|
||||
assert interface_capability.features[0].type == "API"
|
||||
assert interface_capability.features[0].primary_class == "API"
|
||||
assert {"API", "surface", "http"} <= set(interface_capability.features[0].attributes)
|
||||
assert interface_capability.features[0].name == "POST /classify"
|
||||
assert interface_capability.features[0].location == "app.py"
|
||||
assert interface_capability.evidence[0].strength == "strong"
|
||||
@@ -273,8 +279,18 @@ def test_candidate_generator_maps_llm_provider_facts_to_capability():
|
||||
for capability in graph[0].capabilities
|
||||
if capability.name == "Route LLM Requests Across Providers"
|
||||
)
|
||||
assert graph[0].primary_class == "ai-integration"
|
||||
assert capability.primary_class == "llm-integration"
|
||||
assert {"llm-provider", "openrouter", "claude", "fallback-policy"} <= set(
|
||||
capability.attributes
|
||||
)
|
||||
feature_names = {feature.name for feature in capability.features}
|
||||
assert {"Use OpenRouter Models", "Use Claude Models"} <= feature_names
|
||||
assert "Configure LLM Provider Credentials" in feature_names
|
||||
assert "Maintain LLM Provider Registry" in feature_names
|
||||
assert "Apply LLM Provider Fallback Policy" in feature_names
|
||||
openrouter_feature = next(
|
||||
feature for feature in capability.features if feature.name == "Use OpenRouter Models"
|
||||
)
|
||||
assert openrouter_feature.primary_class == "integration"
|
||||
assert {"llm-provider", "openrouter"} <= set(openrouter_feature.attributes)
|
||||
|
||||
Reference in New Issue
Block a user