0237. Source-path package identity
- Status: Accepted (maintainer, 2026-11-15); supersedes 0201
- Date: 2026-11-15
- Plan: M15.5; RG1.2, RG2.2
- Review: Making Tenon plugin-first
Context
ADR-0201 proposed
registry identity as (registry ID, operator-assigned namespace,
name, version), with endpoints taken only from trusted operator
config and no dependency able to name a fetch location. the
maintainer's goals need private and self-hosted registries that
work with no central authority, and direct installs from GitHub.
Go modules name a dependency by where it lives
(github.com/acme/util); Zig and Nix pin content by
hash and treat URLs as mirrors. The compiler already identifies
packages by manifest [package].name, one provider per
name (E0939), with the dependency key equal to that name (E0938,
ADR-0071). Research: PLAN-registry-v2.md §3.1.
Decision
A dependency is identified by its sha256 content hash; its
source path says where to find it. Source paths
are Go-style: a lowercase host followed by 1–3 lowercase segments,
such as github.com/acme/util,
pkgs.example.com/acme/util or
vc.example.com/acme/util. Whoever controls the host
controls the paths under it. There are no operator-assigned
namespaces and no namespace grant records.
Proposed manifest form:
util = { pkg = "pkgs.example.com/acme/util", version = "^1.2.0" }.
Dependencies may name any source path. Mirror locations, registry
roots and credentials come only from user config or the root
manifest's [sources] table, never from a dependency.
Import names and compiler identity are unchanged: the key is the
manifest name, one provider per name, no namespace syntax in
Harness source.
A future public host may add JSR-style scopes as paths under
its own host; that is the host's policy, not part of the client
protocol. std and harness stay reserved
(0245).
Alternatives considered
- Operator-assigned namespaces (0201) — every self-hosted registry needs an administrator and grant records before the first install; it cannot express GitHub installs without a second naming scheme.
- Global unique names on one public registry — creates a squatting market and makes private registries second-class.
- Namespace-qualified imports — allows two
utilproviders but changes compiler identity, hashing and coherence for no distribution benefit.
Consequences
Self-hosting needs only a host name. Two packages with the same manifest name from different paths still cannot coexist in one graph (E0939). Ownership disputes and account recovery are the host's problem, as with Go. Discovery from a path to a source kind is specified in 0238. If accepted, 0201 is superseded; its "no compiler mangling" consequence still holds.