Skip to content

Conversation

@zmyzxb
Copy link
Collaborator

@zmyzxb zmyzxb commented Oct 10, 2025

Describe this PR

What changed?

Why?

Related issues

Checklist for PR

  • Write a descriptive PR title following the Angular commit message format: <type>(<scope>): <subject>

    • Examples: feat(agent): add pdf tool via mcp, perf: make llm client async, fix(utils): load custom config via importlib
    • Valid types: feat, fix, docs, style, refactor, perf, test, build, ci, revert
    • The check-pr-title CI job will validate your title format
    • Bad title examples and why they fail:
      • Update README ❌ Missing type and colon
      • feat add new feature ❌ Missing colon after type
      • Feature: add new tool ❌ Invalid type (should be feat)
      • feat(Agent): add tool ❌ Scope should be lowercase
      • feat(): add tool ❌ Empty scope not allowed
      • feat(my_scope): add tool ❌ Underscores not allowed in scope
      • feat(my space): add tool ❌ Space not allowed in scope
      • feat(scope):add tool ❌ Missing space after colon
      • feat(scope): ❌ Empty subject
  • Run lint and format locally:

    • uv tool run ruff@0.8.0 check --fix .
    • uv tool run ruff@0.8.0 format .
    • CI job lint enforces ruff default format/lint rules on all new codes.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds comprehensive logging support for tool operations and per-task log storage to improve debugging and monitoring capabilities.

  • Implements ZMQ-based logging infrastructure for collecting logs from MCP servers
  • Adds per-task log file storage with context-aware logging
  • Integrates logging setup across all MCP servers with banner suppression

Reviewed Changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
src/logging/logger.py Core logging infrastructure with ZMQ handlers, task context management, and file-based per-task logging
src/tool/manager.py Integration of task context variables into MCP server parameters
src/tool/mcp_servers/*.py Addition of logging setup and banner suppression across all MCP servers
common_benchmark.py Integration of logging context for benchmark task execution
pyproject.toml Addition of pyzmq dependency for ZMQ-based logging

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


if __name__ == "__main__":
mcp.run(transport="stdio")
mcp.run(transport="stdio",show_banner=False)
Copy link

Copilot AI Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after comma in function call parameters. Should be mcp.run(transport=\"stdio\", show_banner=False)

Suggested change
mcp.run(transport="stdio",show_banner=False)
mcp.run(transport="stdio", show_banner=False)

Copilot uses AI. Check for mistakes.

if __name__ == "__main__":
mcp.run(transport="stdio")
mcp.run(transport="stdio",show_banner=False)
Copy link

Copilot AI Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after comma in function call parameters. Should be mcp.run(transport=\"stdio\", show_banner=False)

Suggested change
mcp.run(transport="stdio",show_banner=False)
mcp.run(transport="stdio", show_banner=False)

Copilot uses AI. Check for mistakes.

if __name__ == "__main__":
mcp.run(transport="stdio")
mcp.run(transport="stdio",show_banner=False)
Copy link

Copilot AI Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after comma in function call parameters. Should be mcp.run(transport=\"stdio\", show_banner=False)

Suggested change
mcp.run(transport="stdio",show_banner=False)
mcp.run(transport="stdio", show_banner=False)

Copilot uses AI. Check for mistakes.
Comment on lines +158 to +161
mcp.run(transport="stdio",show_banner=False)
else:
# For HTTP transport, include port and path options
mcp.run(transport="streamable-http", port=args.port, path=args.path)
mcp.run(transport="streamable-http", port=args.port, path=args.path,show_banner=False)
Copy link

Copilot AI Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after comma in function call parameters. Should be mcp.run(transport=\"stdio\", show_banner=False) and mcp.run(transport=\"streamable-http\", port=args.port, path=args.path, show_banner=False)

Copilot uses AI. Check for mistakes.

if __name__ == "__main__":
mcp.run(transport="stdio")
mcp.run(transport="stdio",show_banner=False)
Copy link

Copilot AI Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after comma in function call parameters. Should be mcp.run(transport=\"stdio\", show_banner=False)

Suggested change
mcp.run(transport="stdio",show_banner=False)
mcp.run(transport="stdio", show_banner=False)

Copilot uses AI. Check for mistakes.

def remove_all_console_handlers():
"""
移除当前进程中所有 logger 上的 console handler (StreamHandler/RichHandler)。
Copy link

Copilot AI Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments should be in English to maintain code consistency, as the rest of the codebase uses English comments.

Suggested change
移除当前进程中所有 logger 上的 console handler (StreamHandler/RichHandler)
Remove all console handlers (StreamHandler/RichHandler) from all loggers in the current process.

Copilot uses AI. Check for mistakes.
Comment on lines +160 to +162
log_dir: str | Path | None = None, # 日志存储目录
log_filename: str = "miroflow.log", # 默认日志文件名
to_console: bool = True, # 是否显示到 console
Copy link

Copilot AI Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments should be in English to maintain code consistency, as the rest of the codebase uses English comments.

Suggested change
log_dir: str | Path | None = None, # 日志存储目录
log_filename: str = "miroflow.log", # 默认日志文件名
to_console: bool = True, # 是否显示到 console
log_dir: str | Path | None = None, # Directory to store log files
log_filename: str = "miroflow.log", # Default log file name
to_console: bool = True, # Whether to display logs to console

Copilot uses AI. Check for mistakes.
BinWang28 and others added 3 commits October 10, 2025 13:42
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@BinWang28 BinWang28 merged commit 648f6cf into MiroMindAI:miroflow-v0.3 Oct 10, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants