semantics

This commit is contained in:
2026-05-26 09:30:41 +03:00
parent 1e7bcecaea
commit 9ffa8af1dc
623 changed files with 28045 additions and 26557 deletions

View File

@@ -2,13 +2,13 @@
# @BRIEF Structured JSON logger implementing the molecular CoT (Chain-of-Thought) logging protocol.
# Uses ContextVar for trace_id and span_id propagation across async contexts.
# Provides log(), MarkerLogger, seed_trace_id(), push_span(), pop_span().
# @LAYER: Core
# @LAYER Core
# @RELATION CALLED_BY -> [TraceContextMiddleware]
# @RELATION CALLED_BY -> [All C4+ service and route modules]
# @PRE: Python 3.7+ (ContextVar available).
# @POST: JSON log records written to the 'cot' logger at appropriate levels.
# @SIDE_EFFECT: Writes structured JSON to the 'cot' Python logger.
# @DATA_CONTRACT: Log call -> Single-line JSON to logging.StreamHandler/file.
# @RELATION CALLED_BY -> [EXT:internal:All C4+ service and route modules]
# @PRE Python 3.7+ (ContextVar available).
# @POST JSON log records written to the 'cot' logger at appropriate levels.
# @SIDE_EFFECT Writes structured JSON to the 'cot' Python logger.
# @DATA_CONTRACT Log call -> Single-line JSON to logging.StreamHandler/file.
from contextvars import ContextVar
import logging