Skip to content

v2.9.0

Latest

Choose a tag to compare

@rolandpg rolandpg released this 02 Dec 06:25
· 2 commits to master since this release
0d42f4f

ZettelForge v2.9.0

Major feature & CTI hardening release introducing RFC-008 Memory Salience, Spacing Effects & Tiered Decay, Spec 002 CTI Memory Agent Hardening (Phases 1–3), opt-in Neo4j pathfinding, the npx zettelforge npm MCP wrapper, and security dependency updates. No manual database migration is required (SQLite columns and FTS5 index backfill automatically on open).

Highlights

CTI Memory Agent Hardening & Operational Reliability (Spec 002 — #227, #228, #229)

  • End-to-End TLP 2.0 Governance & Cloud Egress Guard (#228):
    • Enforces max_tlp (TLP:CLEAR .. TLP:RED, fail-closed on unknown ceilings/markings) across MemoryManager.recall(), recall_entity(), recall_actor(), get_context(), synthesize(), traverse_graph(), get_entity_relationships(), provenance_chain(), and MCP tools (zettelforge_recall, zettelforge_entity, zettelforge_synthesize, zettelforge_graph).
    • Fail-closed cloud-LLM TLP egress guard (TLPEgressViolationError) blocks TLP:AMBER+STRICT / TLP:RED notes on cloud providers (including fallback providers such as litellm) unless explicitly overridden via ZETTELFORGE_CLOUD_MAX_TLP / governance.cloud_max_tlp.
    • Annotates synthesis responses with high-water-mark TLP markings.
  • SQLite FTS5 BM25 3-Way Hybrid Retrieval (#229):
    • Synchronized CTI-friendly SQLite FTS5 index (notes_fts with unicode61 tokenchars '._-:/\', O(1) notes_fts_map rowid mapping, sentence-boundary delimiter normalization, and automatic backfill on open).
    • Wired into 3-way fusion (vector + graph + lexical BM25) in BlendedRetriever.blend() / blend_rrf() and MemoryManager.recall(), with automatic local FTS5 fallback when vector retrieval stalls or errors.
  • Crash-Safe Enrichment Startup Replay & Ledger Health (#229):
    • MemoryManager.replay_orphaned_enrichment_jobs() recovers abandoned queued/running RFC-018 enrichment jobs on startup (respecting enrichment.enabled, atomic durable owner_id claims to prevent duplicate execution across concurrent managers, oldest-first paging across large backlogs, bounded retries -> dead_lettered, missing note -> cancelled).
    • Exposes enrichment_ledger and enrichment_queue_depth health stats in MemoryManager.get_stats().
  • Bundled MITRE ATT&CK / MISP Aliases, IOC Refanging & Temporal Edges (#228):
    • Bundled src/zettelforge/data/cti_aliases.json (100+ actor/tool alias mappings) loaded beneath ~/.amem/entity_aliases.json overrides for zero-config SQLite deployments.
    • Non-mutating IOC refanging (hxxp://, [.], [@], [:]), new ipv6, cidr, asn, and yara_rule extractors, and non-routable IP/CIDR hub suppression in the knowledge graph.
    • Temporal edge validity enforcement (valid_from, valid_until, revoked) across SQLiteBackend, KnowledgeGraph, GraphRetriever, causal traversals, and MemoryManager.traverse_graph().
  • Prompt-Injection Guard, RFC-008 Lifecycle, MCP & Citation Grounding (#227, #229):
    • Tightened prompt_injection_guard.py to eliminate false positives on legitimate CTI bypass prose and bulleted TTP playbooks while keeping fail-closed injection blocking.
    • Wired RFC-008 spacing_strengths into retrieval blending, normalized UTC timestamps, vectorized salience similarity with numpy, and capped authoritative/durable CTI notes (tier=="A", persistence_semantics=="knowledge", CISA KEV, detection rules) at MemoryTier.COLD so they never auto-freeze.
    • Updated MCP zettelforge_recall to default exclude_superseded=True with full provenance metadata, expanded zettelforge_entity enum to 21 entity types with alias-aware actor routing, and hardened TypeQL string escaping.
    • Added strict citation grounding in SynthesisValidator.verify_citations() / validate_response() checking both structured source lists and inline [note_...] text citations.

Memory Lifecycle, Graph & Ecosystem

  • Memory Salience, Spacing Effects & Tiered Decay (RFC-008 Phases 1–5, 7) (#225): Von Restorff salience scoring (memory_salience.py), spacing reinforcement/decay curves (memory_spacing.py), lifecycle tiers (tiered_decay.py), and MemoryManager.reinforce_note() / refresh_memory_tiers().
  • Opt-in Neo4j Path-Query Backend & Sync Job (#224): pip install zettelforge[neo4j], ZETTELFORGE_NEO4J_PATHFINDING=true, and python -m zettelforge.scripts.neo4j_sync.
  • npm MCP Server Wrapper (#223): Run ZettelForge MCP directly via npx --yes zettelforge, plus server.json npm registry entry and .github/workflows/publish-npm.yml.
  • Typed Detection Metadata & Sigma Rule Extraction (#182, #185): DetectionMeta on MemoryNote.metadata.detection and sigma_rule extraction in EntityExtractor.
  • Documentation & Governance (#184, #186, #190, #193, #226): Updated docs for v2.9.0, ADRs 0001–0004, RFC-019, and Code Quality CI (mypy + ruff SARIF).

Security & Breaking Changes

  • Python 3.11+ required (Python 3.10 dropped; CI covers Python 3.11, 3.12, and 3.13) (#218).
  • Raised minimum versions for patched dependencies (Requests, PyArrow, Pydantic, Jinja2, LangChain, LiteLLM, dnspython, Pillow, filelock, pytest, FastAPI 0.162.5) (#218).
  • Temporarily disabled Maigret username discovery and removed its dependency due to SoupSieve CVE-2026-126190; see docs/security-update-2.9.0.md for upgrade cleanup notes (#218).
  • Fixed CodeQL stack-trace-exposure and URL-sanitization findings (#192) and hardened OSINT WHOIS collector error handling (#183).

Full Changelog: v2.8.0...v2.9.0