Skip to content

REQ 131

sergio velderrain edited this page Nov 12, 2026 · 1 revision

REQ-131: Resume hash-pinned vendor downloads safely

Requirement

The native artifact cache shall resume a partial vendor download only when the URL identity, expected SHA-256, HTTP validator, and byte-range offset match the original request.

Rationale

Windows bootstrap payloads may be large and host networking may be interrupted. Restarting from byte zero wastes time and space, while appending bytes from a changed CDN object could install an artifact different from the one approved by the policy.

Fit Criterion

The cache writes bounded partial bytes and a private state record containing a URL fingerprint, expected digest, received length, total length when known, and ETag or Last-Modified validator. Resume sends Range and If-Range, requires the response to begin at the exact stored offset and preserve the validator, and verifies the complete SHA-256 before publishing the artifact. Missing validators, ignored ranges, changed metadata, oversized/compressed responses, or digest mismatch remain incomplete; there is no automatic restart or deletion of partial data.

Verification

TEST-132 interrupts a transfer, resumes the same content, and injects ignored range, changed validator, altered digest, and missing-validator responses. No installer is invoked from a partial artifact.

Source

SYS-REQ-033; SYS-REQ-034; REQ-128; epic #250; P2 #255

Priority

High

TestID

TEST-132

TestArtifact

Planned local HTTP fixtures and private-cache records showing byte-exact range resumption, digest verification, bounded free-space use, and preserved partial state after refusal.

CodeRef

Candidate cache helper scripts/assisted_benchmark_vendor_cache.py; no vendor download or native bootstrap is claimed by its offline tests.

Status

Candidate helper implemented locally; integration with the NSIS bundle builder and native Windows installer remains pending.

Clone this wiki locally