0028. Internal names use linora, with no compatibility code; migrations 0001-0005 reset once
Status: Accepted (2026-11-30, user decision). Completes the rename that 0026 started. Amends the status of 0011, 0302 and 0310, whose names changed.
Context
- The proof of concept named its internal identifiers after its working name, with a two-letter prefix: environment variables, cookies, the personal access token (PAT) prefix, the HKDF salt of derived token keys, the NOTIFY channels, metric names, CSS classes, the blob bucket, HTTP headers, media types, the realtime subprotocol, the Postgres roles, and the database and owner names in every dev and CI URL.
- The first rename plan kept the old names working until 1.0: tiers read the old and the new name, the API accepted both cookies and both PAT prefixes, and a later migration renamed the roles.
- Linora has never been released. The only install with data is the maintainer’s own stack.
- Shims would publish the old names in code, docs and tests for every reader of the public repo, and nobody outside needs them.
Decision
-
Every internal name uses linora.
| What |
Name |
| Environment variables |
LINORA_* (the MCP adapter: LINORA_URL, LINORA_TOKEN) |
| Cookies |
linora_session, linora_csrf; __Host- on secure origins |
| Personal access tokens |
linora_pat_ + 43 base64url characters |
| HKDF salt of derived token keys |
linora-token-v1 |
| NOTIFY channels |
linora_auth, linora_file |
| Metrics |
linora_* (linora_rt_*, linora_api_*, linora_docworker_*, linora_compactor_*) |
| CSS classes and data attributes of the web app |
ln-* |
| Blob bucket, S3 root key in compose |
linora-blobs, linora |
| HTTP headers |
X-Linora-Seq, X-Linora-Client-Grant, X-Linora-Client-Seq, internal x-linora-page-too-large |
| Media types |
application/vnd.linora.ops, application/vnd.linora.snapshot |
| Realtime subprotocol |
linora.v1, linora-rt.<token> |
| OpenAPI extensions |
x-linora-tier, x-linora-scope, x-linora-role |
| Postgres group roles and logins |
linora_api, linora_realtime, linora_docworker, linora_compactor (+ _login) |
| Database and owner in dev, CI and compose |
linora (dev password linora, refused in production, ADR 0906) |
| Realtime gateway connection flags (code only) |
CONN_* |
- No compatibility code. Old names are neither read nor accepted anywhere. Tiers ignore unknown variables, so a configuration with old names lacks its settings, and a production tier refuses to start without the required ones.
- Migrations 0001-0005 are rewritten in place, once. They now grant to the new role names. Apart from the role names, the schema they create is identical. This is a pre-1.0 baseline reset, made before the first public release; new installs apply clean migrations. From then on the rule in CONTRIBUTING holds: a released migration is never edited, and the runner’s checksum check stays.
- The one existing install is migrated once, outside the public code. A private script, never published, does it after a verified backup:
- it stops the app tiers and keeps Postgres up;
- it renames the owner, the group roles, the logins (
ALTER ROLE ... RENAME TO ...) and the database (ALTER DATABASE ... RENAME TO ...). Privileges, memberships, ownership and default privileges refer to role OIDs, so they follow the rename; SCRAM passwords survive it (MD5 ones would be cleared, and the script resets those from the env file);
- it adopts the migration ledger:
schema_migrations.checksum of 0001-0005 becomes the SHA-256 of the rewritten files, so the runner accepts them without running them again;
- it renames the bucket directory of the S3 store and the keys of the env file, keeping every value;
- then the new code is deployed with the same compose project and volumes.
- The public export fails on any old internal name (
tools/public-export): the old prefix as an environment variable, an identifier or a hyphenated name, the old package scope, the old PAT prefix and salt, the old subprotocol and media types, and the old database or owner in a URL.
Alternatives
- Read both names until 1.0 (the first plan): keeps every session and token alive, but ships the old names and the shim code publicly for no outside user.
- Rename the roles in a new migration (0006): keeps 0001-0005 frozen, but they would grant to the old role names forever, in the public repo.
- Keep the internal names: they spell out the old working name.
Consequences
- After the deploy every browser signs in again: the session cookie has a new name.
- Every PAT must be created again. A PAT is stored as the hash of its full string, and the old prefix is refused, so MCP clients need a new token and a new header.
- Keys derived from a master with
token-keys.ts derive change with the salt. Realtime tokens and client grants live minutes, so re-deriving only ends the ones in flight. Keyrings that are already derived and stored keep working.
- Dashboards and alerts use the new metric names. HTTP clients send the new headers and media type. A web client built before the rename cannot open a realtime connection (the subprotocol changed) until it reloads.
- The two dev credentials published in the repo are now
linora (database password) and linoradevsecret (S3); production tiers still refuse them.