chore(release): staging to production - 2026.05.20#1085
Merged
Conversation
…#1084) ## Problem The MCP `query_vector_store` / `query_vector_store_with_filter` tools (used by the Kumello agent) intermittently fail with `MCP error -32603: timeout of 5000ms exceeded`. Two separate root causes: 1. **5s client timeout with no margin.** `@answerai/answeragent-mcp`'s axios client defaults to `timeout: 5000`. The `AnswerAgentMCP` node spawns the MCP as a stdio subprocess, and `MCP/core.ts` spawns it with `env: { ...serverParams.env, PATH }` — the subprocess does **not** inherit `process.env`, so setting `API_TIMEOUT` on the service has no effect. 2. **A slow post-query loop.** `queryVectorStore` reports only `retriever.invoke()` as `timeTaken` (~0.3–0.5s), but then runs one `DocumentStoreFileChunk.findOneBy({ storeId, pageContent })` per result doc — N unindexed lookups on a `text` column. The full request takes 1–4s and the tail crosses 5s under load. ## Changes - **`AnswerAgentMCP.ts`** — pass `API_TIMEOUT` into the subprocess `env` (default `30000`, overridable via the `ANSWERAGENT_MCP_API_TIMEOUT` service env var). 30s is below the MCP SDK's 60s request timeout, so a genuinely slow call still fails cleanly. - **`documentstore/index.ts` (`queryVectorStore`)** — replace the per-doc lookup loop with a single batched `In()` query, guarded against an empty `docs` array (`In([])` is undefined behavior in TypeORM). Behavior-equivalent; `In` was already imported. ## Verification - `pnpm --filter flowise-components build` ✅ - `pnpm --filter flowise build` (server) ✅ - Behavior-equivalent: `doc.id` / `doc.chunkNo` outcomes unchanged, including the `else` fallback branch. - `doc.id` / `doc.chunkNo` are consumed only by the Flowise UI "Test Query" view — the MCP/agent path never reads them, so the loop change cannot alter agent behavior. ## Risk Low and contained. Edit 1 only supplies a value to an already-supported knob and only affects the AnswerAgent MCP subprocess. Edit 2 only touches data used by an internal UI view, never the agent path. ## Deploy Requires a redeploy of the Kumello Flowise service after merge. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
🚀 Release: Staging to Production
Release Date: 2026-05-20
Changes in this release
This PR is automatically created/updated when commits are pushed to staging.
Merging this PR will trigger the release workflow to create a new GitHub release.