0249. Bound release pack writing and portable paths
- Status: Accepted (maintainer, 2026-11-16; limits chosen during RG1.1 implementation)
- Date: 2026-11-15
- Plan: M15.5; RG1.1 part A
- Builds on: 0241
Context
ADR-0241 fixes the pack framing and digest but leaves resource limits, path portability and output replacement open.
Decision
- Caps: 64 MiB framed body, 10,000 files, 1,024 bytes per path, for writer and reader alike.
- Paths are UTF-8,
/-separated, with no empty,.or..components, no backslash or NUL, no.git/.harness/.hvc/harness.lockcomponent (ASCII-case-insensitive) and no ASCII-case-insensitive collision of a path or directory prefix. Repeated component names (a/b/a) are allowed. - Symlinks and special files in the selected set are refused, not followed.
- The writer buffers the bounded body and creates its output
exclusively; an existing output is accepted only if
byte-identical. The default output is
<hash>.hvpin the working directory. - Extraction stages beside the destination and renames into place only after the body digest and the extracted tree hash both match the pinned hash.
Alternatives considered
- Unbounded streaming: no definite resource ceiling. Streaming stays possible later under the same format and limits.
- Replacing existing outputs: risks destroying a source file or following a symlink.
- Raw OS path bytes: not portable across hosts.
Consequences
Existing git tree hashes and lock files stay byte-identical. Large packages or nonportable names must be reduced or renamed before publishing.