Report installed plug-in copies from bridge-health-check (#200) - #201
Merged
Conversation
OmniFocus can load a plug-in bundle from a directory the user never updated, and the reported version alone cannot distinguish "correct plug-in" from "stale plug-in somewhere else". Diagnosing that today means manually enumerating four possible locations. bridge-health-check now lists every installed bundle with its location and runtime version, and emits a warning when the loaded plug-in disagrees with an installed copy or with the binary. The warning names the iCloud precedence explicitly, because updating only the sandbox copy is the failure users actually hit. Versions are read from the FOCUSRELAY_VERSION constant rather than manifest.json: the manifest carries only the numeric core (0.12.0) while the bridge reports the full tag (0.12.0-beta), so comparing manifests would produce spurious mismatches. BridgeHealthResult gains two optional fields. It has no MCP surface -- bridge-health-check is CLI-only -- so this does not change the tool wire contract. Validation impact: query, per focusrelay-dev classify. All semantic gates pass; 246 tests pass including 11 new ones. Verified live by reproducing the issue #200 scenario: with only the sandbox copy updated, the health check named the stale copy and explained why the update had no effect. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Addresses the durable half of #200. The documentation fix shipped in #199; this is the part that makes the failure self-diagnosing.
Problem
OmniFocus can load a plug-in bundle from a directory the user never updated, and keep doing so across reinstalls and full restarts. The version the bridge reports cannot distinguish "the plug-in I just installed" from "a stale plug-in in a folder I forgot about" — both look like a plain version string. Diagnosing it means manually enumerating up to four locations and reading a JS constant out of each.
That is not hypothetical: it happened on a development machine today and took roughly an hour to track down, after a version check had already reported everything as fine.
Change
bridge-health-checknow reports every installed bundle it can find, and warns when they disagree:{ "ok": true, "plugin": "FocusRelay Bridge", "version": "0.12.0-beta", "installedPlugins": [ { "location": "icloud", "version": "0.12.0-beta", "path": ".../iCloud~com~omnigroup~OmniFocus/Documents/Plug-Ins/FocusRelayBridge.omnijs" }, { "location": "sandbox", "version": "0.0.0-dev", "path": ".../com.omnigroup.OmniFocus4/Data/.../Plug-Ins/FocusRelayBridge.omnijs" } ], "pluginWarning": "OmniFocus is running plug-in 0.12.0-beta, but these installed copies differ: sandbox (0.0.0-dev). OmniFocus prefers the iCloud copy when plug-in sync is enabled, so updating only the sandbox copy has no effect. ..." }The warning names iCloud precedence explicitly, because "I updated the plug-in and nothing changed" is the symptom users actually report.
Two implementation notes:
FOCUSRELAY_VERSIONconstant, notmanifest.json. The manifest carries only the numeric core (0.12.0) while the bridge reports the full tag (0.12.0-beta), so comparing manifests would produce spurious mismatches on every prerelease.BridgeHealthResultgains two optional fields. It has no MCP surface —bridge-health-checkis CLI-only, confirmed by grep — so the tool wire contract is unchanged and the additions are decode-compatible.Validation
Impact:
query, perfocusrelay-dev classify(conservative: the change lives inOmniFocusAutomation). Ran that tier rather than arguing for a narrower one.Not included
The installer-side half of #200:
install-plugin.shsilently skips a plug-in directory that is not materialised at that instant (create_if_missing=False), so an evicted iCloud folder produces a partial install that reports success and exits 0. That is tracked in the issue and left for a follow-up, since it is installer behavior rather than diagnostics.🤖 Generated with Claude Code