Skip to content
Toolkit

CLOSE — 010-artifact-hosting

Closed: 2026-08-30 · Status: DONE

The charter's objective, verified rather than asserted: what an author already built is hosted. Markdown and SVG are storable with a serving path each, a zip is unpacked into an addressed set of files, every entry of it passes the same gate the index does, storage is measured, bounded and freed, and a gated document has exactly one address. npm run check:hosting reports 5 of 5 served — three document kinds, one bundle, one asset — and 5 of 5 caps read from configuration, and no row flipped in a commit that did not add the serving path's reader.

All six phases are built. Nothing in this track is gated on a Blocker: the two that could have gated work — the storage model and the size model — were built against their recommendations without answering them, and the third gates only the part of phase 03 that is script, which was never in the charter to ship.

The charter's own bar, phase by phase

PhaseDone when (charter)State
00 — The hosting ledger and its gatecheck:hosting prints N of M served, starts with html alone, is watched failing on a deliberately broken input, and a row flips only in the commit that adds its serving pathMet. scripts/hosting-ledger.json + check-hosting-parity.mjs, five rows at 1 of 5, each served row naming its store, its serving path, the bound that refuses an oversized upload before a byte is written, the place the product decides the content type, its test and — for a bundle or asset — hostile fixtures. Rule H7 is the track's own rule made checkable: every Content-Type a serving path sets is an expression its row declares, and no serving path may sniff. Watched failing nine ways (evidence .station/jobs/010-artifact-hosting/evidence/phase-00-gate-watched-failing-2026-08-30.md)
01 — A kind is stored only with the path that serves itAllowlist, sniff agreement, serving path and ADR land together or not at all; Markdown is rendered by the product; SVG is served as a document, never inlineMet, two slices, both on a running stack. Markdown renders through a bounded subset escaped first, so every tag in the response was written by this tree (ADR-0123); the same slice moved what a static page is off the artifact and onto the row (settings.static_kind). SVG answers F-5 rather than deleting it: image/svg+xml joins the static allowlist and stays out of both image allowlists, because an SVG drawn inline is script on this origin and one served under ADR-0103's headers is not (ADR-0124)
02 — A bundle is unpacked, and nothing it contains decides anythingEvery bound read from configuration before the first entry is written; every refusal the whole upload; proved against a real backend with a hostile archive per ruleMet, two slices, both on a running stack. The archive is judged whole before a byte is stored — traversal, absolute and drive-qualified paths, backslash separators, symlinks, irregular modes, case-insensitive duplicates, entry count, per-entry size, total expansion, compression ratio — with hostile archives built outside this tree: four 400s, zero rows, zero bytes (ADR-0125). The expansion writes under a minted per-resource prefix and the write API accepts no name at all, which is the security property rather than a convenience (ADR-0126)
03 — A bundle is served as a siteAssets resolve through the manifest, never a path join; content type is the product's per entry; the gate, schedule, click limit and lifecycle predicate hold on every entryMet, two slices, both on a running stack, each watched failing live. The index is the entry the product names (index.html), recorded at expansion and read from the manifest, and an archive with none is refused whole (ADR-0127). Every other entry goes through the same Handle, so the hundredth file passes what the index passes — a second serving function is how one of them gets left out. The visitor's path is a manifest key; the content type is a closed table with JavaScript deliberately absent; an entry is evaluated by the click limit and never spends it (ADR-0128). With the lookup replaced by a path join, one bundle served another's secret on a 200
04 — Storage is measured, bounded and freedBytes per workspace derived, exposed on the owner's read, bounded by a registry-shaped axis, the 10 MB constant becomes configuration, and a delete moves the numberMet, three slices. stored_bytes (000042) is recorded at the paths that write bytes and nowhere else, taken from what the backend reports writing, and the workspace total is derived from the rows that carry the tenant (ADR-0129). storage_bytes_limit is the registry's first magnitude axis and is not a count: current + incoming > max, because under a count's test a workspace one byte under its allowance accepts a fifty-megabyte archive (ADR-0130). Freeing exposed that the three delete paths freed three different amounts — the generic one nothing at all — and one function frees now (ADR-0131)
05 — One address per document/uploads/* and static_url closed or made equivalent, every in-app consumer moved first, and a gated document refused at both addressesMet, two slices, with one honest qualification below. The mount refuses the bundle root and the document root; file_url — composed onto every file link the owner read, pointing at that mount — and static_url — composed from a directory nothing ever wrote — are both retired, the owner's surfaces linking to the resource's own address (ADR-0132). The document half followed (ADR-0133)

Phase 05's qualification, stated rather than buried. The charter's bar names an E2E asserting refusal at both addresses; the live E2E suite does not run in this environment (009 recorded the same limitation, and it is listed below). The property is asserted instead at the level the mount actually decides at: the guard's refusal against the product's own root constants, and the stored path of a real create through both handlers — which is what the guard reads — each watched failing. And the pre-split rows keep their second address: they are indistinguishable from an avatar by construction, and moving their bytes is Blocker 4.

What the track decided, and what it refused to

Nothing the artifact contains decides anything. The rule this track was chartered on, and it survived every phase: not a declared type, not an extension, not first bytes, not an entry's stated size, not a path inside a zip. The product decides the content type it serves, the place a byte is written and the limit that stops it, and decides all three before reading what the artifact says about itself. Gate rule H7 makes the content-type half checkable rather than advisory.

A refusal is the whole upload. An archive is inspected before it is expanded and expanded before it is stored, so a bundle that cannot be written out costs no row and no byte. The one RemoveAll in the tree runs behind a prefix-shape check that accepts only what this product minted.

The write API takes no name. ADR-0126's real content: the method a traversal would be aimed at does not exist. An entry's own path survives only in the manifest, as a label, and the leaf carries no extension.

A magnitude is not a count (ADR-0130). The quota registry's first non-count axis, and the comparison had to change with it — current + incoming > max, asked before the bytes are written.

Where the product put the bytes is the fact; what a row says is not (ADR-0133). The last slice could have closed the pre-split rows too, with a path→row lookup at serve. It was refused: that puts a query in front of every avatar, makes the mount's answer depend on a mutable row, and re-opens the normalisation question the cleaned-path check exists to close.

Blocker 3 was built around, never answered. ADR-0103's headers are unchanged; what would relax them is the owner's. Phase 03 makes the origin configuration and the policy one place, and unset keeps ADR-0103's floor whole — so the answer, when it comes, is a deployment change and not a rewrite.

Blockers handed back to the owner

Four, each with options and a recommendation in SESSION.md and the charter. None blocked the buildable remainder.

  1. What is the storage model for a bundle? Built against the recommendation — expand at upload under a per-resource prefix with a stored manifest — without the decision being taken; the read path is 008's own FileStorage.Open, and the manifest is what makes the asset path a lookup.
  2. What may a plan store? The axis is registry-shaped and unseeded; the per-file cap is configuration defaulting to today's 10 MB. 011 owns the numbers.
  3. What may a hosted artifact execute, and on which origin? Unanswered, and the only one that gates anything — the part of phase 03 that is script, which the charter never scheduled. 007's public-origin question, now arriving for a third time with "bring your React build" resting on it.
  4. What happens to documents already stored at the shared paths? New, raised by phase 05. Recommendation: a one-off operator relocation, which keeps the mount's test a pure shape test on where the product put the bytes.

What this track deliberately does not carry forward as work

The open items in SESSION.md stay listed and stay unowned by this track:

  • Rows written before 000042 read 0 bytes until something rewrites them. A migration cannot stat a bucket, and a backfill that walks the store per backend is a decision rather than a slice's aside — the same shape as Blocker 4, and worth answering with it.
  • Generic uploads (/api/v1/uploads) are counted by nothing: they have no resource row to record on.
  • A gated bundle's subresources are refused rather than served. A grant travels in the query (ADR-0092) and a browser fetching a stylesheet carries none, so an entry of a password-gated bundle 302s to the door. The gate holding is the phase bar and it holds; a grant a subresource could carry is a change to 007's mechanism.
  • A standalone splash_page link still falls through default: past the document it already has (008's close-out).
  • The live E2E suite does not run in this environment — Playwright's browser build does not match the pre-installed Chromium. A PostgreSQL 16 cluster does run here without Docker, so repository integration tests do not skip, and every phase bar was met on a running stack or against PostgreSQL by other means.

Out of scope by charter and still so: subdomain addressing (009 phase 06, gated on its own owner decision); the plan ladder, pricing and the storage quota's numbers (011); ACME/SSL; a CDN or edge cache; any new analytics surface; and what a file link means, which ADR-0102 settled.

Source: .station/jobs/010-artifact-hosting/reports/CLOSE.md

Library