astrbot_plugin_memory_compa.../tests
YokiiroBW c1acfce738 fix: keep sleep-decay summaries retrievable, and stop excluding two tests
Sleep decay compresses a batch of stable memories into one summary row and
archives the originals. The summary was built without memory_domain, and
MemoryRecord.memory_domain defaults to "unknown" -- a truthy value, so the
`if not self.memory_domain:` classification branch in ensure_defaults has
never once executed. The summary stored as unknown, the retrieval gate only
admits user_memory and drops it before scoring, and the sources were already
archived out of the candidate query. Summary unreachable plus originals
unreachable meant the whole thread disappeared, silently, every night the
job ran.

Summaries now inherit the domain of their source records, and the decay
bucket key includes the domain so a bucket cannot mix domains and leave the
question undecidable. Before archiving anything, the summary is read back and
checked through the same gate the retrieval side uses; if the source was
reachable and the summary is not, the archive is skipped with a warning
rather than turning live memory into dead rows. A maintenance.memory_decay_
dry_run switch runs the whole selection and summarisation without writing.

ensure_defaults itself is left alone -- changing that default would reclassify
every write that omits a domain.

The two test_security_cache tests that have been excluded from the test
command for five rounds turned out to have the same root cause: the fixture
built a record without a domain, so search returned an empty set. Those tests
are about ACL and cache invalidation, not domain classification; with an
explicit domain the file passes 6/6 and no longer needs excluding.

Memory suite 330 passed, was 323 passed / 2 failed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 05:27:07 +08:00
..
__init__.py chore: import memory companion baseline 2026-07-24 00:25:42 +08:00
test_archive_contract.py feat: add temporal awareness to ops memory 2026-07-24 23:06:13 +08:00
test_audit_batch1_fixes.py feat: complete M6.1.3-R2 through M6.1.7 bot personal archive contract 2026-07-27 01:37:20 +08:00
test_bot_personal_memory.py feat: complete M6.1.3-R2 through M6.1.7 bot personal archive contract 2026-07-27 01:37:20 +08:00
test_bridge_ops_contract.py feat: add operations event domain contract 2026-07-24 22:16:30 +08:00
test_bridge_shared_experience.py feat: enforce Q5 user memory boundaries 2026-07-25 23:29:48 +08:00
test_calendar_bridge.py feat: enforce Q5 user memory boundaries 2026-07-25 23:29:48 +08:00
test_cross_window_continuity.py chore: import memory companion baseline 2026-07-24 00:25:42 +08:00
test_epistemic_calibration.py feat: enforce Q5 user memory boundaries 2026-07-25 23:29:48 +08:00
test_historical_chat_import.py chore: import memory companion baseline 2026-07-24 00:25:42 +08:00
test_m6_r2_real_dto_shape.py feat: complete M6.1.3-R2 through M6.1.7 bot personal archive contract 2026-07-27 01:37:20 +08:00
test_m6_r4_creative_media_domain.py feat: complete M6.1.3-R2 through M6.1.7 bot personal archive contract 2026-07-27 01:37:20 +08:00
test_m6_r5_bot_profiles.py feat: complete M6.1.3-R2 through M6.1.7 bot personal archive contract 2026-07-27 01:37:20 +08:00
test_m6_r6_bot_archive_api.py feat: complete M6.1.3-R2 through M6.1.7 bot personal archive contract 2026-07-27 01:37:20 +08:00
test_m6_r7_domain_isolation.py feat: complete M6.1.3-R2 through M6.1.7 bot personal archive contract 2026-07-27 01:37:20 +08:00
test_operations.py chore: import memory companion baseline 2026-07-24 00:25:42 +08:00
test_ops_domain.py feat: add operations event domain contract 2026-07-24 22:16:30 +08:00
test_ops_migration.py feat: add explicit memory data migration 2026-07-24 21:11:02 +08:00
test_panel_regressions.py feat: add calendar-aware ops memory history 2026-07-25 01:35:41 +08:00
test_q6_user_fact_bridge.py feat: add read-only user fact bridge 2026-07-26 02:14:15 +08:00
test_qq_history_reader.py chore: import memory companion baseline 2026-07-24 00:25:42 +08:00
test_rerank_validation.py chore: import memory companion baseline 2026-07-24 00:25:42 +08:00
test_retrieval_performance.py feat: enforce Q5 user memory boundaries 2026-07-25 23:29:48 +08:00
test_runtime_compat.py feat: add runtime capability probing 2026-07-24 21:34:04 +08:00
test_security_cache.py fix: keep sleep-decay summaries retrievable, and stop excluding two tests 2026-07-27 05:27:07 +08:00
test_sleep_decay_recall.py fix: keep sleep-decay summaries retrievable, and stop excluding two tests 2026-07-27 05:27:07 +08:00
test_store_consistency.py chore: import memory companion baseline 2026-07-24 00:25:42 +08:00
test_strict_session_visibility.py chore: import memory companion baseline 2026-07-24 00:25:42 +08:00
test_summary_relationship.py chore: import memory companion baseline 2026-07-24 00:25:42 +08:00
test_temporal_context.py feat: add temporal awareness to ops memory 2026-07-24 23:06:13 +08:00
test_user_memory_contract.py fix: migrate memory domain before indexing 2026-07-25 23:39:08 +08:00