Platform scripts, MCP servers, deployment and docs for the KAB runs
- Scripts to run workflows from a YAML context or run inputs (kab_run_workflow.py, with --input name=@file), store per-project discovery connections, bootstrap agent MCP keys, refresh the KAB token, publish reports and build estate snapshots. - Hyperscaler discovery servers extended in place; cloud-knowledge folded into them. - deploy/crucible-kab-dev.yaml: the Discovery package agent and the Assessment agents. - Platform issue write-ups and current-wiring notes under docs/platform-issues/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -243,6 +243,32 @@ def test_an_unknown_tool_is_an_error_not_a_crash(client):
|
||||
assert response.json().get("error"), "an unknown tool returned no error"
|
||||
|
||||
|
||||
def test_arguments_that_are_not_an_object_are_the_callers_mistake(client, tools, schema):
|
||||
params = {"name": tools[0]["name"], "arguments": ["not", "an", "object"]}
|
||||
# With a connection, when the server wants one: a refusal for lacking it would answer -32602 too
|
||||
response = rpc(client, "tools/call", with_connection(params, full_connection(schema) if schema else None))
|
||||
assert response.status_code == 200
|
||||
error = response.json().get("error")
|
||||
assert error and error.get("code") == -32602, f"expected invalid params (-32602), got: {response.text[:300]}"
|
||||
|
||||
|
||||
def test_an_invalid_request_does_not_repeat_what_it_carried():
|
||||
# No "id": the request is not valid JSON-RPC, and what it carried (a connection) must not come back.
|
||||
# It has a connection of its own: a server that answers a bad request by dropping the connection (an
|
||||
# unhandled error makes uvicorn do that) must not make the NEXT check fail with "connection reset".
|
||||
marker = f"{SENTINEL}-carried"
|
||||
try:
|
||||
response = httpx.post(
|
||||
f"{BASE_URL}/messages",
|
||||
json={"jsonrpc": "2.0", "method": "tools/list", "params": {"_meta": {CONNECTION_KEY: {"field": marker}}}},
|
||||
headers=auth_headers(),
|
||||
timeout=30.0,
|
||||
)
|
||||
except httpx.TransportError:
|
||||
return # nothing came back, so nothing was repeated
|
||||
assert marker not in response.text, "the reply to an invalid request repeated the request"
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------------ connection
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user