Fix short-intent discovery and publish verified browser provider guidance
Assistant: codex Assistant-Model: gpt-6-astra Assistant-Session: 01a13690-1c84-77a2-aeee-7f517ec60f5d
This commit is contained in:
parent
9042dec5ed
commit
50077c9bea
22 changed files with 736 additions and 87 deletions
|
|
@ -58,6 +58,31 @@ def test_hosted_only_capability_and_provenance_without_local_fallback(monkeypatc
|
|||
assert result["index_source"]["capability_count"] == 1
|
||||
|
||||
|
||||
def test_hosted_browser_discovery_includes_conditional_trial_guidance(monkeypatch, capsys):
|
||||
from reuse_surface.registry import load_index
|
||||
|
||||
browser = next(item for item in load_index()["capabilities"]
|
||||
if item["id"] == "capability.infotech.headless-browser")
|
||||
payload = snapshot()
|
||||
payload["capabilities"] = [
|
||||
{"id": "capability.example.headless", "name": "Headless Knowledge Engine",
|
||||
"summary": "Headless information management", "tags": [],
|
||||
"vector": "D7 / A7 / C6 / R6"},
|
||||
browser,
|
||||
]
|
||||
serve(monkeypatch, payload)
|
||||
assert main(["plan-check", "--intent", "headless browser", "--hub-url",
|
||||
"https://registry.example", "--no-llm", "--format", "json"]) == 0
|
||||
result = json.loads(capsys.readouterr().out)
|
||||
assert result["verdict"] == "reuse"
|
||||
assert result["matches"][0]["id"] == browser["id"]
|
||||
summary = result["matches"][0]["summary"]
|
||||
assert "rapp_playwright.py" in summary
|
||||
assert "preflight" in summary and "trial --out" in summary
|
||||
assert "ephemeral" in summary and "admission is pending" in summary
|
||||
assert "availability gap" in summary
|
||||
|
||||
|
||||
@pytest.mark.parametrize("change", [
|
||||
{"stale": True}, {"stale": None}, {"composed_at": None},
|
||||
{"composed_at": "2020-01-01T00:00:00Z"},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue