Field notes from the cave

ADR-0015: HTTP key derivation — path vs virtual-host mode, and the --source preloader

Status: Accepted (2026-06-09). Canonicalization defaults revisable; the query-string default (strip) is the one open judgment call.

Context

HTTP retrieval must turn a request into a Goblin key, and a startup --source <dir> preloader must derive the same keys so preloaded content is actually found. The two are duals of one rule.

Decision

Two server-wide modes (flag; default = path):

HTTP request → key --source file → key
Path (default) GET /foo/bar.tar.gz /foo/bar.tar.gz src/bar/baz.txt /bar/baz.txt
Virtual-host (--http-vhost) Host: www.example.com + GET /foo/bar.tar.gz www.example.com/foo/bar.tar.gz src/www.example.com/bar/baz.txt www.example.com/bar/baz.txt

Path mode keeps the URI’s leading /; vhost mode has no leading / — the first path component is the host.

Consequences