Skip to content

[release] fix: warn when matter-server is older than the pin; /status reports the comparison (#75) - #370

Merged
simons-plugins merged 10 commits into
mainfrom
fix/75-matter-server-version-drift
Nov 1, 2026
Merged

simons-plugins merged 10 commits into
mainfrom
fix/75-matter-server-version-drift

Conversation

@simons-plugins

@simons-plugins simons-plugins commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

Summary

Issue #75 got a fresh report on 2026-11-01 from a user on plugin v2026.33.0 still running matter-server 0.6.8. The pin moved to 1.2.2 in July (v2026.7.3), but upgrading the plugin never upgrades matter-server: ensure_installed() only writes the plist and reconnects, and the npm install runs only from the Install/update the Matter controller menu item. The plugin logged the connected version at INFO and never compared it with the pin, so a six-months-stale server looked healthy and the #75 fix never reached existing installs.

  • New helper server_process.version_drift(sdk_version, install_spec) → (running, pinned, "older"|"current"|"newer"), or None only when the comparison is impossible (missing/unparseable). Numeric compare; a pre-release of the pinned version counts as older (semver). Never raises. New constants PINNED_VERSION and BACKUP_MENU (both pinned to MenuItems.xml / DEFAULT_INSTALL_SPEC by tests).
  • On connect (_resync, after the fabric-label check, before the reconcile try), once per distinct version pair per plugin process:
    • managed + older → WARNING naming both menu items: Back up the Matter fabric…, then Install/update the Matter controller (matter-server);
    • remote + older → INFO with the server URI, no menu advice (the remedy is on another machine);
    • newer → INFO in both modes;
    • version present but unreadable → one WARNING saying the check is skipped, rather than silence;
    • a failure inside the check logs with its traceback and never blocks the reconcile.
  • matter_client._handshake clears server_info first, so a restart onto a new version never reports the previous server's version.
  • HTTP status gains matterServerPinnedVersion (always) and matterServerVersionStatus (current | older | newer | unknown; last-known while disconnected; reported regardless of server location). Documented in docs/API.md. The mirrored domio-code/docs/API.md needs the same two rows — separate PR there once this lands.
  • Docs: INSTALL.md "Upgrading matter-server" says a plugin update does not upgrade matter-server and what the menu item actually does (installs the pin, restarts onto it); ARCHITECTURE.md row; CHANGELOG 2026.34.0.
  • Version 2026.33.0 → 2026.34.0 (a new Event Log warning and a new API field are user-visible → minor). [release] in the title because the whole point is reaching existing installs; strip it if you would rather bank it.

Warning as it appears:

the running matter-server is 0.6.8 but this plugin release is built for 1.2.2; upgrading the plugin does not upgrade matter-server. Run Plugins ▸ Matter ▸ Back up the Matter fabric…, then Plugins ▸ Matter ▸ Install/update the Matter controller (matter-server) to update it

Review

Four-agent review (code, tests, silent failures, comments) run before this revision; every finding is addressed in commits 72ce49d…HEAD. Headline change from review: matterServerOutdated: false collapsed "current" and "could not tell", so it became the four-state string.

Test plan

  • pytest -q: 4405 passed (32 new). Covers: helper parse/compare incl. pre-release and the real 0.6.2 golden string; managed warns once and re-warns for a different version; silent after upgrade to the pin; warns even when get_nodes raises; order fabric-label → drift → reconcile pinned with a recorder; unmanaged → INFO without menu text; unreadable → one WARNING; helper raising → logger.exception and reconcile still runs; real _handshake → on_connect path through FakeWebSocket; status field over older/current/newer/unknown, disconnected last-known, unmanaged; server_info cleared on a non-dict reconnect frame; menu constants match MenuItems.xml.
  • pylint on touched source files: no new messages vs main.
  • Not live-tested on jarvis: it runs 1.2.2 == pin, so only the current path and the status fields are observable there.

Refs #75.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AMhQdWDSwUmj2y2rpi5fZH

simons-plugins and others added 4 commits November 1, 2026 13:19
…erver with the pin (#75)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AMhQdWDSwUmj2y2rpi5fZH
… than the pin; expose in status (#75)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AMhQdWDSwUmj2y2rpi5fZH
…o to matter-server (#75)

The launch agent plist points at the installed package's entry file and
carries no version, so "writes the new version into its launch agent" was
wrong. A plugin update rewrites the plist and reconnects to whatever is
installed; only the menu item runs npm.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AMhQdWDSwUmj2y2rpi5fZH
@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bc7e8198-98e3-4c8a-9158-e27c51973e06
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

simons-plugins and others added 5 commits November 1, 2026 13:26
…pre-release counts as older; BACKUP_MENU, PINNED_VERSION

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AMhQdWDSwUmj2y2rpi5fZH
…/status matterServerVersionStatus

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AMhQdWDSwUmj2y2rpi5fZH
@simons-plugins simons-plugins changed the title [release] fix: warn when the managed matter-server is older than the pin (#75) [release] fix: warn when matter-server is older than the pin; /status reports the comparison (#75) Nov 1, 2026
…hen in +build metadata is not a pre-release (#75)

An oversized numeric component made int() raise past Python's digit limit,
which would have surfaced as a /status failure. Build metadata may contain
hyphens under semver, so the pre-release test now looks only before any '+'.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AMhQdWDSwUmj2y2rpi5fZH
@simons-plugins
simons-plugins merged commit d21f3b3 into main Nov 1, 2026
7 checks passed
@simons-plugins
simons-plugins deleted the fix/75-matter-server-version-drift branch November 1, 2026 15:55
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