Skip to content

fix(nodeswap): Windows finder matches a node started through a junction - #850

Merged
dmmdea merged 2 commits into
mainfrom
fix/windows-finder-follows-links
Nov 11, 2026
Merged

dmmdea merged 2 commits into
mainfrom
fix/windows-finder-follows-links

Conversation

@dmmdea

@dmmdea dmmdea commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Fixed - a Windows swap sees a node started through a junction

  • Why. On Windows, llama-swap's live directory is a junction into its generation directory (<home>/llama-swap -> <home>/llama-swap-versions/<id>). The process finder compared the path CIM reports, which is the path the process was started through (the junction), with the generation path the swap names, by spelling. The two never matched. Measured on a Windows node: the swap restarted llama-swap, and both the post-restart check and the rollback's check reported "no process appeared" against a running node.
  • What it does. The finder fetches processes by file name and then matches a path by the file it names (os.SameFile). It still accepts an exact spelling. A junction or symlink on either side, or a short 8.3 name, now matches. A process whose path the OS will not give is still returned as unreadable, as before. The Linux finder already resolved links.
  • Where. internal/nodeswap/deps_windows.go (findProcessesByExeWindows, sameExecutable).
  • Check. One Windows test starts a real process through a junction and asks the finder for both the junction path and the generation path. On the old code it fails ("not found in []"); with the fix it passes.

🤖 Generated with Claude Code

dmmdea and others added 2 commits November 11, 2026 10:27
CIM reports the path a process was started through. A llama-swap launched
from its junctioned live directory never compared equal to the generation
path the swap names, so the post-restart check and the rollback's check
both failed against a running node. Match by file identity (os.SameFile)
after fetching candidates by name; exact spelling still matches and
unreadable rows are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…de lint

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dmmdea
dmmdea merged commit d546a25 into main Nov 11, 2026
6 checks passed
@dmmdea
dmmdea deleted the fix/windows-finder-follows-links branch November 11, 2026 15:58
@dmmdea dmmdea mentioned this pull request Nov 11, 2026
dmmdea added a commit that referenced this pull request Nov 11, 2026
- **Fixed:** a Windows swap now sees a node started through a junction (#850). A component's live directory can be a junction into its generation directory. The process finder compared the path CIM reports with the generation path by spelling, so a llama-swap swap restarted the daemon and then reported "no process appeared", and the rollback check failed the same way. Paths are now matched by the file they name.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Deletes: changes/unreleased/fix-windows-finder-follows-junctions.md

Co-authored-by: dmmdea <dmmdea@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant