Skip to content

feat(resolver): broad host evidence discovery, virtual package (Provides) resolution & --no-deps flag - #7

Merged
brasga-a merged 3 commits into
mainfrom
feat/broad-host-evidence-and-no-deps
Sep 18, 2026
Merged

brasga-a merged 3 commits into
mainfrom
feat/broad-host-evidence-and-no-deps

Conversation

@brasga-a

Copy link
Copy Markdown
Owner

Summary

This PR establishes broad host evidence discovery and virtual package resolution to solve cross-distribution dependency resolution failures (such as installing foreign .deb packages on Arch Linux or .rpm packages on Debian/Ubuntu), and adds the --no-deps flag for standalone installations.

Key Changes

  1. Broad Host Evidence Discovery (crates/pkg-core/src/resolver/evidence.rs):
    • Dynamic executable discovery: Scans /bin and /usr/bin (~1.3ms runtime) replacing hardcoded lists with dynamic system executable capabilities (bin:<cmd>).
    • Desktop & System Subsystem Probes: Probes D-Bus (feature:default-dbus-session-bus, feature:dbus-session-bus), GSettings/DConf (feature:gsettings-backend, feature:dconf-gsettings-backend), Wayland, X11, PipeWire, PulseAudio, ALSA, CA certificates, and desktop integration resources.
    • Passive Native Host Package Inspection: Inspects Arch Linux (/var/lib/pacman/local/*/desc) and Debian/Ubuntu (/var/lib/dpkg/status) without root for installed packages and their declared %PROVIDES% / Provides: fields.
  2. Virtual Package Resolution (crates/pkg-core/src/resolver/mod.rs):
    • Package constraints (Constraint::Package) can now be satisfied by virtual package providers (both in repositories via pkg.provides / pkg.versioned_provides and from host evidence) while strictly upholding INV-007 cross-distro nominal safety boundaries.
  3. CLI & MCP --no-deps / --skip-deps Flag (crates/pkg-cli, pkg-core):
    • Adds --no-deps (alias --skip-deps) to pkg install and the MCP pkg.install tool, allowing users to install standalone packages without cascading dependency resolution.

Verification

  • 88 unit tests in pkg-core passed.
  • 26 integration test suites in pkg-cli passed, including new tests:
    • test_virtual_package_resolved_via_repository_provides
    • test_virtual_package_satisfied_via_host_feature_evidence
    • test_install_options_skip_dependencies
    • test_cli_install_with_no_deps_flag
    • test_cli_install_with_skip_deps_alias
  • cargo test --workspace passed with 0 failures.

@brasga-a
brasga-a merged commit 5579d11 into main Sep 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant