Skip to content
Toolkit

Job 008: card-view

Status: DONE Owner: @work, the routine

Phase: CLOSE — phases 00–05 closed, each proved on a running stack · Status: DONE · Updated: 2026-08-30 · Close-out: ./reports/CLOSE.md

Scoreboard: npm run check:renderers — 6 of 7 rendered (biolink, vcard, event, file, static, payment_link; link is redirect-by-design). The number is committed in scripts/renderer-ledger.json and recomputed by the gate, so this line quotes it rather than restating a census.

Dependencies: none open. 007 is DONE — the redirect path already composes display rules, schedules, click limits, interstitials and pixel emission around whatever this track puts behind it, and its three rules bind every new document here: the public payload is an allowlist (ADR-0083/0098), the product draws the author's data, never their script (ADR-0094), and a gate holds on every door into a page (ADR-0098). Charter: ./README.md. Routine: ./ROUTINE.md (batch loop, claim refs claim/008-*, budgets — inherited from 007 unchanged). Source: product gap assessment .archives/removal-safe/docs/assessments/PRODUCT-GAP-ASSESSMENT-082926.md §Card view, §Resource types.

Objective

Every public resource renders as a product page — vCard (+.vcf), event (+.ics), file and static links serving their stored documents, payment pages — and @slug renders any public resource as a summary card. The charter's phase table carries the bars; they are not restated here.

