-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Problem
DestinationCollisionResolver.resolveCollisions() is called in three places:
Configurator.configure()— tested viaCrossPackCollisionTestsConfigurator.dryRun()— no dedicated testDoctorRunner.run()— no dedicated test
The resolver is a pure function, so the risk is low. However, if someone removes the resolver call from dryRun, the dry-run output would show flat paths while configure would use namespaced paths — a confusing discrepancy. Similarly, doctor checks could reference wrong paths.
Proposed Tests
Dry-run
Add a test in LifecycleIntegrationTests that calls dryRun with two colliding packs and verifies the output references namespaced paths (or at minimum, that dryRun doesn't crash with colliding destinations).
Doctor
Add a test in DoctorRunnerIntegrationTests that configures two packs with colliding hook destinations, then runs doctor and verifies all checks pass (i.e., doctor checks look for files at the namespaced paths, not the flat paths).
References
Sources/mcs/Install/Configurator.swift:110— dryRun call siteSources/mcs/Doctor/DoctorRunner.swift:150— doctor call siteTests/MCSTests/LifecycleIntegrationTests.swift— existing collision testsTests/MCSTests/DoctorRunnerIntegrationTests.swift— doctor test patterns