Repository navigation
Find the packaged zmx beside the Windows daemon - #638
Merged
Merged
Conversation
The Windows package installs zmx.exe beside graphcoded.exe and never copies it into the support directory, so ZmxLocator (support bin only) reported zmx as missing. The packaged daemon then could not launch, message or kill any loop session, and Stop logged a kill that never happened (beta9 Dev Box). On Windows, prefer zmx.exe in the running executable's directory, then fall back to the support bin. macOS keeps resolving the support bin unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Colin Neilens <coneilen@microsoft.com>
coneilen
force-pushed
the
coneilen-windows-zmx-locator-pr
branch
from
October 6, 2026 06:56
c8cb157 to
5ea8dfc
Compare
coneilen
added a commit
that referenced
this pull request
Oct 6, 2026
Record the immutable, unpublished 0.1.78-windows.beta10 candidate built from 1ae1c25 with #638's packaged zmx discovery fix and #637's corrected Stop contract. Beta9 is failed/superseded and kept unchanged. Exact artifact stays complete; the other six gates and the 98/62/36 parity ledger are unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Colin Neilens <coneilen@microsoft.com>
2 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The packaged Windows daemon could not find
zmx. The package installszmx.exebeside
graphcoded.exeunder%LOCALAPPDATA%\GraphCode\current\bin, and nothingcopies it into the support directory.
ZmxLocatorlooked only at%USERPROFILE%\.graphcode\bin\zmx.exe, soisInstalledwas false.As a result, the daemon silently skipped every
zmxoperation:log while the session kept running.
That is the beta9 Dev Box section 6A
TerminalSessionOwnershipfailure, and itmatches beta8's "Stop left the Copilot process alive".
Changes
GraphcodeKit/Sources/Sessions/ZmxLocator.swift: on Windows, resolvezmx.exeinthe running executable's directory first, then fall back to the support
bin. Whenneither exists, the support path is still reported, so
isInstalledstays false.The pure helpers
candidates(...)andresolve(...)compile on every platform.macOS keeps
~/.graphcode/bin/zmxexactly.windows-tests/WindowsDaemonTests.swift: Windows XCTest for sibling-first order,the support-bin fallback, the neither-present case, and a missing executable
directory.
graphcode/Tests/SupportDirectoryTests.swift: a macOS Swift Testing check of thesame resolver, which also asserts that macOS
binaryURLis still the support bin.Test plan
Windows, pinned Swift 6.3.3 (process-local SDKROOT/PATH as in
Tools/windows/validate.ps1):RED: swift-test --package-path . --filter WindowsDaemonTests.testZmxLocator -> 1 of 3 failed, candidates returned only C:/Users/u/.graphcode/bin/zmx.exe and the packaged sibling was not preferred
GREEN: swift-test --package-path . --filter WindowsDaemonTests.testZmxLocator -> 3/3 passed
REGRESSION: swift-test --package-path . on Windows -> 103 XCTest and 6 Swift Testing tests passed, 0 failures
Also run:
swift-format lint --strict --configuration .swift-formaton the three changedfiles -> exit 0.
swift-build --configuration release --product graphcodedand--product graphcode-> both built.graphcoded.exe,graphcode.exeandzmx.exeside by side, an isolated support directory with nobin\zmx.exe, amainloop with a livegraphcode-UUIDsession, thengraphcode node stop:2eb05ba3…): memory log "could not be reached, so itwas killed", but the session survived with the same PID. Fails the Dev Box
Stop contract (Correct the Dev Box Stop qualification contract #637).
4a68a2a2…): memory log "asked to stoplooping", the session kept its PID, and
zmx historyshowed[graphcode] Stop requested from the graphin that session only. Passes theStop contract.
passed. Exact counts were not supplied here.
Not run: the Windows shell/UIA live gates and packaging validation (no shell
code changed), and a fresh packaged Dev Box run. That requalification needs a new
candidate.
Checklist
git commit -s) per the DCOmake test) — reported passing on macOS by the maintainermake check) — swift-format strict passed on Windows; SwiftLint result not separately reported