Skip to content

Commit f2eeeed

Browse files
authored
Merge pull request #34 from beersoccer/feature/memory-lifecycle-cleanup
chore: release v0.2.7 with checkpoint optimizations and new user checkpoint tool
2 parents 2a2e42f + 3eba8a8 commit f2eeeed

47 files changed

Lines changed: 1027 additions & 935 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
计划(check_extraction_status 使用独立池并显式关闭)
2+
3+
- 通过 build_local_mem0_config_without_pool 构建独立配置
4+
- 使用 SyncMem0Client 创建 Memory
5+
- 工具结束时显式 close() 释放资源
6+
- 更新单元测试的 mock 与断言
7+
8+
涉及文件:
9+
- tools/check_extraction_status.py
10+
- tests/unit/tools/test_check_extraction_status.py
11+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
计划(check_extraction_status 使用独立池并显式关闭)
2+
3+
- 使用 build_local_mem0_config_without_pool 构建独立配置
4+
- 改为 SyncMem0Client 创建 Memory
5+
- 在工具执行完成时调用 close() 释放资源
6+
- 更新单元测试 mock 与断言
7+
8+
涉及文件:
9+
- tools/check_extraction_status.py
10+
- tests/unit/tools/test_check_extraction_status.py
11+
计划(check_extraction_status 使用独立池并显式关闭)
12+
13+
- 改为 build_local_mem0_config_without_pool 构建配置
14+
- 使用 SyncMem0Client 获取 Memory 实例
15+
- 在工具结束时显式 close() 释放资源
16+
- 更新单元测试的 mock/断言
17+
18+
涉及文件:
19+
- tools/check_extraction_status.py
20+
- tests/unit/tools/test_check_extraction_status.py
21+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
计划(checkpoint/version 调整)
2+
3+
- 移除 checkpoint/task_status metadata 中的 *_key,改为 version=v1
4+
- checkpoint metadata 去掉 user_id,仅保留内部标记与 version
5+
- task_status metadata 同步去掉 task_key,保留 version
6+
- 更新 filters 与相关测试断言
7+
- 保持 agent_id 作为 app_id 的作用域参数
8+
9+
涉及文件:
10+
- utils/checkpoint.py
11+
- utils/task_status.py
12+
- tests/unit/utils/test_checkpoint.py
13+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
计划(修复 get_user_checkpoint 连接池关闭报错)
2+
3+
- 使用 build_local_mem0_config_without_pool 避免复用已关闭连接池
4+
- 更新 get_user_checkpoint 工具调用路径
5+
- 调整对应单元测试的 patch 入口
6+
7+
涉及文件:
8+
- tools/get_user_checkpoint.py
9+
- tests/unit/tools/test_get_user_checkpoint.py
10+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
计划(get_user_checkpoint 使用 SyncMem0Client 并显式 close)
2+
3+
- 用 build_local_mem0_config_without_pool 构建独立配置
4+
- 改为 SyncMem0Client(config_override=...) 创建 Memory
5+
- 在工具执行完成时调用 close() 释放资源
6+
- 更新单元测试 mock/pattern
7+
8+
涉及文件:
9+
- tools/get_user_checkpoint.py
10+
- tests/unit/tools/test_get_user_checkpoint.py
11+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
计划(app_id 不再用 "*" 填充)
2+
3+
- checkpoint 读写不再把缺省 app_id 变成 "*"
4+
- get_user_checkpoint 工具返回与日志中保留空 app_id
5+
- 更新单元测试断言(agent_id 为空、返回字段为 None)
6+
7+
涉及文件:
8+
- utils/checkpoint.py
9+
- tools/get_user_checkpoint.py
10+
- tests/unit/utils/test_checkpoint.py
11+
- tests/unit/tools/test_get_user_checkpoint.py
12+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
计划(update_memory 参数校验与 checkpoint 说明修正)
2+
3+
- 在 update_memory 工具中校验 memory_id 为 UUID
4+
- 更新 update_memory.yaml 文案提示 UUID 要求
5+
- 新增单元测试覆盖非法 memory_id
6+
- 修正 checkpoint 头部注释与当前 app_id/agent_id 逻辑一致
7+
8+
涉及文件:
9+
- tools/update_memory.py
10+
- tools/update_memory.yaml
11+
- tests/unit/tools/test_update_memory.py
12+
- utils/checkpoint.py
13+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
计划(查看工具资源管理对齐长期记忆工具)
2+
3+
- 查看工具禁用 keepalive,避免额外后台线程
4+
- 保持独立池与显式 close,确保不影响其它工具
5+
- 更新单测,断言 enable_keepalive=False
6+
7+
涉及文件:
8+
- tools/get_user_checkpoint.py
9+
- tools/check_extraction_status.py
10+
- tests/unit/tools/test_get_user_checkpoint.py
11+
- tests/unit/tools/test_check_extraction_status.py
12+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Plan: Checkpoint release summary + version/docs update
2+
3+
- Review git diff to extract checkpoint-focused changes and related tests.
4+
- Summarize changes since last commit with emphasis on checkpoint behavior.
5+
- Bump version (manifest + pyproject) by one patch.
6+
- Update root markdown docs (README, CHANGELOG, PR_TEMPLATE, CONFIG, PRIVACY) with new version/date notes.
7+
- Re-scan docs for consistency and adjust "What's New" and version history.
8+
9+
Files to touch:
10+
- manifest.yaml
11+
- pyproject.toml
12+
- README.md
13+
- CHANGELOG.md
14+
- PR_TEMPLATE.md
15+
- CONFIG.md
16+
- PRIVACY.md
17+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# 计划:checkpoint 统一使用字符串 "true"
2+
3+
- 调整 `checkpoint_metadata()` 写入 `__internal="true"`
4+
- 简化 `checkpoint_filters()` 回到仅字符串过滤
5+
- 移除本地二次过滤与相关兼容函数
6+
- 同步修正同步/异步加载逻辑
7+
- 更新单元测试断言以匹配字符串写入
8+
9+
文件清单:
10+
- `utils/checkpoint.py`
11+
- `tests/unit/utils/test_checkpoint.py`
12+

0 commit comments

Comments
 (0)