fix(codexcli-mcp): remove dead logger parameter in convertToCodexFormat - #1779
Merged
dyoshikawa merged 2 commits intoJun 9, 2026
Merged
Conversation
The `logger` parameter of `convertToCodexFormat` was always called with `undefined` by its sole caller in `fromRulesyncMcp`, making it dead code. Remove it and call `warnWithFallback` with `undefined` directly, matching the inbound `convertFromCodexFormat` counterpart. This also drops the inline `import(...)` type annotation in favor of the codebase's static-import convention. Closes #1672 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
PR #1637 added a
loggerparameter toconvertToCodexFormatinsrc/features/mcp/codexcli-mcp.ts, but the sole caller infromRulesyncMcpalways passedundefined, making the parameter dead code. The inbound counterpartconvertFromCodexFormatalready hard-codesundefinedin itswarnWithFallbackcall, so the two directional converters were inconsistent.This applies Option A from the issue: remove the parameter entirely and call
warnWithFallbackwithundefineddirectly, matchingconvertFromCodexFormat. This also removes the inlineimport("../../utils/logger.js").Loggertype annotation, aligning with the codebase's top-level static-import convention.Changes
logger?parameter fromconvertToCodexFormat.warnWithFallback(undefined, ...)inside the converter, consistent withconvertFromCodexFormat.fromRulesyncMcpto drop theundefinedargument.Verification
pnpm cicheckpasses (format, lint, typecheck, 6049 tests, content checks).Closes #1672
🤖 Generated with Claude Code