Skip to content

Commit 4c22fbc

Browse files
committed
delivery: --out-zip mode for convert-to-fixture (attachment-ready deterministic archive)
Add a second output mode to the one-command converter: --out-zip writes a hand-built, stdlib-only ZIP (STORE-only, CRC-32 per member, fixed member timestamps) carrying the ten records, hashes.json, and an internal AUDIT-MANIFEST.txt. Provenance is derived from the candidate's pinned bytes (no wall-clock, no machine-local paths), so two runs over identical candidate bytes are byte-identical — the archive's own SHA-256 is quotable in a submission note. The engine judges the packaged bytes before the archive is written; the success report no longer claims the manifest carries the archive hash (impossible self-hash) and instead instructs pasting it into the note. Contract tests (convert-zip.test.js, 5): system-unzip-validated green path with engine VERIFIED on the extraction and honest audit-manifest fields; byte-identical determinism across runs; GATE RED writes nothing; usage errors and never-overwrite; single-byte member tamper caught by the manifest's CRC pin. Shared candidate builder extracted to intake-candidate.js (single source of truth for intake + zip tests). Docs updated (intake README attachment mode, root README). Full suite 900/900.
1 parent fd7e4d5 commit 4c22fbc

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎examples/real-fixture-intake/convert-to-fixture.mjs‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,11 @@ function buildZip(recordBuffers, manifestBytes) {
324324
cd.writeUInt32LE(e.size, 20);
325325
cd.writeUInt32LE(e.size, 24);
326326
cd.writeUInt16LE(e.nameBytes.length, 28);
327-
// 30..42 stay zero (extra, comment, disk, attrs)
327+
// 30..37 stay zero (extra, comment, disk, internal attrs); 38..41 carry
328+
// unix mode 0644 (rw-r--r--) — made-by is unix (0x031e), and with zero
329+
// external attributes Info-ZIP extracts mode-0000 files on Linux (EACCES
330+
// for every reader). Windows masks this; CI caught it.
331+
cd.writeUInt32LE((0o100644 << 16) >>> 0, 38);
328332
cd.writeUInt32LE(e.offset, 42);
329333
chunks.push(cd, e.nameBytes);
330334
offset += 46 + e.nameBytes.length;

0 commit comments

Comments
 (0)