Skip to content

Add platform tool catalog fingerprint and hashOnly mode#7840

Open
andypalmi wants to merge 5 commits into
mainfrom
feat/platform-automation-catalog-hash
Open

Add platform tool catalog fingerprint and hashOnly mode#7840
andypalmi wants to merge 5 commits into
mainfrom
feat/platform-automation-catalog-hash

Conversation

@andypalmi

Copy link
Copy Markdown
Contributor

Description

Adds a fingerprint to the platform automation tool features so a client can detect whether the platform tool catalog changed before pulling the full definition list.

  • computeCatalogHash(tools) — a cheap, non-cryptographic fingerprint over each tool's name, title, description, inputSchema, annotations and _meta, sorted for stability across enumeration order.
  • PlatformAutomationHandler caches it (getCatalogHash()) and includes catalogHash in the automation:mcp-get-features reply.
  • A hashOnly request returns { catalogHash } without the full tool list, so a poller can skip the full fetch when the catalog is unchanged.

Backwards compatible: a caller that ignores catalogHash and never sends hashOnly gets the full list exactly as before.

Related

FlowFuse/engineering#129

andypalmi added 5 commits July 15, 2026 15:51
…ures

Compute a deterministic fingerprint of the platform tool catalog over each
tool's name, description, input schema and annotations, sorted so it is stable
regardless of enumeration order. Expose it via getCatalogHash() and include it
in the mcp-get-features response. Add a hashOnly request option that returns
only the fingerprint, letting a caller cheaply detect whether the catalog
changed before pulling the full tool list. Backwards compatible: callers that
ignore the field still receive the full list as before.
Fold each tool's title and _meta into computeCatalogHash and carry _meta
through the wire tool definitions, so a change to either shifts the
catalog fingerprint and a caller can detect it. Previously a title-only
change left the fingerprint unchanged.
@andypalmi
andypalmi requested a review from cstns July 16, 2026 15:10
@andypalmi andypalmi self-assigned this Jul 16, 2026
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 4.34783% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.04%. Comparing base (56c95c3) to head (299470d).

Files with missing lines Patch % Lines
forge/comms/platformAutomation.js 4.34% 22 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7840      +/-   ##
==========================================
- Coverage   75.11%   75.04%   -0.07%     
==========================================
  Files         430      430              
  Lines       22846    22867      +21     
  Branches     6055     6063       +8     
==========================================
  Hits        17160    17160              
- Misses       5686     5707      +21     
Flag Coverage Δ
backend 75.04% <4.34%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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