| 1 | { |
| 2 | "schemaVersion": 1, |
| 3 | "implementation": "zipelo-rust-memory-zip-create", |
| 4 | "baseline": "9626abbf22f3a4c66a996e64601694ed5fe98763", |
| 5 | "scope": "Owned finite memory entries to a single completed ZIP32 Vec<u8>. Backend implementation candidate only. No file input, traversal, extraction, publication, worker, IPC or UI.", |
| 6 | "api": { |
| 7 | "function": "create<C>(Request, C) -> Result<Vec<u8>, Failure> where C: FnMut(Checkpoint) -> Result<(), Stop>", |
| 8 | "entry": "Entry { name: String, bytes: Box<[u8]> }", |
| 9 | "request": "Request { entries: Vec<Entry>, options: Options, limits: Limits, timeout: Duration }", |
| 10 | "options": "Options { method: Method::Stored|Deflate, encrypted: bool, split: bool, zip64: bool }; Default: Deflate, unsupported flags false", |
| 11 | "limits": "Limits { input: u64, output: u64, entries: usize, processed: u64 }; each effective limit is min(caller, hard maximum). entries includes artifact.", |
| 12 | "failures": [ |
| 13 | "InvalidRequest", |
| 14 | "Unsupported", |
| 15 | "UnsafeName", |
| 16 | "Conflict", |
| 17 | "Budget", |
| 18 | "Cancelled", |
| 19 | "Deadline", |
| 20 | "Allocation", |
| 21 | "Engine" |
| 22 | ], |
| 23 | "stops": [ |
| 24 | "Cancelled", |
| 25 | "Deadline" |
| 26 | ], |
| 27 | "checkpoint": "Start, Validate{index}, Entry{index}, Input{index,offset,len}, Write{offset,len,extent}, Seek{from,to}, Flush, Finish, Return. Offsets and extent describe the operation before mutation. No byte content exposed.", |
| 28 | "ownership": "Request ownership transfers at call. Entry bytes are read without modification, then dropped normally. No input recovery API on failure; do not claim moved inputs are returned or zeroized." |
| 29 | }, |
| 30 | "limits": { |
| 31 | "inputs": [ |
| 32 | 1, |
| 33 | 1024 |
| 34 | ], |
| 35 | "inputBytes": 16777216, |
| 36 | "outputBytes": 16777216, |
| 37 | "entriesIncludingArtifact": 1025, |
| 38 | "processedBytes": 33554432, |
| 39 | "nameBytes": 1024, |
| 40 | "componentBytes": 255, |
| 41 | "inputChunkBytes": 65536, |
| 42 | "timeoutSecondsMaximum": 300, |
| 43 | "timeoutZero": "InvalidRequest", |
| 44 | "processedAccounting": "Reserve full known input total before creating the writer. Every output write checks input total + max(previous extent, write end), including central directory and patch writes. Rewrites do not charge duplicate bytes. Never infer a pass just from final output length.", |
| 45 | "allocation": "Check length and budgets before try_reserve_exact/resize. Private output Vec only. Input already allocated by caller; no total heap cap. Allocator may reserve more capacity than requested. ZIP metadata and compressor allocation/OOM/panic are not fully recoverable." |
| 46 | }, |
| 47 | "format": { |
| 48 | "methods": "Stored or Deflate level 6; default Deflate", |
| 49 | "zip64": "Rejected option; large_file(false), default auto_large_file=false, at most 16 MiB and 1024 entries", |
| 50 | "time": "Explicit DateTime::DEFAULT = DOS 1980-01-01 00:00:00", |
| 51 | "permissions": "Fixed regular file mode 0644; no filesystem metadata is restored.", |
| 52 | "entries": "Input order retained; only file entries, empty files allowed; no empty archive or explicit directory entries.", |
| 53 | "extra": "No comment or custom extra fields supplied; library owns all ZIP encoding and CRC." |
| 54 | }, |
| 55 | "names": { |
| 56 | "policy": "Portable ASCII subset, independent of host OS. No Unicode normalization or OrdinalIgnoreCase emulation.", |
| 57 | "reject": "Empty/non-ASCII name; >1024 bytes; empty, dot or parent components; components >255 bytes; leading/trailing slash; backslash; ASCII controls including DEL; <>:\"|?*; trailing space/dot; all-space component; Windows reserved CON PRN AUX NUL CONIN$ CONOUT$ COM1..9 LPT1..9 stems (case-insensitive, trim spaces before extension).", |
| 58 | "conflicts": "ASCII-case-insensitive duplicates and file/child conflicts in either order. Intermediate directory case spelling is not canonicalized.", |
| 59 | "compatibility": "Stricter than C# Linux names and Windows backslash normalization. Unicode/Korean and OS parity remain unsupported. DOS timestamp differs from C# generation time. ZIP byte-for-byte equality is not a parity criterion." |
| 60 | }, |
| 61 | "lifecycle": { |
| 62 | "gate": "First observed gate failure is sticky. Failed checks, storage limit/allocation/seek errors block later writes, seeks, flushes and callbacks. Preparation errors are latched before explicitly dropping ZipWriter.", |
| 63 | "finish": "ZipWriter::finish consumes writer; it can internally Drop/finalize again on error. Returned original ZipError is mapped before considering later cleanup effects, so cleanup does not replace the original returned cause. Storage failures carry typed Failure inside io::Error.", |
| 64 | "dropLimit": "Cannot suppress upstream Drop stderr diagnostics or all backend-internal retry work. On backend-only finish error, implicit Drop occurs before the error becomes visible to caller; do not claim all internal cleanup writes are preblocked in that case. No artifact escapes on any returned error.", |
| 65 | "success": "Only successful finish followed by final Return cancellation/deadline checkpoint permits Vec extraction. No partial artifact is public.", |
| 66 | "deadline": "Monotonic Instant checked before and after caller callback. Deadline/cancellation are cooperative between calls. Callback and codec calls cannot be preempted; panic/OOM/CPU hard limits and live supervision are not implemented." |
| 67 | }, |
| 68 | "dependencies": { |
| 69 | "direct": "zip =9.5.0, default-features=false, deflate-flate2-zlib-rs", |
| 70 | "newPackages": 0, |
| 71 | "registryPackages": 33, |
| 72 | "baselineRegistryPackages": 40, |
| 73 | "removed": [ |
| 74 | "base64", |
| 75 | "itoa", |
| 76 | "ryu", |
| 77 | "serde", |
| 78 | "serde_core", |
| 79 | "serde_derive", |
| 80 | "serde_json" |
| 81 | ], |
| 82 | "linuxResolvedRegistryPackages": 20, |
| 83 | "baselineLinuxResolvedRegistryPackages": 25, |
| 84 | "retainedVersionChecksumAndLinuxFeaturesUnchanged": true, |
| 85 | "license": "zip MIT; existing flate2 MIT OR Apache-2.0; zlib-rs Zlib with rust-allocator only. Cargo metadata licenses checked; no new dependency or vulnerability-free claim.", |
| 86 | "baseLockSha256": "92f7b05d7da086b4b8c6b596755ba6233129e5bac8b060b9c6b3aa63fe17fecf" |
| 87 | }, |
| 88 | "sourceEvidence": { |
| 89 | "baselineCreate": "main 018e7593 / src/Zipelo.Worker/BuiltInZipEngine.cs and src/Zipelo.Runtime/ZipWorkerClient.cs", |
| 90 | "baselineNamePolicy": "src/Zipelo.Core/OutputPathPolicy.cs", |
| 91 | "crate": "Cached zip 9.5.0 src/write.rs new, finish, Drop and src/write/options.rs. No copied codec/crypto or ZIP serializer." |
| 92 | }, |
| 93 | "validation": { |
| 94 | "sourcePrepared": true, |
| 95 | "rustfmtOnly": true, |
| 96 | "lockedOfflineMetadata": true, |
| 97 | "build": false, |
| 98 | "typeCheck": false, |
| 99 | "testExecution": false, |
| 100 | "regressionSources": "PR36 287d4dfe288247b37c6a26f82003f8f26e4a90cc provides 42 public and 11 private test functions. Cargo test target and cfg(test) child module are wired here. Tests remain owned by bugfix; manager must integrate both heads before central validation. No executed test result.", |
| 101 | "testContract": [ |
| 102 | "Stored/Deflate empty and multiple files with order/name/content/CRC/method/time", |
| 103 | "all ASCII name rejection and duplicate/ancestor collision directions", |
| 104 | "exact and one-below input/output/entries/processed limits", |
| 105 | "central-directory output overflow and rewrite accounting", |
| 106 | "cancel/deadline at Input, Write patch, Finish and Return; no returned artifact", |
| 107 | "private storage sticky failure, no subsequent mutation, original cause through Drop", |
| 108 | "ZIP64 absence and unsupported option refusal before any Write" |
| 109 | ], |
| 110 | "excluded": "Blocked EOCD security reproductions and execveat paths are not part of this candidate. Existing C# files, old expectations and all earlier PRs preserved.", |
| 111 | "regressionSourceHead": "287d4dfe288247b37c6a26f82003f8f26e4a90cc", |
| 112 | "regressionManifestSha256": "689bb46a8295cabc0bb488fc21ed1e309a54a839b1176a8c7a7cd209043b4cc4", |
| 113 | "integration": "Only Cargo.toml target and src/storage.rs cfg(test) child declaration change. No public exports or production logic change. Test source historical production hashes refer to df292b44; verify this wiring delta and new production manifest separately. PR35 alone does not contain PR36 test files." |
| 114 | }, |
| 115 | "centralCommands": [ |
| 116 | "sha256sum -c experiments/rust-memory-zip-create/SHA256SUMS", |
| 117 | "sha256sum -c tests/rust-memory-zip-create/SHA256SUMS", |
| 118 | "cargo +1.99.1 build --locked --offline --manifest-path experiments/rust-memory-zip-create/Cargo.toml --lib --target-dir tests/rust-memory-zip-create/target", |
| 119 | "cargo +1.99.1 test --locked --offline --manifest-path experiments/rust-memory-zip-create/Cargo.toml --lib --target-dir tests/rust-memory-zip-create/target -- --test-threads=1", |
| 120 | "cargo +1.99.1 test --locked --offline --manifest-path experiments/rust-memory-zip-create/Cargo.toml --test memory_zip_create --target-dir tests/rust-memory-zip-create/target -- --test-threads=1" |
| 121 | ], |
| 122 | "centralRules": "Verify exact integrated head and all files first. Require discovery of 42 public and 11 private tests; zero tests is not a pass. Report each run and fixed head separately. Stop on mismatched source or unexpected targets." |
| 123 | } |