009-url-lifecycle — a URL that lapses is released honestly, and an address can be a subdomain
Chartered: 2026-08-30 · Status: ACTIVE ·
Source: product gap assessment .archives/removal-safe/docs/assessments/PRODUCT-GAP-ASSESSMENT-082926.md
§Card view and URL lifecycle, §Address · Predecessor: 006, closed
2026-08-30 (close-out)
Problem
The overview sells a URL as something with a life: it is claimed, it is
used, it goes quiet, its owner is told, it lapses, its slug is released, what
was there stays readable at an archive address for a while, and the name can be
reclaimed within a window. It also sells an address that can be a subdomain
(name.card.site) rather than only a path.
None of it exists. Re-verified against the tree at bab2292 rather than
inherited from the assessment:
- No lifecycle anywhere.
internal/services/cron_tasks.goregisters seven tasks — subscription expiry, four cleanups, idempotency keys, andupdate_user_activity— and not one of them concerns a link. No migration carries anarchived,released,reclaimor lapse column onlinks; the onlyexpires_atcolumns in the schema belong to idempotency keys and API tokens. - No notice schedule. The internal-notifications path exists and 006 used it, but nothing schedules anything against a resource's age or silence.
- No archive serving. A disabled or deleted link is a 404; there is no read-only mode and no second address for one.
- Subdomains: zero references in
apps/,packages/ordocs/, exactly as the assessment found.
What does exist and is worth building on: per-link click capture with
timestamps (track_links), links.datetime/last_datetime,
users.last_activity maintained by an existing cron task, host→domain_id
resolution in the redirect path (007/008 left it evaluating gates, rules,
schedules and limits), the internal-notifications fan-out, and — from 008 —
public renderers for six resource types, which is what an archive would have to
serve in a read-only form.
Objective
A URL's life is a stored, servable state rather than a policy in prose: a resource that goes quiet is noticed, its owner is told before anything is taken, a lapsed slug is released on a schedule the product can state, what was there is still readable at an archive address, and the name can be reclaimed by its former owner within a window. And an address can be a subdomain where the owner decisions below allow one.
The bar for every phase is the one 007 set and 008 and 006 kept: the serving path obeys. A stored lifecycle state that no request path reads is not done.
Phases
Each is independently shippable and revertible. Phase 00 mints the ledger and its gate before any state machine lands, for the reason four tracks have now recorded: a scoreboard minted after the work measures nothing.
| Phase | Outcome | Done when |
|---|---|---|
| 00 — The lifecycle ledger and its gate | One row per lifecycle state and per notice, naming the writer, the serving path that reads it, and the isolation/behaviour test | npm run check:lifecycle prints N of M enforced, starts at 0, is watched failing on a deliberately broken input, and a row flips only in the commit that adds its reader |
| 01 — Activity is a fact about a resource | "Quiet since" is answerable per resource from what is already recorded, and stored where the lifecycle can read it cheaply | A resource's last-used moment is derived from track_links and its own row, backfilled by migration, maintained by the write and click paths, and asserted against a database read — no new logging system |
| 02 — Lapse states and the transitions between them | active → notified → lapsed → released as stored state with the clock that moves it, and nothing else able to move it | The cron task moves rows on real thresholds, every transition is idempotent and re-runnable, and the state is refused as a client-settable field |
| 03 — The notice schedule | An owner is told before anything is taken, on the existing internal-notifications path | Each notice is sent once per state per resource, proved by a second run sending nothing; the schedule's thresholds are configuration, not literals |
| 04 — Read-only archive serving | What was at a released slug stays readable at the archive address, as a document rather than a 302 | The archive address serves 008's own renderers in a read-only form for each public type, a released slug's original address stops serving, and neither leaks anything the type's public payload withholds |
| 05 — Reclaim windows and slug release | A released slug is claimable by others only after the window, and by its former owner within it | The claim path refuses inside the window for anyone but the prior owner, proved on a running stack, and the refusal discloses nothing about who held it |
| 06 — Subdomain addressing (gated on Blocker 2) | name.card.site resolves like a domain does, through the resolution the redirect path already has | A subdomain resolves to the same resource the slug does, its quota axis is registry data (011 owns the ladder), and an unclaimed subdomain is absence |
Out of scope
Artifact hosting and zip bundles (010); the plan ladder, pricing and the slug/subdomain/storage/seat quota axes (011, though 06 must leave its axis registry-shaped); ACME/SSL automation, which is an operational decision this tree has no runner for; the card view itself, which 008 shipped; any new analytics surface.
Blockers — owner decisions
Each is named here with options and a recommendation and is answered by nobody in the meantime. None blocks the buildable remainder: phases 00–03 and 05 proceed around them, 04 needs Blocker 1 before its address is final, and 06 needs Blocker 2 before it ships at all.
- What is the archive domain? The overview implies a secondary domain
(
crd.site); this tree has one public origin and no second one configured. Options: (a) a second domain, configured like any custom domain; (b) a path prefix on the existing origin (/archive/{slug}); (c) no archive at all — a released slug 404s. Recommendation: build phase 04 against a configured archive origin with a path-prefix default, so the code is the same either way and the answer becomes configuration rather than a rewrite. The choice between (a) and (b) is a brand and DNS decision, not a code one. - Do subdomains ship, and under what rollout? Zero code exists, and a
wildcard host is an infrastructure and certificate decision as much as a
product one. Options: (a) not yet — path slugs only; (b) subdomains for
custom domains the owner already controls; (c)
name.card.sitefor everyone, which needs a wildcard certificate and a reserved-name policy. Recommendation: (b) first, since it needs no new certificate story, and treat (c) as a separate decision with 011's quota axis beside it. - What are the retention windows? The overview says 90 days of inactivity; nothing states the notice schedule, the lapse-to-release gap, or the reclaim window. Options: any triple. Recommendation: make all three configuration with stated defaults — 90 days quiet, notices at 90/104/118 days, release 30 days after lapse, reclaim for 30 days after release — and have phase 03's gate refuse a literal threshold in a handler, so changing the policy is never a deploy.
- Does a lapse ever delete anything? Recommendation: no. Release the slug and archive the document; deletion is the owner's own act. A lifecycle that deletes is a lifecycle that can lose a customer's work to a clock.
Verification
The bar is the one the last four tracks kept, and it is not restated in each phase row:
npm run verifyexit 0 andgo vet ./... && go test ./...green before every merge; the merge gate is local (ROADMAP "Standing policy").- A live E2E spec per new surface, asserting a database read rather than rendered text.
- Every new or widened gate watched failing once on a deliberately broken
input, transcribed in
evidence/. - Time is the thing this track cannot test by waiting. Every threshold is
injectable — a clock the tests set, never
time.Now()read inside a transition — and the live specs move the clock rather than the calendar. - Migrations at the next free number with a
.down.sql, applied and rolled back against a live database before any handler reads the column.
Risks
| Risk | Answer |
|---|---|
| A clock that deletes or releases something it should not | Phase 02's transitions are stored, idempotent and reversible, Blocker 4 forbids deletion, and every threshold is configuration with a test that moves the clock rather than waiting |
| A notice storm — the same owner told repeatedly | Phase 03's bar is that a second run sends nothing; the notice is a fact about a state transition, not a scan result |
| An archive that leaks what the live resource withheld | Phase 04 reuses 008's own renderers and their allowlists (ADR-0105's projection rule), and adds no second payload |
| Subdomains bought accidentally, with a certificate story nobody chose | Blocker 2 gates phase 06 entirely; nothing else in the track depends on it |
| A lifecycle state that only the admin surface reads | Phase 00's ledger is the same instrument 007's enforcement ledger was: a row is unenforced until a named serving path reads it |
Source: .station/jobs/009-url-lifecycle/README.md