Repository Public
1<!--2ORIX Sonata3File: Documentation/adr/0005-packages.md4Author: Simon-Pierre Boucher5Contact: contact@spboucher.ai6-->7# ADR 0005 — Packages are inert, verified archives89Status: accepted (2026-11-24).1011- A `.sonatapkg` is an uncompressed ustar archive written and read by our own code. It can hold12 only `package.json`, Sonata sources in `src/`, `examples/`, `tests/`, and plain documentation.13- **No install script, no executable content.** Installing copies text files; nothing from a14 package is ever run. The language itself has no file, network or process access.15- Reading refuses the whole archive on any link, device, absolute or `..` path, hidden file,16 duplicate, oversize or unknown location, before anything is written. Extraction never follows17 a name from the archive without re-validating it.18- Every file is pinned by SHA-256 in `MANIFEST.sha256`; the archive's own SHA-256 is recorded in19 `sonata.lock`. `sonata pkg check` detects modified, missing and extra files.20- Resolution is local and deterministic (highest version satisfying every requirement, one21 version per package). There is no registry and no download in this version; a registry would22 be an optional source of archives verified by the same code.23- tar was chosen over zip because a strict reader and a deterministic writer fit in a few24 hundred lines without a dependency, and the system `tar` can list an archive for inspection.25