From 94d217dc9a6a23b6bcd695b776a34ac0db0ce539 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 3 May 2026 22:30:16 +0900 Subject: fix(install): reject lock when a locked dep's require excludes the root Mozart's install verification didn't surface the slice of Composer's SAT-verify failure where a locked package's `require` targets the current root by name but the root's `version` no longer satisfies the declared constraint (e.g. lock has `b/requirer` requiring `root/pkg ^1`, root composer.json now ships `2.x-dev`). The install ran package operations against a lock that Composer would have rejected with exit-code 2. Add a targeted check that walks each locked package's requires, looks for ones aimed at the root's name, and fails with the same "found root/pkg[X.x-dev] but it does not match the constraint" pointer Composer prints from `Problem::getPrettyString`. --- crates/mozart/tests/installer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/mozart/tests') diff --git a/crates/mozart/tests/installer.rs b/crates/mozart/tests/installer.rs index 0759177..189a7c9 100644 --- a/crates/mozart/tests/installer.rs +++ b/crates/mozart/tests/installer.rs @@ -336,7 +336,7 @@ installer_fixture!(repositories_priorities2); installer_fixture!(repositories_priorities3); installer_fixture!(repositories_priorities4); installer_fixture!(repositories_priorities5); -installer_fixture!(root_alias_change_with_circular_dep, ignore); +installer_fixture!(root_alias_change_with_circular_dep); installer_fixture!(root_alias_gets_loaded_for_locked_pkgs); installer_fixture!(root_requirements_do_not_affect_locked_versions); installer_fixture!(solver_problem_with_hash_in_branch); -- cgit v1.3.1