Skip to content

Log configuration overrides when user config overwrites defaults#292

Merged
from2001 merged 4 commits intodevelopfrom
copilot/add-starting-logs-config-overwrite
Jan 20, 2026
Merged

Log configuration overrides when user config overwrites defaults#292
from2001 merged 4 commits intodevelopfrom
copilot/add-starting-logs-config-overwrite

Conversation

Copy link
Contributor

Copilot AI commented Jan 20, 2026

When loading a user config.toml, the server now logs which values override defaults, making configuration behavior transparent at startup.

Changes

  • config.py: Added ConfigOverride NamedTuple and modified create_config_from_args() to return (ServerConfig, list[ConfigOverride])
  • server.py: Log each override after logging initialization with format key: default_value -> new_value
  • tests: Added TestConfigOverrides class with 5 test cases covering override tracking scenarios

Example

Starting with a custom config that overrides dealer_port and server_name:

INFO | Loaded user configuration from config.toml
INFO | Configuration overrides from user config:
INFO |   dealer_port: 5555 -> 8888
INFO |   server_name: STYLY-NetSync-Server -> Custom Server

When no config file is provided or overrides match defaults, no override logs appear.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add starting logs when config.toml overwrites default values</issue_title>
<issue_description>Display server logs when configuration toml overwrites default values.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits January 20, 2026 01:31
Co-authored-by: from2001 <387880+from2001@users.noreply.github.com>
Co-authored-by: from2001 <387880+from2001@users.noreply.github.com>
Co-authored-by: from2001 <387880+from2001@users.noreply.github.com>
Copilot AI changed the title [WIP] Add starting logs for config.toml overwrites Log configuration overrides when user config overwrites defaults Jan 20, 2026
Copilot AI requested a review from from2001 January 20, 2026 01:35
@from2001 from2001 marked this pull request as ready for review January 20, 2026 01:35
@from2001
Copy link
Collaborator

@codex Review this PR.

@chatgpt-codex-connector
Copy link

To use Codex here, create a Codex account and connect to github.

@from2001
Copy link
Collaborator

@gemini-cli Review this PR.

@github-actions
Copy link
Contributor

🤖 Hi @from2001, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

@github-actions
Copy link
Contributor

Pull Request Review

I have reviewed the changes in this pull request and they look good.

The introduction of the ConfigOverride NamedTuple is a clean way to represent configuration overrides. The modifications to create_config_from_args correctly identify and collect these overrides, and the logging in server.py provides clear and useful information at startup.

The new test cases in TestConfigOverrides are comprehensive and cover various scenarios, ensuring the robustness of the new functionality.

Overall, the changes are well-implemented, address the issue effectively, and maintain good code quality. Approved!

@from2001 from2001 merged commit 7690d8f into develop Jan 20, 2026
@from2001 from2001 deleted the copilot/add-starting-logs-config-overwrite branch January 20, 2026 01:56
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.

Add starting logs when config.toml overwrites default values

2 participants