Repository navigation
feat(learning): 只有角色发言作证据的确认不加保留强度 - #136
Merged
Merged
Conversation
…lone When a memory's speaker is not the role and a confirmation's target evidence is entirely self_output, skip the retention increment and the last_confirmed_at update and record a dropped item. Sources are still appended. Applies to explicit and duplicate-triggered confirmations.
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.
BR-B1 的 PR 2。依据 DECISIONS.md 2026-11-10「由此补充的规则」,设计 10.2。与 #135 互相独立,都从 origin/main 建分支。
改动
记忆的说话人不是“我”时,如果一次确认在目标段的证据全部是
self_output:last_confirmed_at,也不占用拆分树的确认名额(record_batch_memory_effect不调用);dropped中写一条单项弃项,固定原因confirmation only from self output;显式“确认”和去重触发的确认都适用。说话人是“我”的记忆行为不变。
未改学习提示词、
memory_ops.confirm_retention的增量语义、修正和反驳。只改了src/iris/learning.py和新增测试文件。实现上需要说明的几点
_embedding。这个字段是 numpy 数组,配置了 embedding 时dumps会抛错、使整批失败,假模型默认没有 embedding,测不到,已单独加测试。既有测试
没有修改任何既有断言或夹具。
测试
新增
tests/test_learning_confirmation_evidence.py(23 项):显式确认和去重确认各覆盖证据全为self_output、混合、全为他人、说话人是“我”四种情况;action_result/event不算角色发言;目标段外证据不计;遗忘中的记忆不因此恢复;弃项写入result_json;同批多项、拆分树的名额;修正和反驳不变。uv run pytest(3.13)uv run --locked --isolated --python 3.12 pytestuv build不调用真实模型;按任务要求不跑真实评测,随下一次学习线正式运行回归。