0206. Hosting storage and transaction layout
- Status: Accepted (maintainer, 2026-11-17) for hosting and VC-remote storage (per-repository loose objects with quarantine). The registry-store part remains superseded by ADR-0244 (accepted 2026-11-15)
- Date: 2026-11-08
- Plan: H2, H5, H6, H9; VR3, R2
- Review: Effects, durability and the agent runtime
Context
The local VC has durable loose objects, atomic refs, OS-released locks, queue receipts and rooted GC. Registry needs immutable release/index snapshots, not a git repository. Hosting adds accounts and leases without a measured SQL need. Existing atomic_write publishes one file, not an arbitrary multi-file transaction.
Decision
Accepted for hosting and VC-remote storage: an operator-owned filesystem root containing per-repository existing .harness/vc stores, private identity snapshots, bounded transfer quarantine and recoverable transaction intents/receipts. Fixed UI assets are the only directly served directory. The separate registry store in the original proposal remains superseded by ADR-0244.
Validate namespace/repo segments and map them to generated pinned roots. Reject symlinks, hard-linked mutable files, traversal and replaced roots. No raw HTTP path or caller-selected directory is accepted by the bridge. Identity metadata is an immutable canonical snapshot plus atomic HEAD. Publish immutable object documents durably first, then the root pointer. Conditional updates take OS locks; record request identity and outcome for crash replay.
VC remote tracking/safety/transfer roots must join existing fsck/GC traversal. Imported object bytes never import trusted approval/gate indexes or store config. Registry v0 retains all published releases and signed snapshots; yanks add a new index generation. Registry GC is deferred, not accidentally delegated to VC GC. Expired quarantines require no live holder before deletion; age alone is unsafe.
One writer authority per resource, with no shared cross-repo dedup pool initially. Backup stops admission and quiesces workers, then copies a consistent filesystem snapshot and verifies fsck/digests after restore. Account credentials need explicit revocation/rotation handling on rollback; a restored old snapshot is not fresh auth.
Alternatives considered
- SQLite metadata — transactions are attractive, but an extra dependency and migration path are unnecessary until file metadata limits are measured.
- Global object pool — better dedup, but adds cross-tenant reachability, information disclosure and collection/backup coupling.
- Permanent compressed packs — lower disk use but adds repacking/indices and crash cases before measurement; wire pages do not require packed storage.
- Git-backed registry/index — conflicts with the native distribution goal and retains git acquisition as an infrastructure prerequisite.
Consequences
Hosting plan contains the actual proposed
directory/config examples; remote plan owns transfer
roots. R2 owns registry document layout and retention. Maintainer
accepted per-repository loose objects with quarantine, and
rejected a shared global object pool and permanent compressed
packs, on 2026-11-17.