eagerly load this.mcp.jsonSchema in ai chat agent#762
eagerly load this.mcp.jsonSchema in ai chat agent#762threepointone wants to merge 1 commit intomainfrom
Conversation
fixes #718 Because of hibernation, our preloaded this.mcp.jsonSchema can be lost when the DO wakes up again. We should probably move this helper into anotherl ibrary. Until then, a patch is to eagerly load it when an ai chat agent starts up. We also throw the error only if there's an active mcp connection.
🦋 Changeset detectedLatest commit: f2e415f The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Claude Code ReviewThe PR addresses a real hibernation issue where Critical Issues
Test QualityThe updated test at line 1637 correctly validates the new behavior (throws when jsonSchema uninitialized), which is good. However, there's no test coverage for the new ai-chat eager loading behavior or the race condition scenario. RecommendationEither:
|
commit: |
|
there's an annoying race condition I'll have to dive into, probably in partyserver |
fixes #718
Because of hibernation, our preloaded this.mcp.jsonSchema can be lost when the DO wakes up again. We should probably move this helper into anotherl ibrary. Until then, a patch is to eagerly load it when an ai chat agent starts up.
We also throw the error only if there's an active mcp connection.