Skip to content

fix: restrict automatic recall to canonical atoms - #41

Merged
Bosheng0422 merged 2 commits into
developfrom
fix/atom-only-auto-recall
Nov 5, 2026
Merged

Bosheng0422 merged 2 commits into
developfrom
fix/atom-only-auto-recall

Conversation

@Bosheng0422

Copy link
Copy Markdown
Collaborator

Summary

Automatic recall could inject ordinary conversation when no promoted fact matched. It now gathers canonical atoms only, including optional vector atom hits, and returns empty when none match. Explicit memory tools retain multi-source/raw access.

⚠️ Recall/write path change: source restriction runs before gathering. Service, Hermes prefetch, CLI, and OpenClaw hybrid prefetch use it. OpenClaw passes atomOnly: true to shared Runtime and filters externally prefetched results at prompt rendering. Cache scope separates source modes, raw policies, sessions, and manual snapshots.

Clarification and acceptance

Scope and results: Atom-only automatic recall in HANDOFF; design: ADR-044.

  • Raw-only/page-only matches inject nothing; matching atoms remain available.
  • Explicit searches still retrieve raw evidence and host files.
  • Cached tool results cannot widen automatic injection.
  • No schema, extraction, promotion, historical-data, or model-call changes. Relevance/value screening is deferred.

Target branch

  • Base is develop; this PR does not publish a release.

Type of change

  • Bug fix
  • Documentation

Test plan

  • make all RUN='.venv/bin/python -m' with dedicated PostgreSQL 16: format/lint/strict mypy pass; 1608 passed, 12 optional host cases skipped.
  • SQLite/real-PG atom-only and real Harness background-review integration: 20 passed, no skips. Host Service/tools/recall-replay suites: 66 passed, no skips. Tests load changed memory source and real Harness source 2fef395.
  • OpenClaw: 69 passed; npm run typecheck and npm run build pass.
  • Added/updated source restriction, cache separation, retained raw search, host-file exclusion, Hermes prefetch, and OpenClaw rendering coverage.

The dedicated Harness run covers the ordinary gate's missing-Harness cases. Real Hermes installation E2E and running OpenClaw host hooks remain untested. Existing low-value/off-topic atoms can still be selected.

Checklist

  • Updated CHANGELOG.
  • Updated bilingual README/integration guides, ADR-044, map, test matrix, risks, audit, and HANDOFF.

@Bosheng0422 Bosheng0422 changed the title fix: 自动召回只使用 Atom,保留主动多源搜索 fix: restrict automatic recall to canonical atoms Nov 5, 2026
@Bosheng0422
Bosheng0422 merged commit e43ca72 into develop Nov 5, 2026
3 checks passed
@Bosheng0422
Bosheng0422 deleted the fix/atom-only-auto-recall branch November 5, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant