fix(agent): unify logging API + add molecular-cot coverage to agent module
Phase 1 — API unification: - Replace direct log() from cot_logger with canonical logger.reason/reflect/explore across _confirmation.py, _persistence.py, _tool_resolver.py, app.py Phase 2 — Gap filling: - tools.py: add REASON/REFLECT/EXPLORE to 17 C3 tool functions (was 0 logs) - app.py agent_handler (C4): add lifecycle REASON on entry, REFLECT on exit, EXPLORE on OutputParserException + general exception - langgraph_setup.py create_agent (C4): add REASON with model/config_source, EXPLORE on env-var/InMemorySaver fallback, REFLECT on graph compilation - _tool_resolver.py infer_tool_from_text (C3, 13 branches): REASON on inference - _persistence.py: REFLECT on save_conversation success, EXPLORE on prefetch Phase 3 — Plain log migration: - middleware.py: plain logger.info() -> logger.reason() - run.py: 7 plain logger.info/warning/error -> molecular REASON/EXPLORE Phase 4 — Cleanup: - cot_logger.py: deprecate MarkerLogger (@DEPRECATED + @REPLACED_BY) - molecular-cot-logging SKILL.md: remove cot_span Section IV (never implemented), renumber sections V-VII -> IV-VI, add cot_span rejection rationale Verification: pytest 27/27, axiom rebuild 5844/2993/0 warnings
This commit is contained in:
@@ -170,6 +170,9 @@ def log(
|
||||
# #region MarkerLogger [C:2] [TYPE Class] [SEMANTICS logger, proxy, marker, syntactic-sugar]
|
||||
# @ingroup Core
|
||||
# @BRIEF Thin proxy class providing .reason(), .reflect(), .explore() convenience methods.
|
||||
# @DEPRECATED Use logger.reason/reflect/explore from src.core.logger instead — MarkerLogger has
|
||||
# zero usages in the codebase and adds a redundant abstraction layer.
|
||||
# @REPLACED_BY logger.reason/reflect/explore (monkey-patched on superset_tools_app logger)
|
||||
class MarkerLogger:
|
||||
"""Thin proxy over the cot_logger.log() function.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user