ADR-0105: A card is a projection of the payload, not a second one
Status: Accepted · Date: 2026-08-30 · Track: 008 phase 05
Context
@slug is the overview's signature surface: one address that renders any public
resource as a summary card. Phases 01–04 gave five types a document each, and
each document is served behind an allowlist its own handler owns — the vCard
publishes fifteen vcard_* keys, the event seven event_* keys and not the
author's alert times, the payment link publishes none at all because no write
path stores one (ADR-0104).
A card has to say something about all of them. The obvious implementation — a
card handler that reads link.Settings and picks what it wants per type — makes
the card a second public payload: a second place where the question "is this
field public?" is answered, which is exactly the shape ADR-0083 was written
against. Two allowlists over one row drift, and the one that drifts is the one
nobody is looking at.
The charter names this as the phase's own risk: the second riskiest thing this track can ship is a card that becomes a second public payload.
Decision
1. The card is a projection of the payload its type already serves.
cardFields takes the map the type's own public endpoint returns —
publicVcardSettings, publicEventSettings, publicPaymentSettings — and
narrows it to a named subset. It never receives link.Settings. A key named in
cardKeys that the type's allowlist does not publish therefore yields nothing
rather than leaking: the card can only ever narrow what is already public.
This is a structural property, not a review rule. Watched both ways on a running
stack: naming event_first_alert_datetime in cardKeys changes nothing while
the input is the allowlist, and leaks the author's reminder the moment the input
is the stored blob.
Two consequences worth stating, because they are easy to conflate:
- A field the card omits that its type does publish (the vCard's note) is
narrowing — a summary is not the resource, and it holds only while
cardKeysstays short. - A field no allowlist publishes (the event's alert, the file's storage path) is
withheld — and no edit to
cardKeyscan surface it.
2. What is public but does not live in a settings allowlist is read from the
function that publishes it. The payment card's checkout_host comes from
checkoutDestination and the file card's file_name from storedFileName —
the same derivations the payment page and the download header already use, never
re-parsed here. A card that parsed the destination for itself could name a host
the payment page would not.
3. A type the ledger calls redirect-by-design has no card. A short link's
product is the 302; a card summarising its destination would make @slug a
second short-link namespace, and addressing is 009's question. cardTarget has
no row for link or splash_page, and the endpoint answers 404 — without
echoing the destination it declined to summarise.
4. The @ prefix is claimed in two places and tested in one. The API
registers /@{url} beside /api/public/cards/{url} on the same handler — the
shape /b/{url} already has, so a crawler and the page cannot be told different
things. On the client, react-router 6 cannot express a partial-segment
prefix: /@:url matches nothing and /@* is silently rewritten to /@/*.
So the SPA route is /:cardSlug, placed immediately above the catch-all, and
PublicCardPage tests the @ itself — anything else it matches by accident is
handed back to the catch-all's own behaviour, so no other path changes.
5. The gate holds on this door as on every other (ADR-0098). A summary is precisely what a gate exists to withhold, so a gated card carries the type and the slug the visitor already typed and nothing else — no fields, no owner, no target, no pixels — and records no view.
Consequences
- A type gets a richer card by adding keys to
cardKeys, and the ceiling on what that can ever reveal is the type's own allowlist. Widening the card requires widening the payload first, in the file that owns it, which is the direction a leak cannot take silently. - A new resource type gets a card by adding one
cardTargetrow; with nocardKeysentry it still renders its identity, owner and action, so@slugis never half-wired while a projection is being written. - The card counts a view. A visitor who reads a card and then opens the resource is counted twice — which is the honest reading (two resolutions), and the alternative is an address that reads a resource without it being read.
/:cardSlugsits above the catch-all, so a future top-level route must be registered before it. This is the cost of a prefix react-router cannot express, and it is why the prefix test lives in one component.
Source: docs/decisions/0105-a-card-is-a-projection-of-the-payload-not-a-second-one.md