Repository navigation
feat: 统一关闭 Agent 的用户记忆召回,支持配置恢复 - #773
Merged
origami-chen merged 6 commits intoOct 28, 2026
Merged
origami-chen merged 6 commits into
origami-chen merged 6 commits into
Conversation
…ser_memory_recall
…ser_memory_recall
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.
变更说明
概述
本 PR 在 Memory 服务统一入口默认关闭独立
UserMemory向 Agent 的直接返回和上下文注入,覆盖 Memmy 自身 Agent,以及通过 hook、插件、skill 或 CLI 接入同一服务的 Codex、Claude、DSH、WorkBuddy 等外部 Agent。主要修改:
memmyMemory.algorithm.enableUserMemoryRecall,默认false;支持通过MEMMY_ENABLE_USER_MEMORY_RECALL覆盖并热加载恢复。user_memory_recall:disabled状态。内部仍保留用于采集确认、去重和纠错的候选。ceil(1.5 × limit)的候选名额,不转移 UserMemory 预算;最终返回上限、相关性筛选和上下文预算保持原规则。turn.start和memory.search的幂等缓存,避免关闭后重放此前包含 UserMemory 的结果。其它修改:
async/await。用户记忆的采集、管理页面查看和维护继续可用。L1 历史对话、L3 项目上下文等间接包含的用户信息不在本次隔离范围。SQL 缓存补丁未在本次构建中复测性能提升幅度。
关联问题:MEMMY-416
变更类型
测试情况
基线:
6b40c5f7,macOS arm64,Node 22.23.2、npm 10.9.8。npm run lint、npm run typecheck。smoke:memory-layer、smoke:local-agent-memory、smoke:local-agent-memory:cursor;计划及 HTTP 测试分别 10、6、6 项通过(两个本地 Agent 命令重复执行同组 6 项测试)。agent:test:tui-cursor:5 项通过。npm test已执行,但首次运行在 Memory 阶段有 3 项大队列测试超时,未整体通过;两份失败测试以单 worker 原阈值复跑,77 项通过。VITEST_MAX_WORKERS=2 MEMMY_APP_EDITION=cn npm run workspace:test补跑完整 workspace 测试;Memory 超时消失,backend 保留 2 项本地版本配置差异。cloud-client.test.ts用临时国内版测试配置单独复跑,28 项通过;没有修改本地.env或仓库测试配置。Workspace 补跑结果:
首次超时位于
queue-scheduling-baseline.repro.test.ts的 2 项测试和worker-event-loop-yield.test.ts的 1 项测试,单 worker 复跑及限制为 2 workers 的 Memory 全量均通过。backend 的 2 项失败位于cloud-client.test.ts,预期请求地区为cn,但测试配置直接加载本地.env中的intl;临时覆盖为cn后通过。根目录脚本原本会执行 Memory 两次。此次首次执行超时中断,第二次随 workspace 补跑通过,不能将补跑结果表述为原始
npm test整体通过。安装包:
Memmy-1.2.4-darwin-arm64-cn-unsigned.dmg,构建提交6b40c5f7。SHA-256:
41aa2bff0aa153bc636b207c14b99175086fde30223612a3e3e4627b5a6fa1dd。安装器放大背景图的可选替换因镜像空间不足未完成,原 DMG 保留且校验通过,调整安装器窗口大小时可能出现白边。
跳过的测试单独统计,不计入通过数量。
Reviewer 检查