-
Notifications
You must be signed in to change notification settings - Fork 3.9k
fix: cn mcp bugs #8899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: cn mcp bugs #8899
Conversation
|
Keep this PR in a mergeable state → Learn moreAll Green is an AI agent that automatically: ✅ Addresses code review comments ✅ Fixes failing CI checks ✅ Resolves merge conflicts |
|
✅ Review Complete Code Review Summary |
Adds documentation explaining how the CLI resolves secrets for MCP servers, including the fallback from org/package secrets to local environment variables. This documents the fix from PR #8899 that allows env vars to override inaccessible org secrets in devboxes and restricted environments. Co-authored-by: nate <nate@continue.dev> Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <noreply@continue.dev>
Adds documentation explaining how the CLI resolves secrets for MCP servers, including the fallback from org/package secrets to local environment variables. This documents the fix from PR #8899 that allows env vars to override inaccessible org secrets in devboxes and restricted environments. Co-authored-by: nate <nate@continue.dev> Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <noreply@continue.dev>
|
Added documentation for the MCP secret resolution changes in
The documentation maintains the same level of detail as the existing spec and focuses on the practical implications of the fix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 6 files
Prompt for AI agents (all 1 issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="extensions/cli/src/index.ts">
<violation number="1" location="extensions/cli/src/index.ts:103">
Passing the Error into `logger.error` causes it to call `sentryService.captureException`, so the explicit capture below now fires twice per rejection, producing duplicate Sentry events.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
|
|
||
| // If reason is an Error, use it directly for better stack traces | ||
| if (reason instanceof Error) { | ||
| logger.error("Unhandled Promise Rejection", reason, errorDetails); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passing the Error into logger.error causes it to call sentryService.captureException, so the explicit capture below now fires twice per rejection, producing duplicate Sentry events.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At extensions/cli/src/index.ts, line 103:
<comment>Passing the Error into `logger.error` causes it to call `sentryService.captureException`, so the explicit capture below now fires twice per rejection, producing duplicate Sentry events.</comment>
<file context>
@@ -91,7 +91,26 @@ export function shouldShowExitMessage(): boolean {
+
+ // If reason is an Error, use it directly for better stack traces
+ if (reason instanceof Error) {
+ logger.error("Unhandled Promise Rejection", reason, errorDetails);
+ } else {
+ // Convert non-Error reasons to Error for consistent handling
</file context>
✅ Addressed in 4ec2b1b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 7 files
Prompt for AI agents (all 1 issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="extensions/cli/src/index.ts">
<violation number="1" location="extensions/cli/src/index.ts:103">
Passing the Error object into `logger.error` causes that helper to capture the exception with Sentry while the handler still calls `sentryService.captureException`, so every unhandled rejection is reported twice. Remove one of the captures or log the details without treating the argument as an `Error` to avoid duplicate alerts.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
|
|
||
| // If reason is an Error, use it directly for better stack traces | ||
| if (reason instanceof Error) { | ||
| logger.error("Unhandled Promise Rejection", reason, errorDetails); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passing the Error object into logger.error causes that helper to capture the exception with Sentry while the handler still calls sentryService.captureException, so every unhandled rejection is reported twice. Remove one of the captures or log the details without treating the argument as an Error to avoid duplicate alerts.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At extensions/cli/src/index.ts, line 103:
<comment>Passing the Error object into `logger.error` causes that helper to capture the exception with Sentry while the handler still calls `sentryService.captureException`, so every unhandled rejection is reported twice. Remove one of the captures or log the details without treating the argument as an `Error` to avoid duplicate alerts.</comment>
<file context>
@@ -91,7 +91,26 @@ export function shouldShowExitMessage(): boolean {
+
+ // If reason is an Error, use it directly for better stack traces
+ if (reason instanceof Error) {
+ logger.error("Unhandled Promise Rejection", reason, errorDetails);
+ } else {
+ // Convert non-Error reasons to Error for consistent handling
</file context>
✅ Addressed in 4ec2b1b
|
🎉 This PR is included in version 1.36.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.7.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.7.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
this fixes a number of bugs that were causing cn to stop (and devboxes too) when MCPs were used that relied on environment variables as secrets
AI Code Review
@continue-reviewChecklist
Screen recording or screenshot
[ When applicable, please include a short screen recording or screenshot - this makes it much easier for us as contributors to review and understand your changes. See this PR as a good example. ]
Tests
[ What tests were added or updated to ensure the changes work as expected? ]
Summary by cubic
Fixes secret resolution for MCP servers by falling back to local environment variables when org/package secrets aren’t accessible, preventing cn/devboxes from crashing. Also hardens template variable handling, improves error logging, and documents the fallback behavior for clarity.
Bug Fixes
Reliability
Written for commit 15fb54c. Summary will update automatically on new commits.