Skip to content
Toolkit

CLOSE — 009-url-lifecycle

Closed: 2026-08-30 · Status: DONE

The charter's objective, verified rather than asserted: a URL's life is a stored, servable state. Quiet is a fact on the row, the transitions between active → notified → lapsed → released are stored and idempotent, the owner is told three times before the name goes, what was there is still readable at an address of its own, and the name is the former workspace's for a window after the release. npm run check:lifecycle reports 9 of 9 enforced — one fact, five states, three notices — and no row flipped in a commit that did not add the serving path's reader.

Phase 06 — subdomain addressing — is not built and is not debt: the charter gates it outright on Blocker 2, which is the owner's, and nothing else in the track depended on it. The buildable charter is finished.

The charter's own bar, phase by phase

PhaseDone when (charter)State
00 — The lifecycle ledger and its gatecheck: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 readerMet. scripts/lifecycle-ledger.json + check-lifecycle-parity.mjs, nine rows at 0 of 9, each naming its writer, its serving path, its behaviour test and its idempotence test. Two rules are this track's own and were non-vacuous from the first commit: L4, a row names its window as a configuration key and never a number; L5, no writer of an enforced row may call time.Now(). All five watched failing (evidence .station/jobs/009-url-lifecycle/evidence/phase-00-gate-watched-failing.md)
01 — Activity is a fact about a resourceLast-used derived from track_links and the row itself, backfilled by migration, maintained by the write and click paths, asserted against a database read — no new logging systemMet, on PostgreSQL. links.last_used_at (migration 000038), backfilled to the latest of creation, last edit and last recorded click, maintained by exactly two paths because a visitor arriving and an owner working are both use. Two rules moved with it (ADR-0113): a ledger dependency may name a list of writers, and L5 exempts a fact while still binding every state and notice. Watched failing four ways (evidence .station/jobs/009-url-lifecycle/evidence/phase-01-quiet-since-2026-08-30.md)
02 — Lapse states and the transitions between themThe cron task moves rows on real thresholds, every transition is idempotent and re-runnable, and the state is refused as a client-settable fieldMet, three slices, each on PostgreSQL. links.lifecycle_state with its CHECK vocabulary (000039), config.LifecycleThresholds and services.Clock handed in at the composition root, and the transition split at the layer so the repository's own predicate is what makes a second run move nothing. The lapse stops serving on seven doors, not one (ADR-0114) and is armed by configuration, disarmed by default. The release exposed that links.url was never claimed at all — a second account creating a link at somebody else's slug replaced them — and one check now answers all fourteen write paths (ADR-0115)
03 — The notice scheduleEach notice sent once per state per resource, proved by a second run sending nothing; thresholds are configuration, not literalsMet, three rungs, each on PostgreSQL. A notice cannot be idempotent the way a transition is, so it is a claim: links.lifecycle_notice (000040) is set in the same UPDATE … RETURNING that selects the rows due, and a failed send hands its rung back (ADR-0116). The second rung is claimed off the first, so no window misconfiguration can reorder the ladder, and falls back to quiet rather than to nothing (ADR-0117). The last rung's subject is the name, so it reaches a resource that has already lapsed (ADR-0118)
04 — Read-only archive servingThe archive serves 008's own renderers read-only for each public type, the original address stops serving, and neither leaks what the type's public payload withholdsMet, three slices. The address is an opaque key minted by the release transition itself (000041), because the freed name may already be somebody else's and link_id is countable (ADR-0119). What stands at it is the same projection the card serves (ADR-0105), so the phase's named leak risk is structurally impossible rather than carefully avoided; nothing on the page is clickable to the former name, and a gated archive offers no door (ADR-0120). The owner is told where their archive is through an assembled address, never the key
05 — Reclaim windows and slug releaseThe claim path refuses inside the window for anyone but the prior owner, and the refusal discloses nothing about who held itMet, and proved on PostgreSQL. ADR-0115's one claim check gained who is asking and the moment a release stops reserving. The claimant is a workspace, not a user; an unconfigured window reserves nothing; and the refusal is byte-identical to the one a stranger meets at a live name, so the claim path is never an oracle (ADR-0121). The statement — whose two deciding arms are invisible from Go — was run against PostgreSQL 16.13 with all 41 migrations applied and watched failing four ways (evidence .station/jobs/009-url-lifecycle/evidence/phase-05-reclaim-postgres-2026-08-30.md)
06 — Subdomain addressing(gated on Blocker 2)Not built, by charter. Zero code, as at chartering. The decision is the owner's and is restated below

