Thread transfer impact
⚠️ The latest CI run did not produce a thread transfer result for 6342c1c.
This comment will update automatically after the next completed run.
Part 11/16 of the shared-core and MCP stack. Based on #10560. Next: #10562.
Expose the existing bounded searchThreads query and return only matches from the calling project.
This filters the global top results, so a project can underfill the requested limit. It is not exhaustive or paginated. Project-first SQL pagination and search-service correctness changes belong in a separate service PR.
MCP-only rebuild of #8721, #8722, preserving attribution to Julius Marminge's original work. Original branches remain available for separate service follow-ups.
Validation: The composed stack passes 94 tests across 12 focused files, including shared core MCP and real MCP/V2 integration, attachment intake, project RPC/service contracts, and client model command selection. Server/contracts/shared/client-runtime typechecks and targeted format/lint/diff checks pass. New behavior coverage lives with the shared operation; no per-tool mock suite was added. Current-head CI is shown below.
Layer size: 4 files, +32/-1. No domain-service production implementation or documentation files change in this MCP layer.
Prepared with Codex in the OpenAI agent runtime.
⚠️ The latest CI run did not produce a thread transfer result for 6342c1c.
This comment will update automatically after the next completed run.
Verdict: Not approved
Macroscope's review found this PR not approvable — This PR adds a production MCP capability that exposes thread-content search and broadens the default read-only Claude tool allowlist. The query is bounded and project-scoped, but the default capability change warrants human review.
No code changes detected at 6342c1c. Prior analysis still applies.
You can add or adjust custom eligibility rules. Learn more.
| … | … | @@ -60,6 +67,13 @@ const readQuestion = Effect.fn("mcp.readQuestion")(function* ( | |
| 73 | + | const query = yield* ProjectionSnapshotQuery.ProjectionSnapshotQuery; | |
| 74 | + | const result = yield* query.searchThreads(input).pipe(Effect.mapError(unavailable)); | |
| 75 | + | return { matches: result.matches.filter((match) => match.projectId === caller.projectId) }; | |
| 76 | + | }), | |
This adds new backend behavior (project-scoped filtering of global search results) with no focused test. Consider adding one that registers ThreadToolkit with a Layer.mock(ProjectionSnapshotQuery.ProjectionSnapshotQuery) returning matches from two projects, and asserts only the caller's projectId survives — a test layer for the persistence-backed query only, no mocking of the handler logic itself. apps/server/src/mcp/toolkits/core.test.ts already wires ThreadToolkitRegistrationLive with Layer.mock(ThreadManagement.ThreadManagementService) and is a natural home for it.
Posted via Macroscope — Effect Service Conventions
Reviewed against the maintainer's explicit testing direction for this rebuild. The handler applies a direct equality filter using the authenticated caller.projectId and leaves query execution in the existing tested search service. It does not implement a new search algorithm or pagination guarantee; underfilled global top-results are explicitly documented in the tool and PR. Core MCP tests cover authenticated scope/registration/errors, and the existing real integration checks foreign-project denial. This suggestion identifies no incorrect filtering path. I am not adding a per-tool mocked query suite solely to restate the one-line filter; custom multi-field output mappings are tested separately where the wrapper introduces meaningful transformation.
Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.
A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.
Added 1 commit