Skip to content

V3.5.2

Latest

Choose a tag to compare

@liuqin164 liuqin164 released this 21 Jun 01:51
5b3e9d0

Cogmem 3.5.2 — Episode Dream Engine Reliability Pass

Cogmem 3.5.2 is a reliability-focused release for the Episode Dream Engine.

This release hardens episode assembly, Dream candidate grounding, topic growth, hookless-agent ingestion, and repair workflows. It also introduces the first version of Cogmem’s user-shaped Memory Ontology and Topic Registry.

The core pipeline remains unchanged:

Raw Ledger
→ Episode Assembler
→ Sealed Episode
→ Dream Scheduler
→ Episode Dream Curator
→ Governance

The goal of this release is not to add another memory layer. The goal is to make the existing Episode Dream Engine much harder to misclassify, over-seal, over-dream, duplicate, or silently drift.


Highlights

  • Added User-Shaped Topic Ontology.
  • Added project-scoped Topic Path Registry.
  • Added Topic Alias Registry.
  • Added Topic Relation Graph.
  • Added Topic Governance with audited and reversible operations.
  • Added Memory Ontology skeleton.
  • Added Correction Resolver.
  • Added shared Cogmem block stripper.
  • Added episode cross-reference and repair audit support.
  • Added ingest-key lifecycle state.
  • Added per-episode Dream failure diagnostics.
  • Added per-job Dream modes.
  • Added deep Dream recommendations for large or old backlog.
  • Added hookless recall freshness warnings.
  • Added stronger MCP import diagnostics.
  • Added episode repair/surgery operations.
  • Added schema migration 24.
  • Added OpenClaw plugin 0.5.0 metadata.
  • Added new BrainEval reliability gates.
  • Updated version to 3.5.2.

User-Shaped Memory Ontology

Cogmem now has a fixed memory-class skeleton plus user-shaped topic state.

The fixed ontology classes include:

Time
Person
Object
Place
Project
Event
Decision
Goal
Preference
Correction
Plan
Evidence
Conversation
Topic
Entity
Relation

This ontology is not a hard-coded topic dictionary. It is the stable skeleton of the memory system.

User language now shapes the actual topic map.

For example, when a user says:

This should be called Episode Assembler.

Cogmem can register that wording as a project-scoped topic name or alias.

When a user says:

This does not belong under Dream. It belongs under Episode Assembler.

Cogmem can record an audited topic move operation.

Explicit user topic operations become active and auditable. Model-proposed topics, aliases, and relations remain candidates until governance approves them.


Topic Registry

3.5.2 adds project-scoped topic components:

TopicPathRegistry
TopicAliasRegistry
TopicRelationGraph
TopicGovernance

The Topic Registry supports:

topic creation
topic rename
topic alias
topic move
topic merge
topic split
topic relation
topic rollback

Alias collisions fail closed as needs_review.

Topic operations are reversible and recorded with audit metadata.

This replaces the previous direction of expanding a hard-coded domain keyword dictionary.

Topic continuity is now decided through:

project boundary
user-defined aliases
topic overlap
entity overlap
semantic similarity
advisory classification
governance

Unknown turns now fail closed as ambiguous review boundaries instead of being blindly attached to the active episode.


Hybrid Episode Classification

3.5.2 wires advisory hybrid classification into asynchronous assembly, import, and repair paths.

The foreground hook remains CPU-only for latency safety.

Background/import/repair paths may use the advisory classifier for ambiguous or high-value cases.

Reviewer output is allow-listed and cannot directly mutate durable memory.

The classifier can now use richer context:

current user text
current assistant text
previous user text
previous assistant text
active episode hints
recent relations
topic/entity overlap
user-shaped topic registry

This improves short-reply interpretation and topic-boundary reliability.


Safer Unknown-Turn Handling

Unknown turns no longer default to continues_previous.

Continuation now requires one of:

explicit continuation language
project overlap
topic overlap
entity overlap
semantic overlap
reviewer-confirmed continuity

Otherwise, the turn becomes an ambiguous review boundary.

This reduces silent episode pollution where unrelated messages were previously attached to the current episode.


Short Reply Disambiguation

Short replies now distinguish between:

accepts_assistant_proposal
answers_assistant_question
confirms_assistant_fact
corrects_previous
rejects_assistant_proposal

Examples:

assistant: Should we use option B?
user: yes
→ accepts_assistant_proposal
assistant: Are you talking about OpenClaw?
user: yes
→ answers_assistant_question
assistant: You mean version 3.5.0?
user: no, 3.5.2
→ corrects_previous

This prevents plain factual answers from being misread as project decisions.


Safer Soft-Seal Reopen

Soft-sealed episodes now reopen only for confirmed continuation, clarification, correction, or return-to-topic relations.

The following no longer reopen soft-sealed episodes:

hard topic switch
ambiguous shift
new topic
noise

This prevents old episodes from being accidentally reopened by unrelated turns.


Episode Repair and Surgery

3.5.2 adds audited episode repair capabilities.

Supported repair operations include:

split episode
merge episodes
move event
reclassify episode
requeue Dream
invalidate Dream run
mark old candidates stale
recompute closure receipt
preserve cross-references

Repair writes audit records and requeues eligible sealed episodes for Dream processing.

This is a major step toward making wrong episode boundaries recoverable.


Correction Resolver

Cogmem now includes a Correction Resolver.

Correction candidates no longer silently become active memory if they cannot target an existing belief.

The resolver searches active beliefs by:

project
claim key
topic cue
semantic query

If no target is found, the correction remains needs_confirmation.

This prevents orphan corrections from becoming new active facts.


Dream Candidate Grounding

Episode Dream evidence was hardened.

Episode-mode candidates must cite a non-empty exact subset of the current episode’s raw event IDs.

