diff --git a/AGENTS.md b/AGENTS.md index dc12d36..540ec99 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -7,7 +7,7 @@ ## Critical build callouts -Read these two facts before you start a build phase. They already caused a +Read these facts before you start a build phase. They already caused a confusing failure once. 1. **Force IPv4 for every Gmail connection.** This applies to IMAP and SMTP. @@ -15,6 +15,11 @@ confusing failure once. socket EOF over IPv6 from `.13`. 2. **The source address header is `X-Pm-Original-To`** (added by PurelyMail). See FR-2 and §13.7. **Never use `Delivered-To`** — Gmail overwrites it. +3. **Every `docker run` in a heartbeat must be bounded and shell-safe.** The image has + `ENTRYPOINT ["/usr/local/bin/email-agent"]`, so run shells with + `timeout 10 docker run --rm --entrypoint sh email-agent:dev -c ''`. Never issue an + unbounded `docker run`; a bare `sh -c` becomes ARGUMENTS to the binary, starts the + server, and hangs the run. ---