Skip to content

URN legacy forms

Legacy spelling: still accepted on input, never emitted

Everything on this page is the older (v1) spelling of a URN. Hadron still accepts it as input and resolves it to the same entity, and it never emits it. When you write a URN, write the flat form described in URN composition.

This page holds the v1 forms and the rule for reading them. For the current spelling, see URN composition.

Legacy forms and the alias map

Every v1 form — the urn: scheme prefix, the :: hierarchy, the @<handle> / user: owner sigil, the app: / memory: marker segments, and the full ownership chain — is accepted on input forever (the no-deprecation posture, issue #239) and normalized toward the flat canonical.

But migration assigns the new slugs, and a collision auto-suffixes one (author-derived, e.g. code-generator-baragaun.com), so an old chain URN cannot be string-rewritten to its flat form — the mapping is data. Resolution uses a stored alias map, not a textual transform. Without it, "accepted forever" would silently decay to "accepted if unambiguous."

Local-alias mint. Whenever a foreign-rooted resource is materialized under a local root — clone, import, install-materialization, or account merge — the local URN gets a locally minted, collision-checked alias slug, never the foreign slug adopted verbatim. Link / share / subscribe surfaces read the resource in place (owner-rooted, no local URN) and can't collide.

So two callers submitting two different alias forms for the same logical URN still resolve to the same entity, and the platform stores and emits one canonical v2 spelling.

Where the memory ends in a :: URN

A v1 node or edge URN still has to be split into a memory URN and a loc, and the grammar alone does not say where the boundary falls: a::b::c::d::e could be memory a:b with loc c:d:e, or memory a:b:c:d with loc e. The platform settles it once, for every implementation (cor:urn:010:04):

Everything before the last :: is the memory URN. The final :: segment is the whole loc, and the single colons inside it are loc atoms.

hrn:node:acme.com::mmdata::review:sort-imports
  memory  acme.com:mmdata
  loc     review:sort-imports

hrn:node:acme.com::mmdata::services::db-helpers::query
  memory  acme.com:mmdata:services:db-helpers
  loc     query

The reason is that the memory part of a v1 URN is variable-length: legacy memory URNs were minted as ownership chains, so the memory can run to several atoms. A loc's atoms, by contrast, join with a single colon, never ::. The variable-length part is therefore on the left and the loc is exactly one :: segment. Read from the left instead and a chain-addressed memory's node URNs resolve to a memory that does not exist — a wrong answer rather than a refusal.

(The examples here are shaped to show where the cut falls, and are not themselves minted URNs — the boundary is decided by the delimiter, not by which role a legacy chain ended in.)

That variable length is a property of the legacy chains this rule has to decompose, not of the current grammar: a v2 memory URN is <root>:<slug> with a single-atom slug (a memory slug is one atom), which is exactly why the flat form needs no boundary rule and the :: form does.

The same atoms mean different things in the two grammars. This is the trap when rewriting a URN by hand:

written as memory loc
acme.com::mmdata::services::db-helpers::query acme.com:mmdata:services:db-helpers query
acme.com:mmdata:services:db-helpers:query acme.com:mmdata services:db-helpers:query

Both are accepted, and they address different things. That is a second reason a v1 URN cannot be string-rewritten into its flat form: beyond the alias mapping being data, simply collapsing the doubled colons changes where the boundary is read.