The following are rejected in episode mode:

missing evidence IDs
hallucinated evidence IDs
evidenceEventIds: ["all"]
fallback to first raw events
summary-only evidence

Semantic summaries remain hints only:

hint_only_not_evidence

A summary can help the curator understand an episode, but it cannot satisfy evidence requirements.


CPU-Owned Project Scope

Provider-supplied projectId can no longer override CPU-owned project scope.

Candidate project scope is derived from:

options.projectId
raw event projectId
CPU scope

If a provider emits a conflicting project ID, Cogmem ignores the provider value and keeps the CPU-owned scope.

This closes a potential cross-project contamination path.


Assistant Proposal Confirmation

Assistant proposal confirmation was strengthened.

Cogmem now scans a bounded prior same-session/thread window for the nearest assistant proposal.

The scan stops if an intervening user rejection or correction appears.

A valid confirmed proposal requires:

assistant proposal
later distinct user acceptance
same session/thread
no intervening rejection or correction

The candidate records paired evidence:

proposalEvidenceEventId
confirmationEvidenceEventId
evidenceKind: assistant_proposal_confirmed_by_user

A proposal without later unambiguous user confirmation cannot become user-owned memory.


Assistant-Only Decision Safety

Assistant-only decision-like episodes no longer enter the normal durable temporal candidate path.

If an episode appears to contain a decision but has no user evidence, it becomes needs_confirmation.

This prevents assistant suggestions from being promoted as user decisions.


Per-Job Dream Modes

Dream Scheduler now computes an effective Dream mode per job.

Auto mode no longer applies one global mode to the entire batch.

A batch can now contain a mix of:

micro
normal
deep

The result reports selected mode counts.

Explicit requested mode still overrides the batch.


Deep Dream Recommendations

Deep Dream can now be recommended for:

large backlog
old backlog
maintenance work
repair work
explicit operator request

This makes deep processing more explicit and explainable.


Dream Failure Diagnostics

Dream tick results now include failed episode details.

Each failed episode can report:

episodeId
error
failureCategory
retryAfter

Dream run receipts can persist failure details for later inspection.

This makes partial Dream failures easier to diagnose.


Resumable Import and MCP Diagnostics

Import reliability was improved.

CLI import now supports stronger checkpoint behavior and diagnostics.

MCP import now reports per-message status and partial failure information.

Hookless agents can receive clearer diagnostics when an import partially succeeds.

Ingest keys now have lifecycle state:

reserved
committed
failed

This helps recover from raw-write failures and prevents permanent reserved-key ambiguity.

Source-agent identity validation was also strengthened.


Hookless Agent Freshness Warnings

Hookless agents such as Hermes cannot be observed automatically.

3.5.2 makes this clearer by surfacing freshness warnings when recent ingestion is missing.

Recall/status paths can indicate:

no_recent_episode_ingestion_detected
semantic_memory_may_lag
suggested_tool: cogmem_episode_append
suggested_tool: cogmem_episode_import

This helps MCP-only agents avoid assuming Cogmem has already seen the latest conversation.


Shared Cogmem Block Stripper

A shared CogmemBlockStripper was added.

It is designed to remove malformed or variant COGMEM_* control blocks more safely than ad-hoc regular expressions.

Cogmem control blocks remain non-evidence and cannot satisfy durable memory requirements.


Payload Text Allow-Listing

Dream text extraction was hardened.

Instead of stringifying entire payload objects, Cogmem now uses allow-listed text-like fields.

This reduces the risk of sending internal metadata, tool payloads, or structured hidden fields into Dream curation.


Schema Migration 24

A new migration was added:

0024_episode_ontology_reliability

Schema version is now:

24

Migration 24 adds support for:

topic nodes
topic aliases
topic relations
topic operations
episode cross-references
episode repair audit
ingest lifecycle state
Dream failure details

It also strengthens migration/store parity coverage.


BrainEval Reliability Gates

BrainEval was extended with reliability-focused gates.

New checks target:

topic registry behavior
topic operation reversibility
episode repair safety
Dream evidence grounding
invalid provider evidence rejection
hookless recall freshness
per-job Dream modes
schema parity
payload hygiene

This makes 3.5.2 test coverage more aligned with real-world long-term memory risks.


Public API Additions

The public API now exposes topic and ontology capabilities, including:

MemoryOntology
TopicPathRegistry
TopicAliasRegistry
TopicRelationGraph
TopicGovernance
TopicTypes

Episode repair and reliability surfaces are also exposed through factory/public/internal exports.


MCP Updates

MCP adds or improves tools for topic and episode reliability:

cogmem_topic_list
cogmem_topic_operate
cogmem_topic_rollback
cogmem_episode_repair

MCP hookless-agent guidance was updated to clarify that Cogmem does not automatically observe Hermes-style conversations.

Agents must call append/import tools to keep memory current.


OpenClaw Plugin 0.5.0

OpenClaw plugin metadata was updated to 0.5.0.

The plugin continues to keep Dream out of the foreground response path.

Live hook processing remains CPU-first.

Background/import/repair paths can use the hybrid classifier when configured.


Documentation Updates

Updated documentation describes:

User-Shaped Topic Ontology
TopicRegistry
Topic aliases
Topic operations
Episode surgery
Dream reliability
Hookless-agent freshness warnings
Schema 24
OpenClaw plugin 0.5.0

Hermes and OpenClaw example agent skills were also updated.


Current Scope

Cogmem 3.5.2 is a reliability and ontology release.

It intentionally does not add:

a new memory layer
always-on LLM monitoring
foreground Dream during recall
automatic durable memory promotion
LLM-owned governance
tool execution from Dream

The release strengthens the existing Episode Dream Engine and adds user-shaped topic structure.