Skip to content

fix(s09): keep latest user context in memory query - #616

Closed
chx0203 wants to merge 1 commit into
shareAI-lab:mainfrom
chx0203:ao/create-and-publish/s09-recent-context
Closed

chx0203 wants to merge 1 commit into
shareAI-lab:mainfrom
chx0203:ao/create-and-publish/s09-recent-context

Conversation

@chx0203

@chx0203 chx0203 commented Nov 7, 2026

Copy link
Copy Markdown

Fixes #517

Summary

  • Keep the latest three non-empty user messages in chronological order while retaining the final 4,000 characters of the memory-selection query.
  • Add a regression test covering a short latest message that was previously truncated away.
  • Document the behavior in the English, Chinese, and Japanese s09 READMEs.

Validation

  • pytest tests/test_memory_recent_user_text.py tests/test_chapter_readmes.py -q — 4 passed.
  • Full pytest tests -q — 498 passed; 2 unrelated existing s16 generated-data consistency tests fail in tests/test_web_scenarios.py.

AI assistance: implemented and validated with Codex.

@chx0203 chx0203 closed this Nov 7, 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.

s09: select_relevant_memories 的 "recent" 拼接顺序与切片不合理,不是真正的最近 2k 上下文

1 participant