test: final 6 agents — 172+ translate tests, llm_analysis 89%, git_plugin 100%, migration/deps/routes polished. 85-94% files pushed to 95%+. Bulk: backup/debug/maintenance plugins
This commit is contained in:
@@ -301,14 +301,22 @@ def explore(self, msg, *args, **kwargs):
|
||||
"""Log an EXPLORE marker — searching, alternatives, violated assumptions.
|
||||
|
||||
Passes structured ``extra`` data so CotJsonFormatter produces proper JSON.
|
||||
If the first positional arg is a dict, it is treated as the payload.
|
||||
"""
|
||||
user_extra = kwargs.pop('extra', {})
|
||||
error_val = kwargs.pop('error', None)
|
||||
payload = kwargs.pop('payload', None)
|
||||
extra = {'marker': 'EXPLORE', 'intent': msg}
|
||||
if error_val is not None:
|
||||
extra['error'] = error_val
|
||||
# If a single dict is passed as positional arg, treat it as payload
|
||||
if not payload and len(args) == 1 and isinstance(args[0], dict):
|
||||
payload = args[0]
|
||||
args = ()
|
||||
if payload is not None:
|
||||
extra['payload'] = payload
|
||||
extra.update(user_extra)
|
||||
self.warning(msg, *args, extra=extra, **kwargs)
|
||||
self.warning(msg, extra=extra, **kwargs)
|
||||
# #endregion explore
|
||||
|
||||
|
||||
@@ -321,14 +329,22 @@ def reason(self, msg, *args, **kwargs):
|
||||
"""Log a REASON marker — strict deduction, core logic.
|
||||
|
||||
Passes structured ``extra`` data so CotJsonFormatter produces proper JSON.
|
||||
If the first positional arg is a dict, it is treated as the payload.
|
||||
"""
|
||||
user_extra = kwargs.pop('extra', {})
|
||||
error_val = kwargs.pop('error', None)
|
||||
payload = kwargs.pop('payload', None)
|
||||
extra = {'marker': 'REASON', 'intent': msg}
|
||||
if error_val is not None:
|
||||
extra['error'] = error_val
|
||||
# If a single dict is passed as positional arg, treat it as payload
|
||||
if not payload and len(args) == 1 and isinstance(args[0], dict):
|
||||
payload = args[0]
|
||||
args = ()
|
||||
if payload is not None:
|
||||
extra['payload'] = payload
|
||||
extra.update(user_extra)
|
||||
self.info(msg, *args, extra=extra, **kwargs)
|
||||
self.info(msg, extra=extra, **kwargs)
|
||||
# #endregion reason
|
||||
|
||||
|
||||
@@ -341,14 +357,22 @@ def reflect(self, msg, *args, **kwargs):
|
||||
"""Log a REFLECT marker — self-check, structural validation.
|
||||
|
||||
Passes structured ``extra`` data so CotJsonFormatter produces proper JSON.
|
||||
If the first positional arg is a dict, it is treated as the payload.
|
||||
"""
|
||||
user_extra = kwargs.pop('extra', {})
|
||||
error_val = kwargs.pop('error', None)
|
||||
payload = kwargs.pop('payload', None)
|
||||
extra = {'marker': 'REFLECT', 'intent': msg}
|
||||
if error_val is not None:
|
||||
extra['error'] = error_val
|
||||
# If a single dict is passed as positional arg, treat it as payload
|
||||
if not payload and len(args) == 1 and isinstance(args[0], dict):
|
||||
payload = args[0]
|
||||
args = ()
|
||||
if payload is not None:
|
||||
extra['payload'] = payload
|
||||
extra.update(user_extra)
|
||||
self.info(msg, *args, extra=extra, **kwargs)
|
||||
self.info(msg, extra=extra, **kwargs)
|
||||
# #endregion reflect
|
||||
|
||||
logger.explore = types.MethodType(explore, logger)
|
||||
|
||||
Reference in New Issue
Block a user