What the track decided, and what it refused to

The clock is injected, never waited for. Every previous track could prove its bar by doing a thing and looking; this one's subject is elapsed time, and the only alternatives were a suite that sleeps or a suite nobody runs. Every threshold is configuration with a stated default, every transition reads a clock it is handed, and gate rule L5 fails the build on a writer — and, since ADR-0121, a reader — that calls time.Now(). Nothing in this track's test suite sleeps.

A fact is stamped; a transition is handed a clock (ADR-0113). The rule binds where elapsed time is decided, not where a moment is recorded — which is what let phase 01 stamp last_used_at in SQL without a loophole in L5.

Nothing is deleted by a clock (charter Blocker 4, answered rather than asked). A lapse stops the serving, a release frees the name, and the document keeps an address of its own. Deletion stays the owner's act, and the final notice says so in the sentence where an owner would otherwise assume the worst.

A taking transition is armed by configuration and disarmed by default (ADR-0114). Nothing that takes could run until the notices existed. That precondition is now discharged: 03 and 05 have both landed, so arming LIFECYCLE_TAKING_ENABLED is a deployment decision rather than a code one.

The gate refused a row and the rule widened rather than bent (ADR-0121). The reclaim row's subject is a refusal: nothing is written when the window matters, and its writer read a different window days earlier. A row now declares decides_window, and L4/L5 hold its reader to exactly what they held every writer to — proved by the break where the reader reads the wall clock and fails exactly as a writer would.

A refusal names nobody, and an archive links to nothing. The 409 that a stranger meets at a released name is byte-identical to the one at a live name (ADR-0109/0110, a third time), and the archive page states the former name as a past fact rather than a link, because the name is free and may already be somebody else's. Both are the same rule: a lifecycle surface must not become an oracle for what somebody else now holds.

Blockers handed back to the owner

Three, each with options and a recommendation in SESSION.md and the charter. None blocked the buildable remainder; one gates the phase that was not built.

  1. What is the archive domain? Built against ARCHIVE_ORIGIN with an ARCHIVE_PATH_PREFIX default, put together in exactly one place — so the answer is configuration, and rule L7 holds the two halves' defaults equal because a drifted prefix is an archive addressed where nothing renders it, with no error on either side.
  2. Do subdomains ship, and under what rollout? This is the one that gates work: phase 06 is not built and nothing in the tree presumes an answer. Recommendation unchanged — custom domains the owner already controls first, since they need no new certificate story, with name.card.site for everyone a separate decision beside 011's quota axis.
  3. What are the retention windows? All seven are configuration with stated defaults (90 days quiet; notices at 90/104/118; release 30 days after lapse; reclaim 30 days after release), and L4 refuses a threshold compiled into a handler. Answering it is an environment change, not a deploy.

What this track deliberately does not carry forward as work

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

  • links.url has no unique index, so the claim path is a check and not a constraint — two simultaneous creates of the same slug can still both pass. The window is microseconds wide; the one ADR-0115 closed was the product's whole life. The fix is a partial unique index and it wants a duplicate audit on a real database with real rows first, 004's grandfathering shape.
  • No surface shows an owner when a resource was last used, though the API answers with it on the read and both listings.
  • Should an archive serve a stored document's bytes? Today it names them: ADR-0102's byte path is addressed by the slug, so serving here needs a route keyed on the archive key, and a document readable forever by anyone holding that key is its own security bar. 010's storage model may settle it first.
  • The live E2E suite does not run in this environment — Playwright's browser build does not match the pre-installed Chromium, and the dev server wants API_PROXY_TARGET at the API's real host. Not this track's to fix; every phase bar here was met against PostgreSQL or a running stack by other means.

Out of scope by charter and still so: artifact hosting and zip bundles are 010; the plan ladder, pricing and the slug/subdomain/storage/seat quota axes are 011 (phase 06 must leave its axis registry-shaped whenever it ships); ACME/SSL automation is an operational decision this tree has no runner for; the card view itself was 008's; and this track added no capability, no quota and no analytics surface.

Source: .station/jobs/009-url-lifecycle/reports/CLOSE.md

Library