Scope tools-read catalog refresh to the read filter - #1605
Draft
RhysSullivan wants to merge 5 commits into
Draft
Conversation
The stale-catalog scan ran unfiltered and refreshed connections sequentially, so a read for one integration paid for every stale connection in the workspace. Scope it to the read filter, narrow the TTL and config-revision triggers to the integrations they can fire for, project only the columns it reads, and refresh concurrently. A plugin defect can no longer fail the read.
Empty-query enumeration filtered tools by exact integration slug after listing everything. Pass it as the read filter instead, so the read refreshes only that integration. Ranked search stays unscoped: its namespace match is token-prefix.
The read refresh fans out to 4 concurrent produceConnectionTools calls, but fumadb runs a SQLite transaction as raw BEGIN/COMMIT on the shared connection. The second BEGIN fails with "cannot start a transaction within a transaction" and the losing persist drops its whole rebuild: five connections refreshed at once, four rebuilds lost. Hold a one-permit semaphore around the persist only, so the upstream resolveTools handshakes keep overlapping. Log refresh failures as a warning with enumerable fields instead of a debug line carrying the raw cause, and report a failed count on the tools.list span.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | 1c658ba | Commit Preview URL Branch Preview URL |
Aug 16 2026, 01:44 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-cloud | 1c658ba | Aug 16 2026, 01:44 PM |
Contributor
Cloudflare preview
Sign-in is Cloudflare Access (one-time PIN to an allowed email). The preview has its own database and encryption key; it is destroyed when this PR closes. |
@executor-js/cli
@executor-js/config
@executor-js/execution
@executor-js/sdk
@executor-js/codemode-core
@executor-js/runtime-quickjs
@executor-js/plugin-file-secrets
@executor-js/plugin-graphql
@executor-js/plugin-keychain
@executor-js/plugin-mcp
@executor-js/plugin-onepassword
@executor-js/plugin-openapi
executor
commit: |
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.
A tools read refreshed every stale connection in the account before answering, sequentially — a
GET /api/tools?integration=railwaywas observed spending 19.4s of a 19.5s response re-syncing 13 MCP connections, none of them railway. p99 on /api/tools was 16s over the last day.integration/owner/connectionfilter.executor.tools.listspan; the per-connection span is renamedexecutor.tools.sync_stale→executor.tools.syncwith atriggerattribute.TTL-expired refresh still happens inline (filter-scoped); moving it off the read path entirely is the follow-up PR, along with claim/backoff schema.