Sfoglia il codice sorgente

docs: record the protocol-design decisions taken

Four decisions, two of which overrule the design's own recommendations.
The agents' reasoning is left intact so the trade accepted stays visible.

Vendor libcurl 8.22.0 rather than link Debian's 8.14.1, for reasons the
agent did not weigh: a vendored build can be configured - drop what we
do not need, enable what the distro omits - and it keeps other operating
systems cheap to reach later. Recorded alongside it is the obligation
that comes with it, since that was the agent's whole objection: we own
curl's CVE tracking, and a static build is invisible to apt on a
customer box. Measured and noted that trixie does ship sftp, so this was
a choice and not a necessity.

In-process rather than a separate netd, WITH SFTP DROPPED - which is
what makes it defensible, since libssh2 was the outlier risk and the
security pass's own fallback was 'no SFTP in-process'. Also recorded
what is given up: only a separate unit could carry kernel-enforced
IPAddressDeny, so our own egress guard is now the only line of defence.

Slice 1 is IMAP + SMTP, no POP3 - but with a wider mandate than the
agents assumed: helpers for WebDAV, CalDAV and the HTTP family too, the
goal being less tenant JavaScript. That resolves an apparent conflict:
a ctx.dav built over our EXISTING HTTP client needs no HTTP in curl, so
curl can still be built with HTTP disabled while DAV helpers ride on
ctx.fetch, whose PROPFIND/REPORT support is already verified on the
wire.
fszontagh 1 mese fa
parent
commit
b712ee205d
1 ha cambiato i file con 38 aggiunte e 1 eliminazioni
  1. 38 1
      docs/superpowers/specs/2026-10-08-ctx-protocols-design.md

+ 38 - 1
docs/superpowers/specs/2026-10-08-ctx-protocols-design.md

@@ -46,7 +46,44 @@ same machinery, because there a `*` rule silently granting every mail account
 would be a genuine escalation - sending mail as a tenant's owner is not the
 same class of act as reading a collection.
 
-## Decisions that need the product owner, not me
+## DECISIONS TAKEN by the product owner (2026-10-08)
+
+These override the corresponding recommendations below. The agents' reasoning
+is left intact so the trade accepted is visible rather than erased.
+
+1. **VENDOR libcurl from git at the latest stable (8.22.0).** Chosen over
+   linking Debian's 8.14.1, and against Part 2's recommendation. The reasons
+   given are ones the agent did not weigh: a vendored build can be CONFIGURED
+   - drop what we do not need, and enable what we DO need but the distro
+   package omits - and it keeps the door open to other operating systems,
+   which is not planned but is cheap to preserve. Measured for the record:
+   trixie ships 8.14.1 WITH sftp/imap/smtp/pop3/ftps, so vendoring is a
+   choice rather than a necessity.
+   **The obligation accepted with it:** we become the CVE owner for curl, and
+   a static build is invisible to `apt` on a customer box. CLAUDE.md already
+   mandates periodic review of the cpp-httplib pin for this reason; curl needs
+   the same discipline on a larger surface, and the pin comment must say so.
+2. **IN-PROCESS in the runner, and SFTP IS DROPPED.** Chosen over the separate
+   `netd` helper. Dropping SFTP is what makes this defensible: libssh2 was the
+   outlier risk, and Part 3's fallback position was explicitly "no SFTP
+   in-process". Since SFTP is out, build curl without it. The kernel-enforced
+   `IPAddressDeny` that only a separate unit could carry is therefore NOT
+   available, so the egress guard in our own code is the only line of defence
+   and must be treated accordingly.
+3. **Slice 1 is IMAP + SMTP.** POP3 is not wanted. But the surface must ALSO
+   provide helpers for WebDAV, CalDAV and ordinary HTTP-family protocols -
+   the explicit goal being to minimise tenant JavaScript and keep it
+   maintainable. That is a wider mandate than "mail first" and it resolves one
+   apparent conflict in Part 2: a `ctx.dav` built over our EXISTING HTTP
+   client needs no HTTP support in curl at all, so curl can still be built
+   with HTTP disabled while DAV helpers are delivered on top of `ctx.fetch`,
+   whose PROPFIND/REPORT capability is already verified on the wire. Design
+   the DAV helpers that way unless something concrete argues otherwise.
+4. **0.8.2 is committed but not deployed.** Batched with the export route for
+   one later window, rather than a second outage in a week for changes no
+   consumer is waiting on.
+
+## Decisions that needed the product owner (now answered above)
 
 1. **Vendor libcurl, or link Debian's?** The instruction was to vendor from
    curl's git at the latest stable. Part 2 recommends AGAINST it and the