From 3d4d9a992991a1742a57f0362ec9a866829dbd36 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 19 Nov 2026 10:13:52 +0000 Subject: [PATCH] fix(tests): send the over-limit Content-Length without a body in the 413 test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test_a_body_beyond_the_hub_wide_limit_answers_413_and_stores_nothing sent a real 1 MiB + 1 body. The hub answers 413 on the header and closes without reading the body, so under load the client hit BrokenPipeError while still sending; that made the gate on 67cbe0d red. The test now sends the oversized Content-Length with an empty body, as the other 413 tests do. 🎯 Fix: 93 % 💥 Break: 1 % 💸 Tokens: – ⏱️ Velocity: – 🛡️ Security: 100 % 🏆 Score: 92 🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 % Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 --- tests/test_hub_view.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_hub_view.py b/tests/test_hub_view.py index 9e6d7d1..037b328 100644 --- a/tests/test_hub_view.py +++ b/tests/test_hub_view.py @@ -686,7 +686,7 @@ class TestHubView(HubCase): self.assertEqual(self.view()["resources"]["combinedHidden"], []) def test_a_body_beyond_the_hub_wide_limit_answers_413_and_stores_nothing(self): - status, _, answer = self.call("PATCH", "/api/view", b" " * (BODY_LIMIT + 1), {**self.guard(self.host), "Content-Type": "application/json"}) + status, _, answer = self.call("PATCH", "/api/view", b"", {**self.guard(self.host), "Content-Type": "application/json", "Content-Length": str(BODY_LIMIT + 1)}) self.assertEqual(status, 413, answer) self.assertFalse((self.state / "view.json").exists())