diff --git a/README.md b/README.md index a393cf44..63c70d8d 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ * [5.4. The Incremental Elite Engine](#54-the-incremental-elite-engine) * [5.5. Decoupled Knowledge Lifecycle (V2 Architecture)](#55-decoupled-knowledge-lifecycle-v2-architecture) * [5.6. Multi-Language Support Policy](#56-multi-language-support-policy) -6. [6. The Unified Agentic Database (Knowledge Graph)](#6-the-unified-agentic-database-knowledge-graph) +6. [6. The Unified Agentic Database (Coexistence Knowledge Graph)](#6-the-unified-agentic-database-coexistence-knowledge-graph) * [6.1. Database Components](#61-database-components) * [6.2. The 'Database-First' Reasoning Protocol (Zero-Redundancy)](#62-the-database-first-reasoning-protocol-zero-redundancy) * [6.3. Database Lifecycle and Hygiene](#63-database-lifecycle-and-hygiene) diff --git a/src/safety_readme.py b/src/safety_readme.py index 843deb33..3fb2a981 100644 --- a/src/safety_readme.py +++ b/src/safety_readme.py @@ -8,7 +8,7 @@ REQUIRED_SECTIONS = [ "3. The Agentic Stack", "4. The 2026 Architectural Shift", "5. Dual-Edition Architecture (V1 vs V2)", - "6. The Unified Agentic Database (Knowledge Graph)", + "6. The Unified Agentic Database (Coexistence Knowledge Graph)", "7. AI Economic Architecture and Cost Analysis", "8. The Agentic AI Engine", "9. GitHub Workflows and Automation", diff --git a/src/v2_optimizer.py b/src/v2_optimizer.py index 2c9a9156..88df59b8 100644 --- a/src/v2_optimizer.py +++ b/src/v2_optimizer.py @@ -106,12 +106,13 @@ class V2VisionEngine: # Mandate 30: MD039 - Global Data Sanitization (Purge all whitespace/hidden chars from titles) for url in list(self.inventory.keys()): - if isinstance(self.inventory[url], dict) and "title" in self.inventory[url]: - # Purge all known whitespace characters (standard, non-breaking, thin, etc.) + if isinstance(self.inventory[url], dict) and self.inventory[url].get("title") is not None: t = self.inventory[url]["title"] - t = re.sub(r'^[\s\u00a0\u200b\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]+', '', t) - t = re.sub(r'[\s\u00a0\u200b\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]+$', '', t) - self.inventory[url]["title"] = t + if isinstance(t, str): + # Purge all known whitespace characters (standard, non-breaking, thin, etc.) + t = re.sub(r'^[\s\u00a0\u200b\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]+', '', t) + t = re.sub(r'[\s\u00a0\u200b\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]+$', '', t) + self.inventory[url]["title"] = t # 0. Mandate Sync try: