docs: bound and shell-safe docker run callout in AGENTS.md

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
2026-10-11 19:56:05 +11:00
parent a4c5b24f20
commit 1dc755a740

View File

@@ -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 '<cmd>'`. Never issue an
unbounded `docker run`; a bare `sh -c` becomes ARGUMENTS to the binary, starts the
server, and hangs the run.
---