On this page

0204. Bounded Harness VC wire protocol

Context

Local VC already owns hvc 1 objects, refs, two-stage sync and queue authority. ADR-0160 rejects all git format/protocol compatibility. HTTP v1 buffers capped messages; its curl client cannot send arbitrary binary request bodies (ADR-0181). Transferred gate/approval object strings are not remote authority.

Decision

Accepted: hvc-wire 1 with file exchange first, HTTPS later, immutable advertisement snapshots and bounded transfer leases. Reuse exact hvc objects; use typed small JSON control, raw bounded download packs, and hex upload fragments fitting the HTTP cap. No deltas, compression, permanent pack store, shallow history or git wire/object implementation.

Validate envelope hashes, every referenced kind and complete bounded closure before admission. Quarantine receives no authority indexes. Root in-flight and tracking objects for fsck/GC; promote under shared writer protection before CAS. Push changes one non-protected, non-queued branch with expected-old and durable request receipt; no force/delete/tag push. Only the local queue advances main. Serve only closure reachable from refs the authenticated actor may read.

Fetch updates tracking only; explicit sync adopts it. Reuse existing stage 1 dirty carry and stage 2 protected merge. Both-advanced (case-3) branch reconciliation is included: last-acknowledged tip, safety root and the existing merge3. Its proof records old acknowledged tip, remote tip, local parent and result; receiver verifies ancestry and recomputes the merge against supplied closure. For a resolved conflict, receiver validates expected remote tip and protected base but treats the resolution as a new authored commit, not proof of a clean merge. No hvc commit field changes; proof is session metadata bound to exact new commit.

Clone installs a protected mirror with no executable remote configuration; local queue cannot advance that mirror. A separate future authority-fork decision is needed to turn it into an independent server.

Alternatives considered

Consequences

Remote plan defines byte grammar, limits, routes, receipts and task tests. Wire version is separate from hvc format version. Maintainer accepted this transfer surface, including case-3 reconciliation, on 2026-11-17.