Closed bug report

spawn picks a stale server.py over spawn.kind exe after in_place_merge (fusion360 1.10.4 on ConfRoomROG, ab 2.1.71): exe-owned verbs answered by the Python bridge

John Lauer · 2mo ago ·closed by John Lauer

Seen on ConfRoomROG with ab 2.1.71 right after bridge_install of fusion-bridge 1.10.4 (method in_place_merge, cache BRIDGE_VERSION 1.10.4, bridge.json spawn.kind: "exe", entrypoint: "adom-fusion-bridge.exe"):

  • bridge_list says entrypoint .../bridges-cache/fusion360/adom-fusion-bridge.exe, livePids [50332], installedVersion 1.10.4, runningVersion 1.10.4, languages: ["Python"].
  • PID 50332 is C:\Users\john\.adom\adom-runtimes\python-3.12.13\python.exe, started 14:30:19, 28 s after the install wrote the cache. There is no adom-fusion-bridge.exe process at all.
  • Every verb the Rust exe owns itself answers with the Python bridge's text: fusion_routing_state returns "Unknown command: routing_state" with the server.py hint ("check cli/src/commands.rs"), and no reply carries the exe's shell: "rust" marker. Verbs that pass through to the Fusion add-in still work, which hides the swap.

The difference to AdomLapper (same ab 2.1.71, same 1.10.4 install, exe running, log line "v1.10.4 listening ... sidecar absent"): ConfRoomROG's cache folder still contained a server.py left over from a 1.9.x dev pin, because in_place_merge adds and replaces files but never removes files the new package no longer ships. With server.py present ab spawned Python and ignored spawn.kind: exe. Deleting the stale server.py and killing PID 50332 made the respawn come up as the exe.

Asks:

  1. spawn.kind: "exe" with an existing entrypoint must win over a server.py in the folder. A Python entry should only be chosen when the manifest says so.
  2. bridge_list runningVersion is taken from the running process's /status, which the Python bridge also answers with the cache's BRIDGE_VERSION, so the row looked healthy (1.10.4 / 1.10.4). A runningEntry (exe path or python + script) in the row, and a versionDrift when the running image is not the manifest's entrypoint, would have shown this at once.
  3. in_place_merge could remove files that were in the previous package manifest but not in the new one (or the install could report leftoverFiles so the bridge owner can act).

bridge_kill {name:"fusion360"} refused because three other threads had used the desktop in the last five minutes; process_kill on the PID with a reason worked as the manual path.

1 Reply

John Lauer · 2mo ago

Shipped in 2.1.72 (insiders; fleet is on it). start_fusion_bridge/start_kicad_bridge now read the installed manifest's spawn.kind first: an exe bridge with an existing entrypoint is spawned as that exe, never as a leftover server.py. An in-place merge reports leftoverFiles/leftoverCount and removes stale entry scripts (server.py/server.js/main.py/index.js) when the incoming manifest is an exe bridge (removedStaleEntry). bridge_list rows carry runningImage, expectedImage and entryMismatch (which also sets versionDrift). Verified on ConfRoomROG just now: fusion360 runningImage = expectedImage = adom-fusion-bridge.exe, entryMismatch false, running 1.10.5.

John Lauer closed this · 2mo ago

Log in to reply.