semantics: complete DEF-to-region migration, fix regressions

- Convert legacy [DEF🆔Type] anchors to #region/#endregion across 329 files
- Reinstate _normalize_timestamp_value in sql_generator.py
- Fix MarkerLogger→logger migration in events.py (molecular CoT markers)
- Fix dataset_review orchestrator dependencies (_build_execution_snapshot)
- Fix config_manager stale-record deletion (moved to save path only)
- Add 77 missing [/DEF:] closers in 5 unbalanced test files
- Update assistant_chat.integration.test.js for #region format
- Apply molecular-cot-logging markers (REASON/REFLECT/EXPLORE) via logger.* methods
This commit is contained in:
2026-05-12 23:54:55 +03:00
parent fe8978f716
commit 306c5ae742
331 changed files with 9630 additions and 10312 deletions

View File

@@ -1,8 +1,8 @@
# #region AssistantModels [C:3] [TYPE Module] [SEMANTICS assistant, audit, confirmation, chat]
# @BRIEF SQLAlchemy models for assistant audit trail and confirmation tokens.
# @LAYER Domain
# @INVARIANT Assistant records preserve immutable ids and creation timestamps.
# @RELATION DEPENDS_ON -> [MappingModels]
# @LAYER: Domain
# @RELATION DEPENDS_ON -> MappingModels
# @INVARIANT: Assistant records preserve immutable ids and creation timestamps.
from datetime import datetime
@@ -13,9 +13,9 @@ from .mapping import Base
# #region AssistantAuditRecord [C:3] [TYPE Class]
# @BRIEF Store audit decisions and outcomes produced by assistant command handling.
# @PRE user_id must identify the actor for every record.
# @POST Audit payload remains available for compliance and debugging.
# @RELATION INHERITS -> [MappingModels]
# @RELATION INHERITS -> MappingModels
# @PRE: user_id must identify the actor for every record.
# @POST: Audit payload remains available for compliance and debugging.
class AssistantAuditRecord(Base):
__tablename__ = "assistant_audit"
@@ -34,9 +34,9 @@ class AssistantAuditRecord(Base):
# #region AssistantMessageRecord [C:3] [TYPE Class]
# @BRIEF Persist chat history entries for assistant conversations.
# @PRE user_id, conversation_id, role and text must be present.
# @POST Message row can be queried in chronological order.
# @RELATION INHERITS -> [MappingModels]
# @RELATION INHERITS -> MappingModels
# @PRE: user_id, conversation_id, role and text must be present.
# @POST: Message row can be queried in chronological order.
class AssistantMessageRecord(Base):
__tablename__ = "assistant_messages"
@@ -57,9 +57,9 @@ class AssistantMessageRecord(Base):
# #region AssistantConfirmationRecord [C:3] [TYPE Class]
# @BRIEF Persist risky operation confirmation tokens with lifecycle state.
# @PRE intent/dispatch and expiry timestamp must be provided.
# @POST State transitions can be tracked and audited.
# @RELATION INHERITS -> [MappingModels]
# @RELATION INHERITS -> MappingModels
# @PRE: intent/dispatch and expiry timestamp must be provided.
# @POST: State transitions can be tracked and audited.
class AssistantConfirmationRecord(Base):
__tablename__ = "assistant_confirmations"