4.6 KiB
12 — Acquisition, source packages and binary packages
Implementation status: IMPLEMENTED & VERIFIED (2026-11-26). See STATE and VERIFICATION for implemented files and observed checks.
Requirements and ownership
- Requirements: R-006, R-009, R-014, R-015.
- Delivery phase: Native package management.
- Intended configured role: sol_implementer at XHigh; fresh astra_reviewer acceptance.
- Dependencies: 11 resolved immutable identities; 05 snapshots; 07 artifact primitives; 13 builders; 16 registry protocol for hosted distribution.
- Proposed exclusive implementation scope: src/package/fetch/, src/package/archive/, src/package/binary/, tests/package-fetch/; root owns package manifest versions.
Before dispatch, reconcile these paths with the real HEAD, write a full task spec, lint it, and transfer shared-file ownership explicitly. Paths that do not yet exist are NEW. Source-disjoint work still coordinates shared state, ports and build directories.
Design and interfaces
- Support explicit local paths, exact Git revisions, checksummed archives and registry releases. Materialize into managed dependency storage, never modify external source checkouts. Network operations are full dependency/build operations, not metadata-watch work.
- Verify immutable source identity before use. Source package manifests retain build.cpp, optional profiles, selected helper cpp/hpp and declared source/include inputs, so exported sources work without .git.
- Use bounded streaming downloads and extraction. Validate paths, link targets, entry sizes/counts, duplicate/colliding paths and archive traversal before publishing extracted content. Interrupted downloads remain uncommitted.
- Separate source identities from built binary variants. Binary identity includes target, compiler/helpers, stdlib ABI, linkage, CPU/features, profile options, sanitizers/LTO and relevant dependency closure.
- Treat BMI/PCH and other opaque path-sensitive products as toolchain/path-specific. Reject incompatible binaries; build from allowed sources or fail clearly. Binary package distribution is not remote action-cache support.
- Use runtime credential providers/configuration outside committed manifests/locks. Verify HTTPS and configured registry authority; redact authentication from progress/error records.
Implementation sequence
- Implement source-provider adapters with deterministic identities and managed staging.
- Implement verified archive materialization and complete source-package manifests.
- Implement binary variant compatibility and source-build fallback through provider/native actions.
- Add offline cache reuse, interrupted transfer recovery, concurrency ownership and bounded cleanup.
Failure behavior and boundaries
- No extraction outside the destination, overwriting source files, credential leakage or permissive TLS fallback.
- A digest verifies bytes, not publisher identity; transport/registry trust is separate.
- Mutable local source changes invalidate provider builds even with unchanged mtimes.
- A failed source build cannot publish a usable binary package.
Acceptance scenarios
- Pinned Git/local/archive variants, wrong hashes, truncated downloads and offline reuse.
- Traversal, absolute paths, symlink escapes, collisions and extraction quota failures.
- Same bytes exported from checkout/archive retain configuration helpers without Git.
- ABI/compiler/CPU/sanitizer/dependency mismatch never selects a binary optimistically.
- Concurrent fetches and cancelled builds leave no published partial package.
Verification and integration gate
NEW local HTTP/Git fixture repositories and malicious-archive fixtures; no production endpoints required. End-to-end native/provider package tests use isolated directories and verified identities. Record actual source fallback versus binary selection.
Acceptance requires observed results for these scenarios, the affected regression suite, reviewed cross-component contracts, and a fresh independent review. Record unrun checks and environment limitations; tests passing alone do not waive an invariant. No merge, push or deployment is authorized by a review verdict.
VoidLibrary reuse and upstream candidates
Void Net/Archive/Crypto facilities only after bounded-stream/extraction/TLS capabilities are verified. Focused adapters are allowed; reusable safe extraction and digest streaming can later move upstream.
Shared invariants and input/publication policies are defined in ARCHITECTURE; requirement authority is REQUIREMENTS. Return implementation evidence to VERIFICATION.