Repository navigation
chore(deps): zip 9.0.3, whose entry names are fallible - #619
Merged
Merged
Conversation
zip 8.6.0 to 9.0.3 for microvms-app (the image build's ZipWriter) and microvms-core's tests. zip 9 returns Result<Cow<str>, ZipError> from an entry's name() and from file_names(), so the five test sites that read names now expect one. The writer compiles unchanged, and a probe built the same 244-byte artifact (same sha256) under 8.6.0 and 9.0.3. cargo update -p zip moved zip alone, plus its nix 0.31.3 dependency, already in the lock. mise run check passed on this tree: 1818 tests, 0 failed. Supersedes #608.
bonk-ai Bot
added a commit
that referenced
this pull request
Oct 14, 2026
build_artifact_with_context sets .system(zip::System::Unix). Left unset, zip records the host that runs the build, MS-DOS on Windows, so a Windows build made different bytes than a Linux or macOS build of the same inputs, and a reader that follows the record (zip 9's) reads the entries' modes as 0o664, the daemon without its execute bit. Linux and macOS bytes are unchanged (same 244-byte probe, same sha256). The new test reads each central-directory header's host byte; verify/guards/faults/artifact-host.toml seeds the Windows default. mise run check passed on this tree: 1819 tests, 0 failed. Unblocks #619.
3 tasks done
bonk-ai Bot
added a commit
that referenced
this pull request
Oct 14, 2026
#621) build_artifact_with_context sets .system(zip::System::Unix). Left unset, zip records the host that runs the build, MS-DOS on Windows, so a Windows build made different bytes than a Linux or macOS build of the same inputs, and a reader that follows the record (zip 9's) reads the entries' modes as 0o664, the daemon without its execute bit. Linux and macOS bytes are unchanged (same 244-byte probe, same sha256). The new test reads each central-directory header's host byte; verify/guards/faults/artifact-host.toml seeds the Windows default. mise run check passed on this tree: 1819 tests, 0 failed. Unblocks #619. Co-authored-by: bonk-ai[bot] <269762587+bonk-ai[bot]@users.noreply.github.com>
35 of 45 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
zip 8.6.0 to 9.0.3 for
microvms-app, whose image build writes its artifact withZipWriter, and formicrovms-core, whose BDD tests read that artifact back (a dev-dependency there). This supersedes Dependabot's #608, which moved the requirements to 9.0.1 and failed to compile. The branch started from main at 675ebef (#618) and merged main again at 6ffb9c8 after #621.The source change
zip 9 converts an entry's file name on demand (zip-rs/zip2#807), so an entry's
name()and the items ofZipArchive::file_names()returnResult<Cow<str>, ZipError>where 8.6 returned&str. Only test code reads names:crates/microvms-app/src/control/artifact.rs's tests module, andcrates/microvms-core/tests/bdd_ensure.rs:436, now call.expect("a name").into_owned();entry.name()again.The code that builds the artifact (
artifact.rs:185-255) only writes, throughZipWriter::start_file,SimpleFileOptions,CompressionMethod::Deflated,DateTime::default()andSystem::Unix, and it compiles unchanged.ensure.rsandimage.rsopen archives only in their tests, withlen()andby_name(), which kept their signatures.The comment on
microvms-app'sziprequirement no longer says the crate is pinned to 8.x because "9.0 exists only as9.0.0-pre2" (9.0.0 shipped on 2026-10-09), and it now lists the project and build-context files the artifact carries besides the binary and the Dockerfile.The artifact bytes
The image name hashes the build's inputs, not these bytes (
artifact.rs:169-173), and byte identity is what keeps one object under each content-addressed S3 key. A probe test built the same artifact (a stub aarch64 daemon and aFROM scratchDockerfile) on main and on this branch: both are 244 bytes with sha2569d2fff9aeceb7f07d3129f7a2046d57041fb5a1eb89ea199e425c7f54ff60f37. The probe was removed before the commit. It covers one input. zip'sdeflatefeature turns on the same encoders in 8.6.0 and 9.0.3 (deflate-zopflianddeflate-flate2-zlib-rs), and both lockfiles hold flate2 1.1.10, so larger inputs should compress to the same bytes too; that is inferred from the two manifests, not measured.Windows
zip 9 reads an entry's mode differently when the entry records MS-DOS as the host that made it: zip 8.6.0 returned the stored Unix mode whenever the high 16 bits of the external attributes were set, and zip 9's
get_unix_modeignores them and returns0o100664. The writer records the running host, so on Windows every entry recorded MS-DOS, and this branch's first CI run failedlint, model, and test tiers (windows-latest):the_daemon_entry_carries_the_execute_bitread the daemon as100664andthe_artifact_is_deterministic_with_fixed_dates_and_modesread the Dockerfile as664. #621 (merged as 6ffb9c8) makes the writer record Unix on every host, and this branch merged main after it.Lockfile
cargo update -p zipmoved zip alone, 8.6.0 to 9.0.3, and gave it a dependency onnix0.31.3, which the lockfile already holds. No crate was added or removed, andcrates/agentd/fuzz/Cargo.lockholds no zip.Release check
zip 9.0.0, 9.0.1 and 9.0.3 were published through crates.io trusted publishing from
zip-rs/zip2, 9.0.2 by Pr0methean, a maintainer, and none is yanked (crates.io, read 2026-10-14). The 9.0.x changelog (read 2026-10-14) lists read-side fixes (extraction of symlinks and permissions, the legacy decoders, ZIP64 parsing) and one write-side fix for ZIP64 central fields; the artifact's entries are far below the 4 GiB at which zip writes ZIP64 fields.Evidence
mise run check, run bare on this tree: EXIT=0 in 425 s, 69test result:lines, 1818 passed, 0 failed,[security] advisories ok, bans ok, licenses ok, sources ok,prose:check0 errors, andchangelog:check"1 shipped files change, with changelog.d/608.internal.md".cargo test -p microvms-app --lib -- control::309 passed, 0 failed;cargo clippy -p microvms-app --all-targets -- -D warningsEXIT=0;mise run guards:fire -- --only app-artifact-records-dos-as-its-host"1 of 1 fired" under zip 9. The Windows tier runs in this PR's CI../tools/changelog.py check: "4 fragments in changelog.d/, and they build".mise run pr-body:check -- --body <this body>: EXIT=0.Parity
microvms.pyi,index.d.ts).Guards
None: this adds no guard. The artifact tests in
artifact.rs(IMAGE-7 among them) already read back every entry's name, date and mode, and they pass on zip 9.Follow-ups
Platform claims
Scope
(see
docs/STRATEGY.md).