From ddfb664f2d5c571689233183b97427827241898a Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Mon, 19 Oct 2026 10:21:26 -0700 Subject: [PATCH] docs(agents): treat network input as untrusted Ask how a hostile peer could abuse what it sends and bound that cost by design. Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/AGENTS.md b/AGENTS.md index 55598b5a73f..1a21786755d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -15,6 +15,7 @@ This file is split into nested `AGENTS.md` files based on the language/situation - Pull the latest origin changes before working. - Dig into the root cause and fix it at the source. Never work around a fixable bug with a retry, sleep, or timeout. - Fail loud and early. Error on unsupported or malformed input rather than warn and continue: supported or refused. +- Treat anything received over the network as untrusted. Ask how a hostile peer could abuse it, such as memory, CPU, or state it makes the other side hold, and bound that cost by design. - Reproduce bugs before fixing them. Land each fix with a regression test that fails without it, when one is easy. - Unit tests mock time instead of depending on wall-clock timing or sleeps. - Impair a network with bufferbloat (a rate limit below the media bitrate, behind a deep but finite queue), whose overflow drops packets too. Random loss may prove correctness, such as retransmits happening, but never gates acceptance or performance.