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:
2026-06-15 22:04:40 +03:00
parent 010edfcfdc
commit fd27569488
35 changed files with 7811 additions and 49 deletions

View File

@@ -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)