Skip to content

[B-09] Memory admission and formal storage - #7

Open
fym2001 wants to merge 4 commits into
DCC-Saber:masterfrom
fym2001:feat/b-memory-admission
Open

[B-09] Memory admission and formal storage#7
fym2001 wants to merge 4 commits into
DCC-Saber:masterfrom
fym2001:feat/b-memory-admission

Conversation

@fym2001

@fym2001 fym2001 commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • supersede B-side LLM-only memory extractors #6 with the complete B-side LLM-only extraction and formal memory-admission pipeline
  • promote MemoryCandidate into transactional MemoryRecord storage
  • use structured LLM decisions for create, duplicate, merge, replace, coexist, pending, and reject
  • keep validation, idempotency, versioning, lifecycle transitions, concurrency control, and rollback deterministic
  • preserve existing extractor signatures, core model fields, enum values, and the Phase 0 SQLite schema
  • add a Chinese design document, local test report, and screen-share demo

Verification

python -m pytest tests/test_conflict_resolver.py tests/test_memory_admission.py tests/test_memory_store.py tests/test_extractors.py tests/test_llm_memory_extractor.py tests/test_ingestion_to_extractors.py -q

Result: 81 passed.

python -m coverage run -m pytest tests/test_conflict_resolver.py tests/test_memory_admission.py tests/test_memory_store.py -q
python -m coverage report -m --include="memory/admission.py,memory/conflict_resolver.py,memory/version_manager.py,memory/lifecycle_state.py"

Result: admission modules total coverage 90%.

Full suite: 179 passed, 5 failed. The five pre-existing failures all require the missing data/raw/office_demo_events.jsonl; no B-side admission test fails.

Demo

python demo/b_memory_admission_demo.py

The demo prints the candidate, sanitized LLM request, structured conflict decision, stored versions, idempotent retry, and lifecycle transitions.

Review focus

  • MemoryCandidate -> MemoryRecord admission boundary
  • LLM conflict-decision JSON contract and fail-closed validation
  • SQLite transaction/idempotency behaviour under concurrent retries
  • future integration with the D-side lifecycle/forgetter draft without changing memory/lifecycle.py

@fym2001 fym2001 changed the title [B-09] ????????? [B-09] Memory admission and formal storage Aug 2, 2026
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