feat(resolver): deterministic cross-distro library resolution, batch prompts, and elevated extraction limits - #9
Merged
Conversation
…prompts, and elevated extraction limits
brasga-a
deleted the
feat/host-library-mapping-and-extraction-limits
branch
September 19, 2026 04:09
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.
Summary
This PR implements Option A for deterministic, fast, offline, and native resolution of cross-distribution package dependencies and handling of large desktop packages (e.g. Electron apps like ChatGPT):
crates/pkg-core/src/resolver/evidence.rs: addedcanonical_sonames_for_package,canonical_commands_for_package, andcanonical_package_equivalents.crates/pkg-core/src/resolver/mod.rs:resolve_packagenow recognizes when a package requirement maps to verified host capabilities (shared library SONAMEs on host linker paths, tool commands in/usr/bin, or equivalent packages installed in the native host package manager such as Arch ALPMglibc,alsa-lib,gtk3,gcc-libs, etc.).crates/pkg-core/src/format/mod.rs: elevated defaultExtractionLimits(max_single_file_bytes: 2 GiB,max_total_bytes: 8 GiB,max_entries: 100,000) so large binaries (likeusr/lib/chatgpt/ChatGPTat 315 MiB) extract cleanly without exceeding safety caps.crates/pkg-core/src/host/elf.rs: auxiliary foreign-architecture ELF prebuilds (e.g. vendored ARM/ARM64.nodeprebuilds bundled in multiarch npm modules inside x86_64 packages) are safely skipped during host dynamic library inspection instead of aborting the install.crates/pkg-cli/src/main.rs: aggregated direct dependency frontier candidates to display a single, clear batch prompt listing required packages/versions/formats (Install these N dependencies automatically? [Y/n]:) instead of prompting one by one, respecting--yes/-y.Verification
cargo test --workspacepassed all unit and integration tests (including INV-007 checks and newly added cross-distro resolver unit tests).cargo fmt --all --checkandcargo clippy --workspace --all-targetspassed with 0 errors/warnings.chatgpt_amd64.deb(397 MiB deb, 315 MiB binary, 1.33 GiB payload) into store.