Connect policy-gated browser review and audit runtime
Assistant: codex Assistant-Model: gpt-6-astra Assistant-Session: 01a07ff8-19d0-7820-b4d0-1353833cb7fc
This commit is contained in:
parent
2cc32168ac
commit
83849b75d4
35 changed files with 2381 additions and 83 deletions
|
|
@ -22,6 +22,8 @@ def upstream():
|
|||
"/ok": (200, b'{"ok":true}'), "/refuse": (403, b'{"error":"forbidden"}'),
|
||||
"/broken": (200, b"broken"), "/array": (200, b"[]"),
|
||||
"/large": (200, b" " * 262145),
|
||||
"/plain-refuse": (403, b"forbidden secret-sentinel"),
|
||||
"/large-refuse": (401, b"x" * 262145),
|
||||
}.get(self.path, (500, b"{}"))
|
||||
self.send_response(status)
|
||||
self.end_headers()
|
||||
|
|
@ -60,3 +62,9 @@ def test_json_success_and_typed_refusal_preserved():
|
|||
client = JSONTransport(allow_internal_http=True)
|
||||
assert client.request("GET", origin + "/ok") == (200, {"ok": True})
|
||||
assert client.request("GET", origin + "/refuse") == (403, {"error": "forbidden"})
|
||||
|
||||
|
||||
@pytest.mark.parametrize("path,status", [("/plain-refuse",403),("/large-refuse",401)])
|
||||
def test_http_caller_refusal_is_not_relabelled_as_transport_outage(path,status):
|
||||
with upstream() as (origin,calls):
|
||||
assert JSONTransport(allow_internal_http=True).request("GET",origin+path)==(status,{})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue