0255. Host serves a rendered static registry cache
- Status: Accepted (maintainer, 2026-11-16)
- Date: 2026-11-16
- Plan: M15.5; RG4.1b, RG4.1e, RG4.1f, RG4.3b
(
hosted registry plan) - Review: Data, schemas and wire formats
Context
0244
derives the index from tags with the same code as
harness registry build, and calls derived files a
rebuildable cache. It does not say when rendering happens or how
files are served. The Harness HTTP server is sequential with
buffered responses (0165).
Discovery probes
https://<host>/harness-registry.toml and
otherwise falls back to git (0253);
the host is not git.
Decision
The trusted bridge renders the 0238
layout into one host-wide cache directory when a release tag is
admitted or a yank changes: harness-registry.toml,
index/<ns>/<repo>,
releases/<sha256>.hvp. Index path equals the
repo path; one package per repo, rooted at the repo root.
Re-rendering from tags plus yank journals gives identical bytes.
The forge app serves the cache at the host root with per-resource
authorization and cache headers (immutable releases, short-lived
public index files, no-store private). It always
serves harness-registry.toml. An export command
writes the public subset as a plain folder for a static host or
CDN.
Alternatives considered
- Render on each request — repeated work and nondeterministic failure points on reads.
- Proxy-only static serving — fast, but the proxy cannot check Harness tokens for private packages.
- Per-repo registry roots
(
https://host/<ns>/<repo>/) — breaks host-root discovery and gives each repo its own lock source string.
Consequences
Clients need no change. Large packs occupy the sequential server, so packs are capped and busy hosts use the export. Cache corruption is repaired by re-rendering, never served.