fix(plugins): offer same-version off-pin installs with an honest sync label #136126
All Vouch review confidence checks passed
Residual risk 0.33 = Change Risk (0.59) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.59 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #136126"
general
weight: 0.35
PRATHAMESH75
fix(plugins): offer same-version off-pin installs with an honest sync label
What does this PR do?
For a catalog plugin installed off-pin (e.g. from repository HEAD via the Desktop install path), the plugin row showed the version label from the catalog pin next to an update button labeled with the same version: "v1.0.0" beside "Update to v1.0.0". The button is fed by
update_available, which compares the installed commit SHA to the catalog pin, while its label comes from the pin's declared version. An off-pin install whose declared version equals the pin's therefore got an affordance that changes the commit and nothing visible. This read as "the plugin is broken" and on a real Windows 10 install it triggered a destructive uninstall/reinstall cycle.The fix keeps the detection SHA-based and makes the label honest.
catalog_row_fieldstakes the installed tree's manifest version (the caller already has it from the same scan); when it equals the pin's version label, the row drops the version label so every surface falls back to the target commit ref: the Desktop's existingupdateToPin(agent.catalog_version ?? agent.catalog_sha?.slice(0, 8))then renders "Update to <sha8>" instead of the self-contradictory "Update to <same version>". Every off-pin install keeps its affordance, including a pin that advanced while both commits declare the same version.Related Issue
Fixes #136122
Type of Change
Changes Made
hermes_cli/plugins_cmd_catalog.py::catalog_row_fields: new optional keywordinstalled_version(the installed tree's manifest version). When it equals the pin's version label,catalog_versiondrops toNone.update_availableis unchanged (SHA-based).tui_gateway/methods_tools.py::_plugin_rows: passesversionfrom the same discovery scan it already performs (installed_version=str(version) if version else None). No extra I/O.tests/hermes_cli/test_plugins_cmd_catalog.py: one invariant test - a same-version off-pin row keeps the affordance but the presented target differs from the installed version; a pin advance at the same version label keeps the affordance; a real version bump labels the new version; an unknown installed version keeps the SHA-only label.catalog_row_fieldshas exactly one production caller (tui_gateway/methods_tools.py:1817) plus docstring mentions in the generated gateway contract and the Pydantic row contract (tui_gateway/contracts/tools_mcp_plugins.py). The wire contract is unchanged:update_availablestaysbool,catalog_versionwas alreadystr | None, no new field, no new config key, no desktop codegen change. The Desktop button (apps/desktop/src/app/capabilities/plugins/plugins-tab.tsx:487) is untouched; its existing?? catalog_sha?.slice(0, 8)fallback is what renders the commit ref.Precise semantics (what is byte-identical when nothing is wrong):
update_availableFalse, exactly as before.update_availableTrue, "Update to <new version>", same as before.Deliberately not changed:
installed_catalog_state(the dashboard web catalog payload,web_routers/dashboard_ui.py) keeps the SHA-only signal: it has no installed tree version at hand, its entries are labeled by SHA rather than a version-prefixed button, and adding a manifest read per entry would tax every listing. Named here as a scope line.updateToPinkey is translated in 5).plugins_updates.py's SHA-basedupdate_available(thecheck-updatesCLI path) is a separate surface with its own known issue (#132494); not touched here.How to Test
1. RED on the pre-fix tree (upstream/main @ 6d2cf3bb73, the base when the branches were cut; all three have since been rebased onto upstream/main @ f925b01791, no overlap with the touched files):
2. GREEN with the fix:
3. Neighborhood on this branch:
tests/tui_gateway/test_plugins_manage_install.py,test_plugins_manage_late_activation.py,tests/hermes_cli/test_web_plugins_catalog.py,test_plugins_cmd_list.py- 13 pass, 1 skipped.Checklist
Code
fix(plugins): ...)scripts/run_tests.sh)Checks run and not run, stated plainly:
scripts/run_tests.sh, the neighborhood suites listed above, and the fulltests/hermes_cli/test_plugins_cmd_catalog.pyfile.scripts/checkon this branch (it ran once to completion onfix/plugin-manifest-transient-hold: FAILED on the whole-tree code-health ratchet with 18 pre-existing findings, none in the files these PRs touch; CI's lint lane is the first real verdict for this branch).Documentation & Housekeeping
website/docsdescribes the version label as cosmetic and that contract is preserved)None); no platform-specific behavior.