[codex] Fix dynamic handler test env cleanup#5
Closed
coe0718 wants to merge 2 commits intoghostwright:mainfrom
Closed
[codex] Fix dynamic handler test env cleanup#5coe0718 wants to merge 2 commits intoghostwright:mainfrom
coe0718 wants to merge 2 commits intoghostwright:mainfrom
Conversation
Member
|
Hey @coe0718 - thanks for catching this! Really appreciate you taking the time to put together a fix. We ended up fixing the same lint issue in v0.18.0 (commit 2bca825, merged via #6), but looking at both approaches more carefully, your We're going to close this PR since the changes overlap and would conflict, but we'll adopt the Your memory PRs (#2, #3, #4) are excellent work - we're reviewing those now. Thanks again! |
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
Fixes the pre-existing Biome lint failure in
dynamic-handlers.test.tswithout changing the test semantics.What Changed
delete process.env.*cleanup with a smallrestoreEnvVar()helperReflect.deleteProperty()so env vars are actually removed instead of being set to the string"undefined"Why
Biome flags the
deleteoperator in this test file, but its suggested replacement (process.env.KEY = undefined) is behaviorally unsafe for Node/Bun because env vars become the string"undefined"instead of being removed.This keeps the lint fix small and behavior-preserving.
Validation
bash -lc 'export PATH="$HOME/.bun/bin:$PATH" && /home/coemedia/.bun/bin/bun test src/mcp/__tests__/dynamic-handlers.test.ts'bun run lint./node_modules/.bin/biome check src/mcp/__tests__/dynamic-handlers.test.ts