Memory 019ee5a7

Memory ID (Session ID): 019ee5a7-9634-7000-bf45-0543363f1021
Last Updated: 2026-06-21 16:39:36

Fact Summary

  1. REGEX SPECIFICATION:

    • When writing regex with boundary hyphens or backslashes in raw strings (e.g. r'(?<![\w-])term(?![\w-])'), ensure Python raw-string syntax contains only single backslashes \w rather than double-escaped double-backslashes, to prevent literal backslash rendering in generated documents.
  2. SQLITE SAFETY:

    • Check and ensure that references to SQLite connection objects (self.conn or conn) check for None before closing, committing, or querying, specifically in daemonized or filesystem-event-driven environments where connection life cycles might be asynchronous or interrupted.
  3. INCREMENTAL WRITING:

    • Avoid redundant disk I/O and page-regeneration triggers by wrapping write functions in a content-comparison helper (_write_if_changed). Implement this helper globally or at each document write site to check if the target content matches the new content before executing the write operation.

Reference Session