fix(log): redact the debug_requests record and write each body to a file in a per-run folder

This commit is contained in:
imSp4rky
2026-12-04 13:18:35 -07:00
parent 8e850d168e
commit 67dea28712
8 changed files with 304 additions and 212 deletions
+2 -1
View File
@@ -487,8 +487,9 @@ def test_server_request_records_never_reach_the_remote_client(
entries = [e for e in records if e.get("operation") == "http_request"]
assert {"/v1/init", "/v1/init-rnet", "/v1/titles", "/v1/titles-rnet"} <= {e["request"]["path"] for e in entries}
server_host = server.url.split("://")[1].rstrip("/")
assert all("body" not in e["response"] for e in entries)
own = [e for e in entries if e["request"]["host"] == server_host and e["request"]["path"].endswith("/titles")]
assert own and all(isinstance(e["response"]["body"], dict) for e in own)
assert own and all((tmp_path / "server" / e["response"]["body_file"]).is_file() for e in own)
def test_an_open_channel_keeps_the_session_alive(server: SimpleNamespace, monkeypatch: pytest.MonkeyPatch) -> None: