v2.6.0 - 认知科学驱动的记忆系统重构#98
Merged
Merged
Conversation
added 2 commits
March 17, 2026 11:16
- database.py: migrate_v26(), touch_message(), get_messages_with_dynamic_score(), _compute_retention() - incremental_compressor.py: 改用动态分数排序 - dag_compressor.py: _select_chunk() 使用动态分数,- agent_tools.py: lobster_grep 触发记忆巩固 - pipeline/event_segmenter.py: 情节边界检测模块 详见 Issue #97
🔴 必须修复的问题: 1. agent_tools.py: 修正 touch_message 调用的缩进(多余缩进导致视觉误导) 2. dag_compressor.py: 删除悬空的 _select_chunk 方法(不再被 leaf_compact 调用) 3. event_segmenter.py: _get_time_gap 返回 None 而非 0(符合 Issue #97 规范) 🟢 代码质量改进: 1. database.py: import math 移至文件顶部(之前在函数内) 2. dag_compressor.py: leaf_compact 返回值注释说明(多情节分割逻辑) 3. event_segmenter.py: 硬上限检测改用真实累计 token(优化固定 50 条窗口问题) 测试: EventSegmenter 单元测试通过 ✅ 编译: 所有文件语法检查通过 ✅
SonicBotMan
added a commit
that referenced
this pull request
Mar 17, 2026
* feat: 实现遗忘曲线动态评分和情节边界分割 - database.py: migrate_v26(), touch_message(), get_messages_with_dynamic_score(), _compute_retention() - incremental_compressor.py: 改用动态分数排序 - dag_compressor.py: _select_chunk() 使用动态分数,- agent_tools.py: lobster_grep 触发记忆巩固 - pipeline/event_segmenter.py: 情节边界检测模块 详见 Issue #97 * fix: 修复代码审查发现的 3 个问题 + 3 个代码质量改进 🔴 必须修复的问题: 1. agent_tools.py: 修正 touch_message 调用的缩进(多余缩进导致视觉误导) 2. dag_compressor.py: 删除悬空的 _select_chunk 方法(不再被 leaf_compact 调用) 3. event_segmenter.py: _get_time_gap 返回 None 而非 0(符合 Issue #97 规范) 🟢 代码质量改进: 1. database.py: import math 移至文件顶部(之前在函数内) 2. dag_compressor.py: leaf_compact 返回值注释说明(多情节分割逻辑) 3. event_segmenter.py: 硬上限检测改用真实累计 token(优化固定 50 条窗口问题) 测试: EventSegmenter 单元测试通过 ✅ 编译: 所有文件语法检查通过 ✅ --------- Co-authored-by: SonicBotMan <sonicman0261@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🧠 v2.6.0 Features
Feature 1: 遗忘曲线动态评分
Feature 2: 情节边界分割
测试结果
✅ 5/5 集成测试通过
✅ EventSegmenter 单元测试通过
Closes #97