<?xml version="1.0" encoding="UTF-8"?>
<spec xmlns="https://vibevm.org/spec/1">
  <title id="root">NEXT temporary contract 3.19 — Nix as design reference; no GitHub dependency</title>
  <status stage="impl" state="plan"/>
  <p p="1"><fact id="NEXT-A19-SCOPE" status="spec/done">Temporary normative staging unit. Its body is the accepted architecture from refined plan revision 4, section 3.19. Before production code cites this law, promote the relevant clauses into permanent specifications. This file is consumed only after semantic coverage, implemented behavior and retained evidence are accepted. The task/retirement checker cannot perform semantic acceptance.</fact></p>
  <p p="2"><fact id="NEXT-A19-U001" status="spec/done">**Accepted D-024:** взять Nix как architectural reference for exact dependency closures, isolated builds, immutable installed objects, concurrent versions, declarative profiles/generations and rollback. Это не обещание совместимости с Nix language/nixpkgs/Nix store и не обязательная зависимость от Nix runtime. Build realization recipe здесь отличается от project-local DerivationBinding D-009: первый описывает производство payload, второй — пользовательскую производную ресурса. Их provenance связывается без слияния identities.</fact></p>
  <p p="3"><fact id="NEXT-A19-U002" status="spec/done">**Recommendation:** freeze a canonical build recipe containing explicit source/dependency inputs, executor/toolchain, target ABI, environment variables, declared outputs and network policy. Its input digest is a derivation identity, not proof that outputs reproduced. Output manifest/digest and independently verified references establish realized closure; hidden ambient compiler/library/network dependencies invalidate the hermetic claim. Build providers expose execution isolation level and observed inputs. First Linux fixture builds with declared mounts/toolchain/env and no network after fetch; a provider incapable of enforcing that boundary reports non-hermetic/unavailable. HOME user mode does not pretend to provide an OS sandbox merely because files stay under HOME.</fact></p>
  <p p="4"><fact id="NEXT-A19-U003" status="spec/done">Read-only store semantics prevent routine in-place updates; corruption is diagnosed and repaired from captured bytes. A user controlling their own HOME can alter it, so content verification remains necessary. Input-addressed/cache lookup identities, output content digests and physical store paths remain separate. Prefix-bound binaries may contain their store location: destination/store-prefix compatibility is part of substitution; different prefix requires a relocatable payload or rebuild, never blind rewriting of binary strings. Do not require a privileged /nix/store to deliver the HOME scenario. See E44 for the reference model and its path constraints.</fact></p>
  <p p="5"><fact id="NEXT-A19-U004" status="spec/done">**No mandatory GitHub path anywhere in the delivered cycle.** Source resolution, transitive inputs, registry/catalog, build recipes/toolchains/bootstrap, binary substitution/cache, OCI base images, client packages, update checks and publishing all have explicit replaceable locators. Local directories/captured archives, ordinary Git over supported transports, self-hosted HTTP artifact mirrors and OCI registries provide the first alternative routes. Existing generic registry/source/provider seams should be extended, not bypassed by hardcoded github.com/API/release URLs. GitHub adapters may remain optional convenience; provenance may honestly name a GitHub origin without requiring a live request to it.</fact></p>
  <p p="6"><fact id="NEXT-A19-U005" status="spec/done">Logical package/capture identity does not equal download URL. Mirror substitution preserves exact expected content and origin provenance; different bytes require new capture/review, not fallback acceptance. Lock records exact recursive inputs, expected digests, source type and mirror policy; credentials remain host/runtime references. Native repository trust checks survive mirroring. A self-hosted binary cache may supply an exact authorized realization only after content/closure/target/recipe and producer policy validation; arbitrary cached bytes with a matching name are not trusted execution evidence. Offline missing realization may rebuild only from complete prepared inputs and declared build authority.</fact></p>
  <p p="7"><fact id="NEXT-A19-U006" status="spec/done">Required acceptance uses a local non-GitHub registry + source/artifact mirror + OCI registry/cache: bootstrap/fetch/resolve, source build and substitute, HOME install/update/remove/rollback, image build/inspect, and a prepared publication test against that local destination. The fixture independently mediates/observes egress for every exercised control process, native provider/child tool and builder/daemon workload, allowing only named local fixture endpoints and recording zero GitHub/API/raw/release attempts. Application transport counters alone are insufficient; an unobserved bypass makes the proof unavailable and cannot close acceptance. Prepared offline replay independently denies all network across the same execution boundary. Origin packages may still retain original attribution. No editing host firewall/DNS or contacting real publishers is required for this test.</fact></p>
  <p p="8"><fact id="NEXT-A19-U007" status="spec/done">Architecture principles come from documented Nix mechanisms, not the assertion that Nix inherently requires GitHub: the Nix manual also documents generic Git, tarball and local references. D-024 governs VibeVM's end-to-end independence and default experience. Nix expression evaluation/import support is separate optional future interoperability; no new general-purpose DSL is required by this programme.</fact></p>
</spec>
