From e980b68990a4bc6a0e269f4406863f4e455309a8 Mon Sep 17 00:00:00 2001 From: Arshia Ghafoori Date: Fri, 7 Aug 2026 12:36:33 +0000 Subject: [PATCH 1/2] fix(wasix): don't inherit a dependency's entrypoint over the root's own commands `resolve_package` walked the whole dependency graph looking for an entrypoint whenever the root package didn't declare one, so a dependency that declares an entrypoint would win over the root package's own commands. `wasmer/anybuild` depends on `wasmer/bash`, which declares `entrypoint = "bash"`, so it ran bash instead of anybuild. Only let a command-less root inherit an entrypoint from a dependency. This also makes the existing "root package's only command" fallback reachable, which it previously wasn't whenever any dependency declared an entrypoint. Fixes #6870 Co-Authored-By: Claude Opus 5 (1M context) --- lib/wasix/src/runtime/resolver/resolve.rs | 69 +++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/lib/wasix/src/runtime/resolver/resolve.rs b/lib/wasix/src/runtime/resolver/resolve.rs index 67ad8a21d1c1..52b2e37f6ec1 100644 --- a/lib/wasix/src/runtime/resolver/resolve.rs +++ b/lib/wasix/src/runtime/resolver/resolve.rs @@ -797,6 +797,12 @@ fn resolve_package(dependency_graph: &DependencyGraph) -> Result Result Date: Fri, 7 Aug 2026 13:27:57 +0000 Subject: [PATCH 2/2] review: tighten the multi-command assertion and reword the gate comment Assert the exact `None` the 2+ command case is supposed to produce, so the test also fails if the resolver starts guessing between the root's own commands, and stop implying a root with commands always resolves to one of them. Co-Authored-By: Claude Opus 5 (1M context) --- lib/wasix/src/runtime/resolver/resolve.rs | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/wasix/src/runtime/resolver/resolve.rs b/lib/wasix/src/runtime/resolver/resolve.rs index 52b2e37f6ec1..3846939ba8e2 100644 --- a/lib/wasix/src/runtime/resolver/resolve.rs +++ b/lib/wasix/src/runtime/resolver/resolve.rs @@ -797,10 +797,11 @@ fn resolve_package(dependency_graph: &DependencyGraph) -> Result