Skip to content

Conversation

matdev83
Copy link
Owner

@matdev83 matdev83 commented Oct 9, 2025

Summary

  • ensure the CLI no longer overwrites configured log levels when no --log-level flag is provided
  • add a regression test to confirm apply_cli_args preserves an existing logging level

Testing

  • pytest tests/unit/test_cli_di.py::test_apply_cli_args_respects_existing_log_level -n 0
  • pytest -n 0 (fails: missing optional test dependencies such as respx/pytest_httpx/hypothesis/freezegun/pytest_mock)

https://chatgpt.com/codex/tasks/task_e_68e6e2a7fa688333a4ac0711e7251bb9

@matdev83
Copy link
Owner Author

APPROVED - This PR correctly fixes the CLI log level override bug.

Changes reviewed:

  • Changed argument default from to in
  • Updated help text to clarify the behavior
  • Added comprehensive regression test

Verification completed:

  • ✅ New test passes
  • ✅ All existing CLI tests pass (163 passed, 2 skipped)
  • ✅ No linting issues
  • ✅ Logic correctly preserves existing log levels when no flag is provided
  • ✅ Still allows explicit log level override via CLI flag

The fix is minimal, safe, and addresses the exact issue described. Ready to merge.

@matdev83
Copy link
Owner Author

APPROVED - This PR correctly fixes the CLI log level override bug.

Changes reviewed:

  • Changed --log-level argument default from INFO to None in src/core/cli.py
  • Updated help text to clarify the behavior
  • Added comprehensive regression test test_apply_cli_args_respects_existing_log_level()

Verification completed:

  • New test passes
  • All existing CLI tests pass (163 passed, 2 skipped)
  • No linting issues
  • Logic correctly preserves existing log levels when no --log-level flag is provided
  • Still allows explicit log level override via CLI flag

The fix is minimal, safe, and addresses the exact issue described. Ready to merge.

@matdev83 matdev83 merged commit 2b92b30 into dev Oct 10, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant