fix(selfhost): reconcile MCP runtime and AI Search - #73
Merged
Conversation
Keep Durable Object owner checks storage-only so PartyServer remains the sole runtime initialization path and concurrent fetches cannot deadlock startup.
Re-upload unexpected remote item states, preserve queued/running/completed items, and filter scoped searches inside AI Search before tool-level deduplication and paging.
Greptile SummaryThe PR keeps MCP owner validation storage-only so PartyServer remains responsible for runtime initialization, and reconciles AI Search indexing and scoped retrieval behavior.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| packages/hosts/cloudflare/src/mcp/agent-session-durable-object.ts | Makes owner validation storage-only while retaining activity updates for initialized sessions. |
| packages/hosts/cloudflare/src/mcp/agent-session-durable-object.test.ts | Updates lifecycle tests to verify owner validation does not initialize or race the MCP runtime. |
| packages/plugins/semantic-search/src/sdk/ai-search.ts | Tightens remote-item reuse and revises scoped search retrieval and canonical-path reconciliation; the prior namespace issue is fixed. |
| packages/plugins/semantic-search/src/sdk/ai-search.test.ts | Adds coverage for integration-filtered retrieval, provider-rewritten item keys, and current-catalog path validation. |
Reviews (2): Last reviewed commit: "fix(semantic-search): scope provider fil..." | Re-trigger Greptile
aryasaatvik
added a commit
that referenced
this pull request
Aug 18, 2026
Reconcile the selfhost package runtime with the validated Cloudflare MCP owner-check and AI Search lifecycle/query behavior. | Surface | Before | After | | --- | --- | --- | | MCP owner validation | Cold validation could restore the runtime outside the PartyServer startup lock | Validation stays storage-only; `fetch` owns runtime initialization | | AI Search item state | Unexpected provider statuses were treated as reusable | Only undefined, queued, running, and completed items are reused; unexpected states are reuploaded | | Scoped tool search | A page-sized global chunk set was filtered and deduplicated locally | Queries retrieve 50 candidates and apply the integration filter before deduplication and paging | - Cloudflare agent-session Durable Object tests: 9/9 passed - Cloudflare host package typecheck passed - Semantic-search AI Search tests: 15/15 passed - Semantic-search package typecheck passed - Changed-file oxlint and oxfmt checks passed - Live deployment verified scoped PostHog search returns 10 results and `organizations.list` succeeds with HTTP 200 - Root format and lint include existing `.scratchpad` findings - Root typecheck includes existing toolkit SVG declaration failures - Root test reaches 19/20 packages; `@executor-js/host-mcp` fails its stdio bridge with Unauthorized / Connection closed
aryasaatvik
added a commit
that referenced
this pull request
Aug 23, 2026
Reconcile the selfhost package runtime with the validated Cloudflare MCP owner-check and AI Search lifecycle/query behavior. | Surface | Before | After | | --- | --- | --- | | MCP owner validation | Cold validation could restore the runtime outside the PartyServer startup lock | Validation stays storage-only; `fetch` owns runtime initialization | | AI Search item state | Unexpected provider statuses were treated as reusable | Only undefined, queued, running, and completed items are reused; unexpected states are reuploaded | | Scoped tool search | A page-sized global chunk set was filtered and deduplicated locally | Queries retrieve 50 candidates and apply the integration filter before deduplication and paging | - Cloudflare agent-session Durable Object tests: 9/9 passed - Cloudflare host package typecheck passed - Semantic-search AI Search tests: 15/15 passed - Semantic-search package typecheck passed - Changed-file oxlint and oxfmt checks passed - Live deployment verified scoped PostHog search returns 10 results and `organizations.list` succeeds with HTTP 200 - Root format and lint include existing `.scratchpad` findings - Root typecheck includes existing toolkit SVG declaration failures - Root test reaches 19/20 packages; `@executor-js/host-mcp` fails its stdio bridge with Unauthorized / Connection closed
aryasaatvik
added a commit
that referenced
this pull request
Aug 27, 2026
Reconcile the selfhost package runtime with the validated Cloudflare MCP owner-check and AI Search lifecycle/query behavior. | Surface | Before | After | | --- | --- | --- | | MCP owner validation | Cold validation could restore the runtime outside the PartyServer startup lock | Validation stays storage-only; `fetch` owns runtime initialization | | AI Search item state | Unexpected provider statuses were treated as reusable | Only undefined, queued, running, and completed items are reused; unexpected states are reuploaded | | Scoped tool search | A page-sized global chunk set was filtered and deduplicated locally | Queries retrieve 50 candidates and apply the integration filter before deduplication and paging | - Cloudflare agent-session Durable Object tests: 9/9 passed - Cloudflare host package typecheck passed - Semantic-search AI Search tests: 15/15 passed - Semantic-search package typecheck passed - Changed-file oxlint and oxfmt checks passed - Live deployment verified scoped PostHog search returns 10 results and `organizations.list` succeeds with HTTP 200 - Root format and lint include existing `.scratchpad` findings - Root typecheck includes existing toolkit SVG declaration failures - Root test reaches 19/20 packages; `@executor-js/host-mcp` fails its stdio bridge with Unauthorized / Connection closed
aryasaatvik
added a commit
that referenced
this pull request
Aug 28, 2026
Reconcile the selfhost package runtime with the validated Cloudflare MCP owner-check and AI Search lifecycle/query behavior. | Surface | Before | After | | --- | --- | --- | | MCP owner validation | Cold validation could restore the runtime outside the PartyServer startup lock | Validation stays storage-only; `fetch` owns runtime initialization | | AI Search item state | Unexpected provider statuses were treated as reusable | Only undefined, queued, running, and completed items are reused; unexpected states are reuploaded | | Scoped tool search | A page-sized global chunk set was filtered and deduplicated locally | Queries retrieve 50 candidates and apply the integration filter before deduplication and paging | - Cloudflare agent-session Durable Object tests: 9/9 passed - Cloudflare host package typecheck passed - Semantic-search AI Search tests: 15/15 passed - Semantic-search package typecheck passed - Changed-file oxlint and oxfmt checks passed - Live deployment verified scoped PostHog search returns 10 results and `organizations.list` succeeds with HTTP 200 - Root format and lint include existing `.scratchpad` findings - Root typecheck includes existing toolkit SVG declaration failures - Root test reaches 19/20 packages; `@executor-js/host-mcp` fails its stdio bridge with Unauthorized / Connection closed
aryasaatvik
added a commit
that referenced
this pull request
Aug 29, 2026
Reconcile the selfhost package runtime with the validated Cloudflare MCP owner-check and AI Search lifecycle/query behavior. | Surface | Before | After | | --- | --- | --- | | MCP owner validation | Cold validation could restore the runtime outside the PartyServer startup lock | Validation stays storage-only; `fetch` owns runtime initialization | | AI Search item state | Unexpected provider statuses were treated as reusable | Only undefined, queued, running, and completed items are reused; unexpected states are reuploaded | | Scoped tool search | A page-sized global chunk set was filtered and deduplicated locally | Queries retrieve 50 candidates and apply the integration filter before deduplication and paging | - Cloudflare agent-session Durable Object tests: 9/9 passed - Cloudflare host package typecheck passed - Semantic-search AI Search tests: 15/15 passed - Semantic-search package typecheck passed - Changed-file oxlint and oxfmt checks passed - Live deployment verified scoped PostHog search returns 10 results and `organizations.list` succeeds with HTTP 200 - Root format and lint include existing `.scratchpad` findings - Root typecheck includes existing toolkit SVG declaration failures - Root test reaches 19/20 packages; `@executor-js/host-mcp` fails its stdio bridge with Unauthorized / Connection closed
aryasaatvik
added a commit
that referenced
this pull request
Aug 29, 2026
Reconcile the selfhost package runtime with the validated Cloudflare MCP owner-check and AI Search lifecycle/query behavior. | Surface | Before | After | | --- | --- | --- | | MCP owner validation | Cold validation could restore the runtime outside the PartyServer startup lock | Validation stays storage-only; `fetch` owns runtime initialization | | AI Search item state | Unexpected provider statuses were treated as reusable | Only undefined, queued, running, and completed items are reused; unexpected states are reuploaded | | Scoped tool search | A page-sized global chunk set was filtered and deduplicated locally | Queries retrieve 50 candidates and apply the integration filter before deduplication and paging | - Cloudflare agent-session Durable Object tests: 9/9 passed - Cloudflare host package typecheck passed - Semantic-search AI Search tests: 15/15 passed - Semantic-search package typecheck passed - Changed-file oxlint and oxfmt checks passed - Live deployment verified scoped PostHog search returns 10 results and `organizations.list` succeeds with HTTP 200 - Root format and lint include existing `.scratchpad` findings - Root typecheck includes existing toolkit SVG declaration failures - Root test reaches 19/20 packages; `@executor-js/host-mcp` fails its stdio bridge with Unauthorized / Connection closed
aryasaatvik
added a commit
that referenced
this pull request
Aug 31, 2026
Reconcile the selfhost package runtime with the validated Cloudflare MCP owner-check and AI Search lifecycle/query behavior. | Surface | Before | After | | --- | --- | --- | | MCP owner validation | Cold validation could restore the runtime outside the PartyServer startup lock | Validation stays storage-only; `fetch` owns runtime initialization | | AI Search item state | Unexpected provider statuses were treated as reusable | Only undefined, queued, running, and completed items are reused; unexpected states are reuploaded | | Scoped tool search | A page-sized global chunk set was filtered and deduplicated locally | Queries retrieve 50 candidates and apply the integration filter before deduplication and paging | - Cloudflare agent-session Durable Object tests: 9/9 passed - Cloudflare host package typecheck passed - Semantic-search AI Search tests: 15/15 passed - Semantic-search package typecheck passed - Changed-file oxlint and oxfmt checks passed - Live deployment verified scoped PostHog search returns 10 results and `organizations.list` succeeds with HTTP 200 - Root format and lint include existing `.scratchpad` findings - Root typecheck includes existing toolkit SVG declaration failures - Root test reaches 19/20 packages; `@executor-js/host-mcp` fails its stdio bridge with Unauthorized / Connection closed
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.
Summary
Reconcile the selfhost package runtime with the validated Cloudflare MCP owner-check and AI Search lifecycle/query behavior.
Before / after
fetchowns runtime initializationValidation
organizations.listsucceeds with HTTP 200Known baseline failures
.scratchpadfindings@executor-js/host-mcpfails its stdio bridge with Unauthorized / Connection closed