Completed

  • Closed, and the front handed on (handoff-006). Every charter phase met its own bar on a running stack, so ./reports/CLOSE.md records the track phase by phase, the two owner decisions it hands back with recommendations, and what it deliberately does not carry forward. 006 Collaboration is chartered in the same PR per docs/guides/workstream.md — README, ROUTINE (this protocol, namespace claim/006-*), SESSION — re-scoped against the overview's Collaborate pillar, with AI-agent membership, version history, backups and comment gating named as Blockers rather than answered. ROADMAP: 008 DONE, 006 ACTIVE.
  • Phase 05 — @slug is the card (phase05-card-view). One convention for every public type: /@{url} and /api/public/cards/{url} on one handler (the shape /b/{url} already has), and one page that draws whatever the server's uniform shape carries. The card is a projection of the payload its type already serves, never a second one — cardFields is handed the allowlist's output and never link.Settings, so a key it names that the type withholds yields nothing rather than leaking (ADR-0105). Proved by comparison on a running stack — every card key fetched from that type's own endpoint and matched — and watched failing four ways, including the pair that shows the rule is structural: naming event_first_alert_datetime changes nothing, and the same key leaks the instant the input becomes the blob (evidence .station/jobs/008-card-view/evidence/phase-05-running-stack-2026-08-30.md). A short link has no card (the ledger's redirect-by-design row from the other side, 404 without echoing the destination), and a gated resource summarises to a door. react-router 6 cannot express a partial-segment prefix, so the SPA route is /:cardSlug above the catch-all and the @ is tested in the component — every other path answers exactly as before. Phase 05's charter row is met.
  • Phase 04 proved on a running stack (phase04-live). The page is drawn from a links row read back out of the database, /l/{slug} 302s to /pay/{slug} with the hand-off host asserted not to be the processor's, and the Continue button is clicked — the outbound checkout intercepted — landing on the row's whole destination, not just the host it named. A stored non-http(s) destination is proved in both its shapes: bare stops at the empty-hostname check, and hosted (javascript://pay.processor.example/%0a…) is the one the scheme switch exists for — it parses to a good hostname, so a page that named it and handed the string to assign would read a plausible host and run the author's script. Watched failing three ways, each against its own neutered branch with the API rebuilt from that tree; neutering 2 is recorded because it first passed — the suite's original hostile input never reached the guard it claimed to prove (evidence .station/jobs/008-card-view/evidence/phase-04-running-stack-2026-08-30.md). The slice also repaired what phase 04 left behind: payment-link.spec.ts still asserted the 302-to-processor it replaced, and now reads the same agreement at the door that holds it. Phase 04's charter row is met.
  • Phase 04 — a payment link renders, and names where the buyer is going (phase04-payment). ADR-0099's shape a fourth type over: /l/{slug} hands the visitor to /pay/{slug} and /api/public/payments/{url} serves the payload, refusing behind closedGateFor. The census the charter row implied came back thin and the ADR says so rather than papering it: the editor collects an address and a checkout URL, models.Link has no title, and no write path in this tree stores an amount, a currency or a description — so the settings allowlist is empty on purpose, and the page states no price it does not hold (ADR-0104). What it does state is the destination host, derived server-side so what the buyer reads and where the button goes cannot disagree — the improvement a document buys over a 302 that revealed the processor only once the buyer was already on it. A destination that is not http(s) yields no action at all, the create path's own rule re-asserted where it serves. Table-driven Go tests; scoreboard 5 → 6 of 7, row watched failing two ways. Live leg is phase04-live; whether a payment link should collect commerce fields is a new Blocker.
  • Phase 03 proved on a running stack, both documents (phase03-live). A real upload each side, then /l/{slug} fetched with no token and no redirects followed: the bytes byte-for-byte, the file half's filename RFC 5987 encoded with its space, the static half's CSP asserted whole rather than by substring. The fixture's <script> is served untouched and can never run — no allow-scripts, an opaque origin, and no scheme that could fetch outward. Each document's real settings.file_path is read back out of the database and asserted absent from headers and body, as is the editor's static/<folder>/index.html. A zip carrying a stray location_url answers 404, and a gated document of each kind is a door with none of its bytes until the grant opens onto them. Watched failing four ways, each against its own neutered branch with the API rebuilt from that tree — and the pre-slice tree is caught 302ing a visitor to another host past the author's own page (evidence .station/jobs/008-card-view/evidence/phase-03-running-stack-2026-08-30.md). Phase 03's charter row is met.
  • Phase 03, the static half — a static link serves its own page (phase03-static-documents). ADR-0102 settled the file half and said it did not settle this one: HTML is not on its inline allowlist, and its default-src 'none'; sandbox would serve a static page as unstyled text. ADR-0103 answers it — the author's markup keeps its own presentation and is given nothing else: CSP sandbox (no script, opaque origin, so the session is unreachable even in principle), inline styles, data: images and fonts, and no outbound fetch, so a static page cannot become an unlisted pixel around 007 phase 03's per-provider honesty. Type declared not derived; a zip — accepted by the upload allowlist, unpacked by nothing (010's) — answers 404 rather than becoming a download the author never promised. Watched failing both ways (evidence .station/jobs/008-card-view/evidence/phase03-static-gate-failure.md); against the pre-slice tree a row carrying a stray location_url 302'd the visitor to another host past the document its author uploaded. Scoreboard 4 → 5 of 7.
  • Phase 03, the file half — a file link serves its own document (phase03-stored-documents, first slice). default:'s 302 read a location_url the file write path never sets, so a file link either 404'd or handed the visitor the storage URL — an address answering to no gate, no schedule and no limit. The branch now streams the bytes, and FileStorage grew the read side that makes that possible on both backends (local under a root guard, S3 by a signed GET, so no public bucket policy is needed). Served as data, never as script: nosniff, sandbox CSP, DENY framing, a type derived from the stored extension, and inline rendering restricted to four raster types — everything else downloads under the author's own filename (ADR-0102). Table-driven Go tests through Handle, so the gate's hold on the document is asserted where it actually runs. Scoreboard 3 → 4 of 7; ledger row watched failing on a renamed anchor (R2). Live leg is phase03-file-live.
  • Phase 02 proved on a running stack (phase02-live). The page is drawn from a links row read back out of the database, the .ics is asserted by parsing — unfolded per RFC 5545 §3.1, unescaped per §3.3.11, every line within 75 octets — and the author's own alert times are shown stored in the row and absent from payload, bytes and calendar alike. ADR-0101 is proved both ways: TZID=Europe/London beside an unmoved reading, and a floating time for both no zone and an unresolvable one. A gated event answers gated with no fields while its .ics is 403 with no BEGIN:VCALENDAR. Watched failing three ways, each against its own neutered branch with the API rebuilt from that tree (evidence .station/jobs/008-card-view/evidence/phase-02-running-stack-2026-08-30.md). Phase 02's charter row is met.
  • Phase 02 — an event renders, and its .ics answers the same gate (phase02-event). ADR-0099's shape one type over: /l/{slug} hands the visitor to /ev/{slug}, /api/public/events/{url} serves the named allowlist — the author's own alert times stay out of it — and /ics the generated file, both refusing behind closedGateFor. The redirect path's per-type hand-off is now one serveRendererPage(…, prefix) rather than a copy per type, which is how the gate-forwarding loop would have drifted. Time is ADR-0101: a stored datetime-local is a wall-clock reading, emitted as a floating time or with a TZID beside it, never coerced to an invented offset. Table-driven Go tests, the .ics asserted by parsing (unfold, split, unescape): gate on both doors, allowlist, round-trip, zone treatment, escaping and 75-octet folding. Scoreboard 2 → 3 of 7; live leg is phase02-live.
  • vcard-gate-write-path — S1's write paths are derived, not remembered (ADR-0100). The rule held a literal of five files; vcards.go and payment_links.go were never on it, so both stored a caller's gate password in the clear and gated nothing — proved on the live stack, where a vCard served its card and .vcf past a gate its author had set. S1 now derives its paths from the tree (links.Create|Update), an empty derivation is itself a failure, both handlers normalize on create and update, and migration 000034 sweeps the residue. Watched failing three ways (evidence .station/jobs/008-card-view/evidence/s1-derivation-gate-failure.md); check:secrets 5 listed → 7 derived write paths.
  • Phase 01 proved on a running stack (phase01-live). The card is drawn from a links row read back out of the database, the payload's every key is vcard_*, the .vcf is asserted by parsing — unfolded per RFC 6350, N/ADR components by position — and a gated card answers gated with no fields while its .vcf is 403 with no BEGIN:VCARD at all. Watched failing twice, each half against its own neutered branch with the API rebuilt from that tree: the gate check stubbed out, and redirect.go's vcard case back to redirectTo (the pre-#411 tree) (evidence .station/jobs/008-card-view/evidence/phase-01-running-stack-2026-08-29.md). Phase 01's charter row is met.
  • Phase 01 — vCard renders (#411). /l/{slug} hands the visitor to /vc/{slug} (ADR-0099: a renderer is an app page, serveGate's shape); /api/public/vcards/{url} serves the named allowlist and /vcf the generated file, both refusing behind closedGateFor — ADR-0098's check, now one package function shared with the biolink endpoint, as is pixel resolution (ADR-0096). Table-driven Go tests: gate holds on both doors, payload is an allowlist, .vcf round-trips. Live E2E is phase01-live.
  • Phase 00 — the renderer ledger and its gate (#410). scripts/renderer-ledger.json + scripts/check-renderer-parity.mjs (rules R1–R5, the enforcement gate's shape one concept over), wired into npm run verify as check:renderers. Eight rows against the Go registry: biolink rendered (two-file renderer), link redirect-by-design with its reason, six unrendered. Watched failing on a deleted-renderer input: .station/jobs/008-card-view/evidence/phase00-gate-failure.md.
  • Chartered — README, ROUTINE (007's protocol, claim namespace claim/008-*), this file; ROADMAP's 008 row flipped ACTIVE. Findings re-verified on f08aa15: one renderer in the type switch (redirect.go:300-310), stored documents 302'd instead of served (static_pages.go, file_links.go), no @-slug handling anywhere, og_images.go is a webhook receiver not a renderer.

Active

Nothing claimed.

Open items

None in flight. Residue handed back to the owner is listed here, once:

  • /uploads/* is still a second, ungated address for a stored document. ADR-0102 takes the storage URL out of the serving path; the mount itself still serves what is under it, and every image the app draws comes from there. Closing it to direct access is its own slice with its own blast radius.
  • static_url is composed from an address nothing ever wrote. static_pages.go's List and Get hand the author's editor GetURL("static/<folder>/index.html"), while Create and Update store the document at file_path and Create's own response returns that. The serving path reads file_path and does not guess at the other; fixing the editor-side key is one slice, and it lands with the /uploads/* question above rather than beside it — both are the same shape, a storage address for a document the product now serves.
  • A standalone splash_page link still 302s past its own document. 007 renders the splash for links carrying splash_page_id; a visit to the splash-page link itself falls through default:. Wiring the type to the document it already has is one slice, unclaimed by any charter phase — its ledger row says so.

Blockers

  1. Does a payment link collect commerce fields at all? (new, ADR-0104) — owner decision. Nothing in this tree stores an amount, a currency, a title or a description for a payment_link; the editor collects an address and a checkout URL. Options: (a) leave it — the processor's own checkout states the price, and the product's page names the host and hands off; (b) collect a display amount and currency, which then has to be reconciled against what the processor actually charges, and is decorative if it is not authoritative; (c) collect a title and description only — nameable without being a price. Recommendation: (a) now, (c) if the surface needs more. (b) is the one that can lie to a buyer about money. Blocks nothing buildable: phase 04's renderer serves what is stored, and a field added later is an allowlist entry and a row on the page. Track 011 meets the same question from pricing's side.
  2. An origin for the public pages that holds no session (charter Blocker 1; 007's Blocker 2, ADR-0096) — owner decision, deliberately re-presented at this track's close with the full inventory of public surfaces in front of it. Blocks nothing buildable; twenty of twenty-four pixel providers stay ceilinged on every new surface until answered, and the pickers already say so per pixel.

Decisions

  • Renderers before the card — a card needs something to summarize; phase 05 waits for at least one of 01–04 (charter).
  • link stays a 302 by design — the ledger records it as redirect-by-design rather than pretending a short link wants a page.

Files changed

  • handlers/{public_vcard.go,public_vcard_test.go} (new), redirect.go (vcard branch), public_biolink.go (gate + pixel checks shared), cmd/server/main.go, openapi.yaml, ADR-0099 — phase 01 API
  • apps/web: pages/public/PublicVcardPage.tsx, services/publicVcards.ts, hooks/queries/usePublicVcard.ts, App.tsx (/vc/:url), en.json — phase 01 page
  • scripts/{renderer-ledger.json,check-renderer-parity.mjs} (new), package.json (check:renderers, in verify) — phase 00
  • apps/web/tests/e2e-live/public-vcard.spec.ts (new) — phase 01 live proof
  • handlers/{vcards.go,payment_links.go} + their tests, migrations/000034_*, scripts/check-secret-storage.mjs, ADR-0100 — the derived-write-paths repair
  • handlers/{public_event.go,public_event_test.go} (new), redirect.go (serveRendererPage + event branch), cmd/server/main.go, openapi.yaml, scripts/renderer-ledger.json, ADR-0101; apps/web: pages/public/PublicEventPage.tsx, services/publicEvents.ts, hooks/queries/usePublicEvent.ts, App.tsx (/ev/:url), queryKeys.ts, en.json — phase 02
  • handlers/{stored_file.go,stored_file_test.go} (new), redirect.go (file branch + SetFileStorage), interfaces.go (FileStorage.Open), services/{storage.go,storage_s3.go,storage_open_test.go}, cmd/server/main.go, scripts/renderer-ledger.json, ADR-0102 — phase 03, file half
  • handlers/{stored_static.go,stored_static_test.go} (new), redirect.go (static branch), scripts/renderer-ledger.json, ADR-0103 — phase 03, static half
  • apps/web/tests/e2e-live/public-stored-documents.spec.ts (new) — phase 03 live proof, both halves
  • handlers/{public_payment.go,public_payment_test.go} (new), redirect.go (payment branch), cmd/server/main.go, shared/contracts/openapi.yaml, scripts/renderer-ledger.json, ADR-0104; apps/web: pages/public/PublicPaymentPage.tsx, services/publicPayments.ts, hooks/queries/usePublicPayment.ts, App.tsx (/pay/:url), queryKeys.ts, en.json, components/Card.test.tsx (census 164 → 165) — phase 04
  • apps/web/tests/e2e-live/public-payment.spec.ts (new), tests/e2e-live/payment-link.spec.ts (reads the agreement at the door phase 04 moved it to) — phase 04 live proof
  • handlers/{public_card.go,public_card_test.go} (new), cmd/server/main.go (/@{url} + /api/public/cards/{url}), ADR-0105; apps/web: pages/public/PublicCardPage.tsx, services/publicCards.ts, hooks/queries/usePublicCard.ts, App.tsx (/:cardSlug), queryKeys.ts, en.json, tests/e2e-live/public-card.spec.ts — phase 05
  • .station/jobs/008-card-view/ — charter (#409), evidence, reports/CLOSE.md
    • this file; .station/jobs/006-collaboration/ (new) and ROADMAP — the handoff

Verification

Phase 00's gate is in npm run verify and was watched failing once on a deleted-renderer input (evidence .station/jobs/008-card-view/evidence/phase00-gate-failure.md). Scoreboard: 4 of 7 rendered. Phase 01 is unit-proved (gate on both doors, allowlist, .vcf round-trip) and proved on a running stack, watched failing once per half (evidence .station/jobs/008-card-view/evidence/phase-01-running-stack-2026-08-29.md). Phase 02 is unit-proved to the same bar, its .ics asserted by parsing and its ledger row watched failing on a broken anchor, and proved on a running stack, watched failing three ways (evidence .station/jobs/008-card-view/evidence/phase-02-running-stack-2026-08-30.md). Phase 03's file half is unit-proved through Handle — the bytes, the headers, the disposition rules, the storage location's absence, and the gate holding above the branch — with its ledger row watched failing on a renamed anchor; its live leg is phase03-file-live. Phase 03's static half is unit-proved through Handle to the same bar — the bytes, the declared type, the whole CSP asserted as one string rather than by substring, the storage location's absence, the zip refusal and the gate holding above the branch — its ledger row watched failing two ways and its branch watched failing against the tree it replaced (evidence .station/jobs/008-card-view/evidence/phase03-static-gate-failure.md). Both halves are proved on a running stack in one pass, watched failing four ways (evidence .station/jobs/008-card-view/evidence/phase-03-running-stack-2026-08-30.md), so phase 03's charter row is met. Phase 04 is unit-proved (the destination rule, the empty allowlist, the gate) and proved on a running stack, watched failing three ways (evidence .station/jobs/008-card-view/evidence/phase-04-running-stack-2026-08-30.md), so its charter row is met. Phase 05 is unit-proved — the subset property asserted structurally per type rather than as a list, the redirect-by-design 404, the gate — and proved on a running stack, watched failing four ways (evidence .station/jobs/008-card-view/evidence/phase-05-running-stack-2026-08-30.md), so its charter row is met. Every charter phase is closed and verified.

Next actions

Nothing. The track is closed — ./reports/CLOSE.md, ROADMAP's 008 row DONE, and the front handed to 006 Collaboration (chartered 2026-08-30 at .station/jobs/006-collaboration/).

What this track surfaced and did not own stays where it is listed and is not re-opened here: the two owner decisions above, the three open items above, and richer card projections — a biolink and a static card carry identity, owner and action only; each richer summary is cardKeys rows under ADR-0105's cap, one slice per type if the surface ever wants it. None is a charter row and none is debt.

Source: .station/jobs/008-card-view/SESSION.md

Library