Skip to content

fix(host-cloudflare): refresh internal integration catalogs when the tool list changes - #18

Merged
fforres merged 1 commit into
skywardfrom
feat/internal-catalog-content-hash
Oct 9, 2026
Merged

fforres merged 1 commit into
skywardfrom
feat/internal-catalog-content-hash

Conversation

@fforres

@fforres fforres commented Oct 9, 2026

Copy link
Copy Markdown

Problem

Internal integration catalogs were refreshed once per deployed Executor version, and the version was recorded as done after the refresh. If Executor deployed before an internal tool server, the refresh read the old tool list and recorded the version, so new tools did not appear until the next Executor deploy. Seen in production: a refresh at 08:36 loaded 16 tools, the tool server deployed at 08:37 with 18.

Fix

Detect changes by content, not by version. Once per isolate, for each declared integration that exists with the declared endpoint:

  1. List its current tools over the internal host routing, with the MCP plugin's discoverToolsFromInput (now exported from @executor-js/plugin-mcp).
  2. Hash the list: SHA-256 of canonical JSON (names, descriptions, input and output schemas, annotations), sorted by name, so order does not matter.
  3. Compare with the hash in BLOBS at internal-integrations/tools-hash/<slug>. Refresh the org main connection only if it differs or none is stored.
  4. Store the new hash only after a refresh that succeeded (a tool_sync_failed health still counts as failure). New integrations store their hash after creation.

A missing BLOBS binding or an R2 error means refresh and a warning, never a failed boot. A failed tools/list skips that integration and records nothing. Existing integrations are still never updated or deleted, and ones with a different endpoint are never touched.

The per-version key and the version_metadata binding (CF_VERSION_METADATA) are removed; nothing else used them.

Tests

Real executor and real MCP fixture server. Cover: no hash, same tools, changed tools, failed refresh then recovery, failed tools/list, mismatched endpoint, R2 errors, no store, and hash stability across order.

…tool list changes

Detect a changed internal tool list by a SHA-256 of the listed tools stored per integration in BLOBS, instead of by the deployed version id.
@fforres
fforres merged commit ad120a0 into skyward Oct 9, 2026
4 of 40 checks passed
@fforres
fforres deleted the feat/internal-catalog-content-hash branch October 9, 2026 09:20
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