generated from coulomb/repo-seed
Coevolution extension
This commit is contained in:
@@ -252,6 +252,10 @@ def test_openapi_contract_snapshot_for_stable_agent_paths():
|
||||
"/repos/{repository_id}/export": {
|
||||
"get": {"tags": ["discovery"], "success_schema": "application/x-yaml"}
|
||||
},
|
||||
"/repos/{repository_id}/expectation-gaps": {
|
||||
"get": {"tags": ["review"], "success_schema": "list[ExpectationGapResponse]"},
|
||||
"post": {"tags": ["review"], "success_schema": "ExpectationGapResponse"},
|
||||
},
|
||||
"/repos/{repository_id}/features": {
|
||||
"post": {"tags": ["registry"], "success_schema": "IdResponse"}
|
||||
},
|
||||
@@ -759,6 +763,24 @@ def test_api_analysis_run_loop(tmp_path):
|
||||
assert run_decisions_response.json()[0]["notes"] == (
|
||||
"Reject once to exercise review correction."
|
||||
)
|
||||
gap_response = client.post(
|
||||
f"/repos/{repository_id}/expectation-gaps",
|
||||
json={
|
||||
"analysis_run_id": run["analysis_run"]["id"],
|
||||
"expected_type": "capability",
|
||||
"expected_name": "Use OpenRouter Models",
|
||||
"source": "human",
|
||||
"notes": "Expected provider capability was missing.",
|
||||
},
|
||||
)
|
||||
assert gap_response.status_code == 201
|
||||
assert gap_response.json()["expected_name"] == "Use OpenRouter Models"
|
||||
gaps_response = client.get(
|
||||
f"/repos/{repository_id}/expectation-gaps",
|
||||
params={"analysis_run_id": run["analysis_run"]["id"]},
|
||||
)
|
||||
assert gaps_response.status_code == 200
|
||||
assert gaps_response.json()[0]["source"] == "human"
|
||||
|
||||
run_response = client.post(f"/repos/{repository_id}/analysis-runs", json={})
|
||||
assert run_response.status_code == 201
|
||||
@@ -1154,6 +1176,23 @@ def test_ui_register_analyze_and_approve_loop(tmp_path):
|
||||
assert "README.md:1-2" in run_detail.text
|
||||
assert "ID " in run_detail.text
|
||||
assert "No review decisions yet." in run_detail.text
|
||||
assert "Expectation Gaps" in run_detail.text
|
||||
assert "Record Gap" in run_detail.text
|
||||
|
||||
gap_response = client.post(
|
||||
f"{run_path}/expectation-gaps",
|
||||
data={
|
||||
"expected_type": "capability",
|
||||
"expected_name": "Use OpenRouter Models",
|
||||
"source": "human",
|
||||
"notes": "Expected from provider docs.",
|
||||
},
|
||||
follow_redirects=False,
|
||||
)
|
||||
assert gap_response.status_code == 303
|
||||
run_detail = client.get(run_path)
|
||||
assert "Use OpenRouter Models" in run_detail.text
|
||||
assert "Expected from provider docs." in run_detail.text
|
||||
|
||||
approve_response = client.post(
|
||||
f"{run_path}/candidate-graph/approve",
|
||||
|
||||
Reference in New Issue
Block a user