Problem
TestFindDarwinDockerCLIRancherDesktopPath creates a temporary Rancher executable but searches the real production candidate list. An installed Docker executable earlier in that list legitimately wins, causing the test's Rancher-only expectation to fail. Production discovery precedence is intentional.
Current baseline: 511d21603e602d3081a7df8a19521b481b45adeb.
The named test failed without exclusions on PATH head 5d1cb4a64fba239a33afd8c72292e5fdb14c7e2f and pristine main 74810ddd4de91fb6061eb3263108b84ea48e5f3d, selecting /usr/local/bin/docker instead of its temporary fixture. PR #1447 discloses the failure and excluded-test limitation. Current main retains the same test and production source. A fresh read-only audit found no duplicate correction among six open issues or overlap among 13 open PR file sets on October 10, 2026.
Narrow correction
Change only cmd/internal/agentworkspace/docker_darwin_test.go:
- Assert separately that
darwinDockerCandidatePaths(home) contains the temporary Rancher path, using slices.Contains.
- Call
findDarwinDockerCLIInPaths with test-owned absolute paths: a missing candidate followed by the executable Rancher fixture.
- Retain the existing error/path assertion and all seven discovery tests.
Preserve production precedence, explicit Docker configuration, diagnostics, fixture modes and controlled precedence/access assertions. Do not change host installations, permissions, PATH/DOCKER_PATH, workflows, timeouts or add skips. Keep this separate from #1446/#1447, #1452/#1455 and #1449.
Validation and acceptance
Historical corrected-fixture evidence reported seven passing tests, but its full command was not retained; fresh final-head validation is required. No tests were run during the current source audit.
Existing Ubuntu/macOS unit CI runs race/short tests. Linux execution and cross-compilation do not establish Darwin-tagged test execution.
Rollback is the inverse test-only diff. If investigation reveals a production discovery defect, report and scope it separately.
Problem
TestFindDarwinDockerCLIRancherDesktopPathcreates a temporary Rancher executable but searches the real production candidate list. An installed Docker executable earlier in that list legitimately wins, causing the test's Rancher-only expectation to fail. Production discovery precedence is intentional.Current baseline:
511d21603e602d3081a7df8a19521b481b45adeb.The named test failed without exclusions on PATH head
5d1cb4a64fba239a33afd8c72292e5fdb14c7e2fand pristine main74810ddd4de91fb6061eb3263108b84ea48e5f3d, selecting/usr/local/bin/dockerinstead of its temporary fixture. PR #1447 discloses the failure and excluded-test limitation. Current main retains the same test and production source. A fresh read-only audit found no duplicate correction among six open issues or overlap among 13 open PR file sets on October 10, 2026.Narrow correction
Change only
cmd/internal/agentworkspace/docker_darwin_test.go:darwinDockerCandidatePaths(home)contains the temporary Rancher path, usingslices.Contains.findDarwinDockerCLIInPathswith test-owned absolute paths: a missing candidate followed by the executable Rancher fixture.Preserve production precedence, explicit Docker configuration, diagnostics, fixture modes and controlled precedence/access assertions. Do not change host installations, permissions, PATH/DOCKER_PATH, workflows, timeouts or add skips. Keep this separate from #1446/#1447, #1452/#1455 and #1449.
Validation and acceptance
Historical corrected-fixture evidence reported seven passing tests, but its full command was not retained; fresh final-head validation is required. No tests were run during the current source audit.
-count=20, and run focused race coverage.-race -short -count=1, without-runor-skipexclusions.Closesand a personally signed, GitHub-verified commit.Existing Ubuntu/macOS unit CI runs race/short tests. Linux execution and cross-compilation do not establish Darwin-tagged test execution.
Rollback is the inverse test-only diff. If investigation reveals a production discovery defect, report and scope it separately.