0256. Hosted registry visibility, scopes and quotas
- Status: Accepted (maintainer, 2026-11-16)
- Date: 2026-11-16
- Plan: M15.5; RG4.1d, RG4.1f, RG4.1g, RG4.3a
(
hosted registry plan) - Review: Security and authority
Context
Proposed 0205 defines
operator-provisioned accounts and scoped opaque bearer tokens with
repo read, branch push, land, approve and "namespace publish"
scopes. 0237
lets the host own its path space. Clients send bearer tokens only
per user [[auth]] (0252).
Packs are named by content hash, so one pack may belong to several
repos.
Decision
- Package namespaces are the host's operator-provisioned
<ns>accounts and orgs; no public registration in v0. - A package's visibility is its repo's read setting. Public:
anonymous GET of its index file and packs. Private: Bearer token
with
repo:<ns>/<repo>:read. - 0205's "namespace publish" becomes
repo:<ns>/<repo>:release: create release tags and yank.pushalone cannot publish. releases/<hash>.hvpis served if any repo the caller may read has that release hash. Unauthorized and missing resources both return 404.- Operator quotas, enforced before allocation and rechecked by the bridge: pack size (default 16 MiB, at most the 64 MiB client cap), releases per repo per day (50), release bytes per namespace (1 GiB), index file size (2 MiB). Violations are 413 or 429.
Alternatives considered
- Reuse the push scope for publishing — every agent allowed to push could release.
- Serve packs by hash to anyone — confirms existence of private code to a guesser.
- Open registration with first-come names — needs abuse handling v0 cannot staff.
Consequences
Agents can push branches without release rights. The hash-to-repos map is part of the rendered cache. Private hosted packages need a project registry rule plus user auth.