ADR-0128 — Every entry of a bundle is a door the product opens
Status: Accepted · Date: 2026-08-30 · Track: 010 phase 03, second slice
Context
A bundle serves its index
(ADR-0127). Its
other files have no address at all, so the index of a real site reaches a
stylesheet that is not there. Giving them addresses is where this track's two
standing dangers meet: a second address — 008 found one at /uploads/*
answering to no gate, and 009 found seven doors behind one lapse — and
something inside the artifact deciding, because an entry arrives with a
name, a suffix and a claim about what it is, all written by a stranger.
Three things this slice has to settle, and one it must not.
Decision
- An entry is reached through
Handle, not a route of its own./l/{slug}/*is the same handler as/l/{slug}, so the lifecycle predicate, the targeting rules, the schedule, the click limit and all three interstitials run for the hundredth file exactly as they run for the index. A second serving function is how one of them gets left out — which is the defect 008 recorded and phase 05 owns, not one to add a second instance of. - The visitor's path is a manifest KEY and nothing else. It reaches no
filesystem call and is joined onto no root;
BundleManifest.Lookupdecides, and a name the manifest does not hold resolves to nothing at all. So a traversal has nothing to traverse, and the product's ownmanifest.jsonis not an entry and is not reachable. - The content type comes from the product's own closed table, keyed by the
entry's suffix. The suffix is a lookup key into what this tree wrote, never
a value copied into a response: the set of answers a stranger's archive can
produce is exactly the table, and an unknown suffix takes
application/octet-stream. JavaScript is deliberately absent from it —sandboxruns no script, so a bundle's.jscannot execute either way, and calling it a script would be the response saying what ADR-0103's floor refuses.nosniffis what makes that answer stick. - An entry is evaluated by the click limit and never spends it. A browser fetching the stylesheet of a page it was already given has not arrived at anything: counting entries would make a bundle's click count a measure of how many files its author split their site into, and would spend a limit the visitor never used. An exhausted resource still serves no more of itself. The tracking cookie goes with it, for the same reason.
- A bundle's own address is a directory.
/l/{slug}302s to/l/{slug}/, below every refusal and above the click record, so a relative reference in the author's own document resolves under the resource instead of at/l/assets/app.css— another resource's slug. One visit stays one click. - The origin a bundle may load its own files from is configuration, read in
one place (
HOSTING_ARTIFACT_ORIGIN,config.ArtifactOrigin). This is a CSP fact rather than a preference:sandboxputs the document in an opaque origin, and'self'is exactly the source expression an opaque origin does not match. The widening is one origin wide and admits only what a page draws itself with — styles, images, fonts, media. There is still noscript-src, noconnect-srcand no'self', so a bundle cannot fetch outward and cannot become the unlisted beacon 007 phase 03 refused. An unset origin keeps ADR-0103's floor whole, and a value that is not a scheme and a host is treated as unset, so a typo costs a stylesheet rather than the policy.
What this does not decide
Which origin that should be is the charter's Blocker 3 and the owner's — 007's public-origin question arriving a third time. This ADR makes the origin a seam that answer moves, and refuses outright the option that hands an author's build the origin where sessions live.
Consequences
- A gated bundle's subresources are refused, not served: a grant travels in the query (ADR-0092) and a browser fetching a stylesheet does not carry it. The gate holding is the phase bar and it holds; a grant a subresource could carry would be a change to 007's mechanism, and it is an open item rather than something this slice takes on the side.
/l/{url}/splashis a product surface, registered as a literal segment, so chi matches it before this wildcard. A bundle whose author named a filesplashat its root is unreachable at that one address.bundle-assetflips toservedin the hosting ledger — 5 of 5 — with its bound readingHOSTING_MAX_ENTRY_BYTESand hostile fixtures of its own.
Source: docs/decisions/0128-every-entry-of-a-bundle-is-a-door-the-product-opens.md