Repository navigation
fix(cloudflare): Add diagnostic logging for empty grantedSkills errors - #758
Merged
Merged
Conversation
Addresses investigation from #756. When a user's token has an empty or invalid grantedSkills array, the server returns a 400 error but previously had no logging, making it impossible to diagnose root causes. Changes: - Add logWarn when grantedSkills validation fails with 400 response - Log raw grantedSkills value, type, and array status for diagnosis - Add test coverage for empty and invalid grantedSkills scenarios This will help diagnose future occurrences of the issue seen after the MCP SDK upgrade attempt in #752. Refs: #756 Co-Authored-By: Claude Opus 4.5 <[email protected]>
dcramer
added a commit
that referenced
this pull request
Jan 31, 2026
This upgrades the MCP SDK from ^1.21.0 to ^1.25.3, bringing in the latest spec compliance fixes and improvements. Part of investigation into #756 - the diagnostic logging from PR #758 will help identify if any issues arise from this upgrade. Note: The agents package remains at 0.2.23 to avoid requiring the AI SDK v6 upgrade that agents 0.3.x requires. Co-Authored-By: Claude Opus 4.5 <[email protected]>
2 of 4 tasks
dcramer
added a commit
that referenced
this pull request
Jan 31, 2026
## Summary - Upgrades `@modelcontextprotocol/sdk` from `^1.21.0` to `^1.25.3` - Part of investigation into #756 - retrying the SDK upgrade with diagnostic logging in place from #758 - All 628 tests pass locally ## Changes This is a minimal upgrade that only bumps the MCP SDK version. The `agents` package remains at `0.2.23` to avoid requiring the AI SDK v6 upgrade that `agents` 0.3.x requires. ## Key SDK changes (1.21.0 → 1.25.3) Notable changes from the [changelog](https://github.com/modelcontextprotocol/typescript-sdk/blob/main/CHANGELOG.md): - **v1.25.0**: SPEC COMPLIANCE - Remove loose/passthrough types not allowed/defined by MCP spec - Various bug fixes and improvements ## Risk Assessment - **Low risk** - Tests pass, no API changes affecting our usage - Diagnostic logging from #758 will capture any runtime issues with `grantedSkills` ## Test plan - [x] All unit tests pass (628 tests) - [x] Type checking passes - [ ] Deploy to staging and verify MCP connections work - [ ] Monitor Sentry logs for any 400 errors with empty grantedSkills Closes #756 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <[email protected]>
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
Addresses investigation from #756. When a user's token has an empty or invalid
grantedSkillsarray, the server returns a 400 error but previously had no logging, making it impossible to diagnose root causes.Changes
logWarnwhengrantedSkillsvalidation fails with 400 responsegrantedSkillsvalue, type, and array status for diagnosisgrantedSkillsscenariosInvestigation Findings
During investigation of #756, we found:
The logging added here will capture the actual
grantedSkillsvalue when this error occurs, helping diagnose whether the issue is:[]Test plan
pnpm run tscpassespnpm run lintpassespnpm run testpasses (new tests verify logging is triggered)Refs: #756
🤖 Generated with Claude Code