Support persisting custom env vars in session defaults#207
Support persisting custom env vars in session defaults#207kamal wants to merge 4 commits intogetsentry:mainfrom
Conversation
commit: |
WalkthroughThis pull request introduces support for environment variables in session defaults. The changes extend the session defaults schema by adding an optional 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@kamal Thanks for this, would you mind fixing up the typecheck issue. In general it's recommended you install the pre-commit hook into this repo see: https://github.com/cameroncooke/XcodeBuildMCP/blob/main/docs/dev/CONTRIBUTING.md#local-development-setup |
3a47f1f to
40bc529
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| // (user-provided keys take precedence on conflict) | ||
| if (sessionDefaults.env && typeof sanitizedArgs.env === 'object' && sanitizedArgs.env) { | ||
| merged.env = { ...sessionDefaults.env, ...(sanitizedArgs.env as Record<string, string>) }; | ||
| } |
There was a problem hiding this comment.
There was a problem hiding this comment.
Not a real issue since clearing defaults should go through session-clear-defaults
- Skip deep-merge when env is an array (falls through to Zod validation) - Return detached copy of env from getAll() to prevent accidental mutation - Add tests for both cases Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>


As a follow up to #203, this adds support for persisting custom environment variables into session defaults