fix(convex-mcp): resolve the Convex functions directory from convex.json - #625
Merged
Merged
Conversation
The nightly Convex MCP Eval Gate has failed since PR #590 moved the Convex backend from convex/ to backend/convex/ and left a root convex.json pointing at it: four tools.test.ts cases reported "No convex/ directory found" because schemaTools kept a copy-pasted resolver that only probes convex/ and src/convex, and the single-file architect test hard-coded resolve(PROJECT_DIR, "convex"). Give the package one shared resolver (src/project.ts) that honors the convex.json "functions" path, falls back to convex/, src/convex, backend/convex, and returns null for an invalid config instead of a stale guess; import it from all 19 tool files that carried their own copy; make the test derive the schema path from it; and add the resolver unit test. The real-backend audit test gets the same 30s budget the neighbouring repo-scan tests already use. Carved out of draft PR #621 (which also carries ~1.3k unrelated typing changes). No workflow behaviour changed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Demo: walkthrough of the surfaces this PR changed is available as a workflow artifact ( |
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 maintainer reading the nightly Convex MCP Eval Gate sees it red every night (run 34560628757 and every scheduled run since the backend moved). Four
tools.test.tscases fail withNo convex/ directory foundbecause PR #590 relocated the backend tobackend/convex/(rootconvex.json={"functions": "backend/convex/"}),schemaTools.tskept a copy-pasted resolver that only probesconvex/andsrc/convex, and the single-file architect test hard-codesresolve(PROJECT_DIR, "convex", "schema.ts").Fix at the root: one shared
src/project.tsresolver that honorsconvex.json'sfunctionspath (bounded read, invalid config →null, never a stale guess), withconvex/,src/convex,backend/convexas fallbacks; all 19 tool files import it instead of carrying their own copy; the test derives the schema path from it; aprojectResolution.test.tsunit test pins the behaviour. The real-backendconvex_audit_functionstest gets the same 30 s budget the neighbouring repo-scan tests already use (it scans the whole backend tree).Carved out of draft #621, which bundles this with ~1.3k unrelated typing changes and currently fails Typecheck. Local:
npm run buildclean, vitest 80/80.Not changed: the workflow's failure behaviour, any tool output contract other than the error text when no functions directory is configured.
🤖 Generated with Claude Code