diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-02 17:56:17 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-02 18:04:24 +0900 |
| commit | c446337e75ba9fd674dd63d56ec25d7bd5b5fa31 (patch) | |
| tree | 0df8f83fd9e95e87406e350ce48816451b6d07af /crates/mozart-registry/src/repository | |
| parent | 16e856a20307a3ca20524d96ea13348db7f2cffd (diff) | |
| download | php-mozart-c446337e75ba9fd674dd63d56ec25d7bd5b5fa31.tar.gz php-mozart-c446337e75ba9fd674dd63d56ec25d7bd5b5fa31.tar.zst php-mozart-c446337e75ba9fd674dd63d56ec25d7bd5b5fa31.zip | |
test(installer): switch fixtures to in-process harness
Replaces the spawn-based runner in tests/installer.rs with the
in-process harness from Step E. Every fixture now goes through
mozart::commands::{install,update}::run with an empty RepositorySet
(Composer's `'packagist' => false` test config) and a
TraceRecorderExecutor (Composer's InstallationManagerMock), and the
EXPECT section is now asserted against the recorder's trace -
load-bearing for behavior parity, not just exit-code.
The original CI failure (suggest_replaced) is now legitimately tested:
the empty RepositorySet makes b/b unreachable just like Composer's
test config, the inline package repo's eager preload finds c/c which
replaces b/b, and the topological install order in compute_operations
produces the c/c -> a/a trace the fixture pins.
Strict trace assertion surfaced 60 Mozart-vs-Composer divergences that
the exit-code-only spawn runner had been silently ignoring. Each is
marked `installer_fixture\!(name, ignore)` for now; the categories
break down roughly as:
- alias handling (alias_in_lock2, install_aliased_alias, update_alias*)
- replace / provider trace shape (replace_priorities,
provider_satisfies_its_own_requirement, replacer_*)
- update direction strings (update_changes_url, update_reference,
update_dev_*)
- partial-update + lock interactions (partial_update_*)
- allow-list with replace/dependency interactions
(update_allow_list_with_dependencies_require_new*)
These each become individual follow-up Mozart bugs rather than mass
silent-pass.
Also marks prefer_lowest_branches as ignore: it's a real flake driven
by HashSet iteration order in the resolver, where two equivalent
candidates can be picked in either order. That's a separate
determinism bug worth its own fix.
The proxy-hack env-vars in mozart-test-harness::runner are removed -
no test currently spawns the binary, and the in-process harness
expresses Packagist disablement directly via RepositorySet::empty
rather than relying on TCP failure to suppress network calls.
Headline numbers: 75 passed (in-process, exit-code + EXPECT trace) +
112 ignored, vs prior 136 passed (spawn, exit-code only) + 51 ignored.
The drop in passing count reflects the stricter assertion bar, not
new regressions.
Also removes tests/installer_in_process.rs - its single proof-of-
concept fixture (suggest_replaced) is now part of the unified
installer.rs harness.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/mozart-registry/src/repository')
| -rw-r--r-- | crates/mozart-registry/src/repository/packagist_repo.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/mozart-registry/src/repository/packagist_repo.rs b/crates/mozart-registry/src/repository/packagist_repo.rs index a3bbf40..6f9b687 100644 --- a/crates/mozart-registry/src/repository/packagist_repo.rs +++ b/crates/mozart-registry/src/repository/packagist_repo.rs @@ -39,8 +39,7 @@ impl Repository for PackagistRepository { // that distinction, so for now both surface as `Err` and the // caller decides whether the loop wants to continue (transitive // exploration) or abort (seed-time fetch failure). - let versions = - packagist::fetch_package_versions(query.name, &self.cache).await?; + let versions = packagist::fetch_package_versions(query.name, &self.cache).await?; // A successful fetch counts as "this repo authoritatively knows // the name", even if the version list is empty — mirrors // Composer's `ArrayRepository::loadPackages` which adds the |
