fix(cli): prevent debug log persistence in production deployments - #14
Merged
Merged
Conversation
- Fixed CLI middleware logical gap where NEUROLINK_DEBUG wasn't explicitly set to 'false' when no debug flag provided - Prevents inherited environment variables from causing unwanted debug logs in production - Ensures deterministic logging behavior controlled by CLI flags, not external environment - Maintains backward compatibility - debug mode still works perfectly with --debug flag Fixes: Debug logs appearing in deployed CLI without --debug flag Impact: Clean production output, environment-independent logging behavior Version: 1.5.3
There was a problem hiding this comment.
Pull Request Overview
This PR addresses a CLI middleware bug by ensuring that the environment variable controlling debug logging (NEUROLINK_DEBUG) is explicitly set to 'false' when debug mode is not enabled, preventing unwanted debug logs from persisting in production. The key changes include:
- Simplifying the debug flag handling in the CLI to always set NEUROLINK_DEBUG to 'false' when not in debug mode.
- Updating the package version to 1.5.3.
- Adding a detailed changelog entry documenting the fix.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/cli/index.ts | Updated CLI debug flag logic to ensure NEUROLINK_DEBUG is set to 'false'. |
| package.json | Bumped version from 1.5.2 to 1.5.3. |
| CHANGELOG.md | Documented the debug log persistence fix and version update. |
Comments suppressed due to low confidence (1)
src/cli/index.ts:183
- The updated condition simplifies the handling of the debug flag by setting NEUROLINK_DEBUG to 'false' whenever debug mode is not active. Confirm that this behavior is intended, particularly for cases where the debug flag might be explicitly set to a falsy value.
} else {
github-actions Bot
pushed a commit
that referenced
this pull request
Jun 20, 2025
# 1.0.0 (2025-06-20) * 🎉 feat: Enhanced multi-provider support with production infrastructure ([#16](#16)) ([55eb81a](55eb81a)) ### Bug Fixes * **cli:** prevent debug log persistence in production deployments ([#14](#14)) ([7310a4c](7310a4c)) * production-ready CLI logging system and enhanced provider fallback ([#13](#13)) ([a7e8122](a7e8122)) ### Features * 🚀 MCP automatic tool discovery + dynamic models + AI function calling ([781b4e5](781b4e5)) * add Google AI Studio integration and restructure documentation ([#11](#11)) ([346fed2](346fed2)) * add Google AI Studio, fix CLI dependencies, and add LICENSE file ([#12](#12)) ([c234bcb](c234bcb)) * implement AI Development Workflow Tools and comprehensive visual documentation ([#10](#10)) ([b0ae179](b0ae179)) * implement comprehensive CLI tool with visual documentation and … ([#4](#4)) ([9991edb](9991edb)) ### BREAKING CHANGES * Enhanced provider architecture with MCP integration - ✨ MCP automatic tool discovery - detects 82+ tools from connected servers - 🎯 AI function calling - seamless tool execution with Vercel AI SDK - 🔧 Dynamic model configuration via config/models.json - 🤖 Agent-based generation with automatic tool selection - 📡 Real-time MCP server management and monitoring - Added MCPEnhancedProvider for automatic tool integration - Implemented function calling for Google AI, OpenAI providers - Created unified tool registry for MCP and built-in tools - Enhanced CLI with `agent-generate` and MCP management commands - Added comprehensive examples and documentation - Automatic .mcp-config.json discovery across platforms - Session-based context management for tool execution - Graceful fallback when MCP servers unavailable - Performance optimized tool discovery (<1ms per tool) - Added 5 new comprehensive guides (MCP, troubleshooting, dynamic models) - Created practical examples for all integration patterns - Updated API reference with new capabilities - Enhanced memory bank with implementation details Resolves: Enhanced AI capabilities with real-world tool integration * None - 100% backward compatibility maintained Closes: Enhanced multi-provider support milestone Ready for: Immediate production deployment Impact: Most comprehensive AI provider ecosystem (9 providers) Co-authored-by: sachin.sharma <sachin.sharma@juspay.in>
murdore
pushed a commit
that referenced
this pull request
Jun 20, 2025
* 🎉 feat: Enhanced multi-provider support with production infrastructure ([#16](#16)) ([55eb81a](55eb81a)) * **cli:** prevent debug log persistence in production deployments ([#14](#14)) ([7310a4c](7310a4c)) * production-ready CLI logging system and enhanced provider fallback ([#13](#13)) ([a7e8122](a7e8122)) * 🚀 MCP automatic tool discovery + dynamic models + AI function calling ([781b4e5](781b4e5)) * add Google AI Studio integration and restructure documentation ([#11](#11)) ([346fed2](346fed2)) * add Google AI Studio, fix CLI dependencies, and add LICENSE file ([#12](#12)) ([c234bcb](c234bcb)) * implement AI Development Workflow Tools and comprehensive visual documentation ([#10](#10)) ([b0ae179](b0ae179)) * implement comprehensive CLI tool with visual documentation and … ([#4](#4)) ([9991edb](9991edb)) * Enhanced provider architecture with MCP integration - ✨ MCP automatic tool discovery - detects 82+ tools from connected servers - 🎯 AI function calling - seamless tool execution with Vercel AI SDK - 🔧 Dynamic model configuration via config/models.json - 🤖 Agent-based generation with automatic tool selection - 📡 Real-time MCP server management and monitoring - Added MCPEnhancedProvider for automatic tool integration - Implemented function calling for Google AI, OpenAI providers - Created unified tool registry for MCP and built-in tools - Enhanced CLI with `agent-generate` and MCP management commands - Added comprehensive examples and documentation - Automatic .mcp-config.json discovery across platforms - Session-based context management for tool execution - Graceful fallback when MCP servers unavailable - Performance optimized tool discovery (<1ms per tool) - Added 5 new comprehensive guides (MCP, troubleshooting, dynamic models) - Created practical examples for all integration patterns - Updated API reference with new capabilities - Enhanced memory bank with implementation details Resolves: Enhanced AI capabilities with real-world tool integration * None - 100% backward compatibility maintained Closes: Enhanced multi-provider support milestone Ready for: Immediate production deployment Impact: Most comprehensive AI provider ecosystem (9 providers) Co-authored-by: sachin.sharma <sachin.sharma@juspay.in>
1 of 92 tasks
7 tasks
4 of 5 tasks
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.
Fixes: Debug logs appearing in deployed CLI without --debug flag
Impact: Clean production output, environment-independent logging behavior
Version: 1.5.3