Skip to content
Toolkit

ADR-0075 — A capability with no write path is not a capability

  • Status: Accepted
  • Date: 2026-08-28
  • Deciders: Track 004 phase 02
  • Follows: ADR-0072 (a capability is a subsystem this port has), ADR-0074 (a block type declares the capability it needs), ADR-0035 (the row that is censused before it is built)

Context

Phase 02 enforces one capability per write path. Two of the eight have no write path to enforce on.

biolinks_themes. The column exists — links.biolink_theme_id, with its foreign key and its index, from the initial schema. Nothing writes it. No handler accepts it, no repository statement selects or sets it, and the one user-facing endpoint, GET /api/v1/biolinks-themes, has no consumer in apps/web at all; the only client code that touches themes is the admin CRUD surface at /admin/themes. A theme cannot be applied to a page, so no request exists that a gate could refuse.

biolinks_templates. The same shape one resource over, and thinner: the catalogue is served by a handler with a single List method, and no row anywhere records that a page came from a template. Phase 02's own grandfathering audit had already reported this as "nothing to grandfather by construction".

Both keys were minted against ADR-0072's first test — the subsystem exists in this port, with a user-facing write path. That test was applied to the catalogue, which does exist, rather than to the apply path, which does not.

The PHP reference confirms the two are not merely unimplemented but differently shaped. There, biolinks_themes and biolinks_templates in plan_settings are not booleans: they are arrays of permitted ids, checked with in_array against the submitted biolink_theme_id (LinkAjax.php:1683) and biolink_template_id (LinkAjax.php:293). The premium marker lived on the plan, as a set, not on the theme — which is why no theme row carries a plan reference and why Audit 01 recorded that gating one "requires a migration first".

Decision

Retire biolinks_themes and biolinks_templates from the capability vocabulary. Six capabilities remain: premium_blocks, ai_tools, api_is_enabled, custom_pwa_is_enabled, targeting_is_enabled, password_protection. Removed from packages/capabilities/capabilities.json, its TypeScript types, models.Capabilities and docs/GLOSSARY.md in one commit, because rule C3 refuses the intermediate state — ADR-0072 specified this as the retirement procedure and this is its first use.

The rule the retirement states, for the ninth key and after: a capability is minted for a write path, not for a subsystem. ADR-0072's first test is read against the request that would be refused. If no such request exists, there is nothing to gate, and the key is not minted until one does.

This is ADR-0035's census rule in the entitlement vocabulary: a row is censused at its call sites before it is built, and a row with no call site is a deletion rather than an item of work.

Alternatives

Keep the keys, unenforced. This is exactly finding 02-D2 — a marking that gates nothing — reintroduced one layer up, in the vocabulary that exists to end it. It also makes gate rule C5 (every registered capability has an enforcement call site) unpassable by construction, so the rule that makes 02-D2 unrepeatable could never be turned on. Rejected on both counts.

Build the apply path, then gate it. Applying a theme to a page is a product feature — an editor surface, a serving path, a decision about whether a theme's settings are copied or referenced. Phase 02 enforces existing write paths; it does not create them, and a gate is not a reason to ship a feature.

Port PHP's shape: a per-plan array of permitted ids. A per-plan set is a third gating mechanism beside quotas and capabilities, for a subsystem with no write path. If themes are ever sold, that decision is made then, against a path that exists, and it is free to choose the shape it needs — the key is not reserved by having been retired.

Consequences

Six capabilities, six enforcement call sites owed, three of them already landed. Rule C5 becomes passable and lands with the last of the remaining three, as planned.

Migration 000031 — the pre-enforcement grant — wrote all eight keys true into every existing plans.settings. The two retired keys stay in that data as inert values: ValidatePlanCapabilities inspects only registered keys, and CapabilityService.Require denies an unregistered one. The migration is not edited and no migration removes them; a value that no code can read is not worth a schema change, and if the keys are ever re-minted they will be re-minted in whatever shape the write path then needs, not inherited from a blob.

Nothing changes for any user or operator. Neither key was ever read on any path, no plan form renders capability rows yet (phase 03), and the theme and template catalogues keep serving exactly as they do today.

Track 005 and later: this ADR is the answer to "why does the plan form not offer premium themes?" — it is not an omission.

Source: docs/decisions/0075-a-capability-with-no-write-path-is-not-a-capability.md

Library