generated from coulomb/repo-seed
Route auto review requests to agentic review
This commit is contained in:
@@ -1337,7 +1337,7 @@ def test_analyze_repository_falls_back_when_optional_llm_extractor_returns_no_ca
|
||||
assert graph.abilities[0].name == "Support Fallback"
|
||||
|
||||
|
||||
def test_analyze_repository_can_trusted_auto_approve_candidates(tmp_path):
|
||||
def test_analyze_repository_routes_legacy_auto_approve_to_agentic_review(tmp_path):
|
||||
source = tmp_path / "repo"
|
||||
source.mkdir()
|
||||
(source / "README.md").write_text(
|
||||
@@ -1364,20 +1364,17 @@ def test_analyze_repository_can_trusted_auto_approve_candidates(tmp_path):
|
||||
graph = service.candidate_graph(repository.id, summary.analysis_run.id)
|
||||
decisions = service.list_review_decisions(repository.id, summary.analysis_run.id)
|
||||
|
||||
assert service.get_repository(repository.id).status == "indexed"
|
||||
assert service.get_repository(repository.id).status == "analyzed"
|
||||
statuses_by_capability = {
|
||||
capability.name: capability.status
|
||||
for capability in graph.abilities[0].capabilities
|
||||
}
|
||||
assert statuses_by_capability["Expose Repository Interface"] == "approved"
|
||||
assert ability_map.abilities[0].name == "Report Health Over HTTP"
|
||||
assert decisions[0].action == "trusted_auto_approve_candidate_graph"
|
||||
assert statuses_by_capability["Expose Repository Interface"] == "candidate"
|
||||
assert ability_map.abilities == []
|
||||
assert decisions[0].action == "agentic_review_unconfigured"
|
||||
assert "deterministic candidate generation" in decisions[0].notes
|
||||
assert "Auto-approved 1 safe candidate capability(s); left 0 for review." in decisions[0].notes
|
||||
assert (
|
||||
"Approved: Expose Repository Interface: owned interface with sufficient confidence."
|
||||
in decisions[0].notes
|
||||
)
|
||||
assert "Deprecated trusted_auto_approve request was routed" in decisions[0].notes
|
||||
assert "candidates remain pending human review" in decisions[0].notes
|
||||
|
||||
|
||||
def test_rebuild_characteristics_dry_run_preserves_approved_map(tmp_path):
|
||||
|
||||
Reference in New Issue
Block a user