已开启
feat: harden RAM-A-MEM validation and observability #18
feat: harden RAM-A-MEM validation and observability #18
已开启
DoraA_Mengjie创建于 4 天前
DoraA_Mengjie
DoraA_Mengjie成员
4 天前

概述

完善 RAM-A-MEM 的输入参数和运行时配置约束,增强 Pipeline 与存储故障的可观测性,并补充记忆摄入、检索、幂等、Rerank 和日志行为的自动化验收用例。

主要变更

  • 为 MCP 记忆摄入和检索接口的会话标识、消息标识、说话人、案例库、查询文本及集合大小增加 Unicode 字符数和 Schema 约束。
  • 补充记忆摄入幂等性边界覆盖,包括 Principal/会话范围隔离、消息元数据变更冲突、缓存命中及仅上下文消息请求。
  • 覆盖记忆类型和语气类型枚举、Evidence span 精确匹配、candidate Evidence 要求、Grounding 结果、超长记忆隔离及 fail_fast 行为。
  • 为 HTTP 限制、Session Admission、Pipeline、检索模式和权重、Rerank、Provider、认证、图检索、案例库及持久化存储路径增加明确的运行时边界与关联配置校验。
  • 保留 Provider 和 Pipeline 的原始错误位置,在 MCP 失败响应中返回请求关联标识,并区分 Embedding、幂等存储、SQLite、向量持久化、Rerank、Extract 和 Ground 等主要故障。
  • 通过 RAM_A_LOG_FORMAT 支持 jsoncompact 日志格式,通过 RAM_A_LOG_SOURCE 控制源码位置输出;补充七阶段 Pipeline 事件、稳定诊断字段及敏感内容脱敏。
  • 明确 Rerank 重试分类与 fail_open 行为;仅在显式启用 fail_open 时,Rerank 失败才返回 Rerank 前的 Hybrid 排序结果。
  • 补充 RAM-A-MEM 完整配置、Pipeline/检索输入输出、日志设计及 RPM/Agent 自测流程文档。

兼容性与安全性

  • 默认日志格式仍为 JSON,默认不输出源码位置。
  • 已有合法配置继续使用文档中定义的默认值;非法或相互矛盾的运行时配置会在服务启动校验阶段失败。
  • 日志不会记录 Bearer Token、API Key、消息正文、Evidence quote 或完整记忆正文。
  • 本次提交不包含内部测试跟踪材料和本地执行产物。

验证结果

  • cargo test -p memory-mcp:146 个测试通过。
  • cargo test -p memory-pipeline:40 个测试通过。
  • cargo check --workspace:通过。
  • cargo clippy -p memory-mcp --all-targets -- -D warnings -A clippy::field-reassign-with-default -A clippy::items-after-test-module:通过。
  • 修改涉及的 Rust 源文件通过 rustfmt --edition 2021 --check
  • git diff --check:通过。

当前分支基于最新的 upstream/master,领先 7 个提交,没有仅存在于上游的新增提交。

likedislike
合并受阻
DoraA_MengjieDoraA_Mengjie成员
4 天前 创建了 pull request,commit 6d7f674a
atomgit-bot
atomgit-bot
4 天前 评论:

🤖 正在生成合并请求摘要,请稍候…

likedislike
atomgit-bot
atomgit-bot
4 天前 评论:

🤖 AI 代码检视正在进行中,请稍候…

likedislike
openeuler-ci-botopeneuler-ci-bot成员
4 天前 将lyhu,huzhengce,liumiao27,fromhsc,gogoxiaoxiao,wqianli,leon-wang2021,kaitiandu设为审查人
openeuler-ci-botopeneuler-ci-bot成员
4 天前 添加了label:sig/sig-intelligence
openeuler-ci-bot
openeuler-ci-bot成员
4 天前 评论:

Welcome To openEuler Community

Hey @jie-qi , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands. You can self-configure the PR merge rules for this repository. For more details, please refer to Here.

Contact Guide

If you have any questions, please contact the SIG: sig-intelligence ,
and any of the maintainers: @fromhsc, @gogoxiaoxiao, @huzhengce, @kaitiandu, @leon-wang2021, @liumiao27, @lyhu, @wqianli ,
and any of the committers: @chantsztung, @jie-qi, @vanient9gap, @xiangyou_xie, @xtchen .

likedislike
openeuler-ci-botopeneuler-ci-bot成员
4 天前 添加了label:openeuler-cla/no
openeuler-ci-botopeneuler-ci-bot成员
4 天前 添加了label:stat/needs-squash
atomgit-bot
atomgit-bot
4 天前 评论:

⚠️ 本次变更过大(25 个可审文件、3694 行,预估需 4 轮分片审查),已超出 AI 代码评审的处理范围,本次跳过。建议拆分为更小的 PR 以获得有效评审。

likedislike
atomgit-bot
atomgit-bot
4 天前 评论:

⚠️ 本次变更过大(25 个可审文件、3694 行,预估需 4 轮分片审查),已超出 AI 代码评审的处理范围,本次跳过。建议拆分为更小的 PR 以获得有效评审。

likedislike
DoraA_Mengjie
DoraA_Mengjie成员
4 天前 评论:

/check-cla

likedislike
DoraA_MengjieDoraA_Mengjie成员
4 天前 修改了pull request 的描述
DoraA_MengjieDoraA_Mengjie成员
4 天前 update merge request[project id: 10064997, iid: 18, commit_id: 592db58e4748f024eb2fcf93f8b6180efe569a42] virtual merging success
DoraA_MengjieDoraA_Mengjie成员
4 天前 推送  1 个提交:9e0b142c-fix: unify MCP session idle timeout
DoraA_MengjieDoraA_Mengjie成员
4 天前 update merge request[project id: 10064997, iid: 18, commit_id: df22ae5e9a71cc5c865ab1d824a0e93e798dc8d9] virtual merging success
DoraA_MengjieDoraA_Mengjie成员
4 天前 update merge request[project id: 10064997, iid: 18, commit_id: 09d309e76c89eb484b98bb8d2c3e199e30da911c] virtual merging success
DoraA_MengjieDoraA_Mengjie成员
4 天前 推送  1 个提交:c7ad5d04-test: cover configured MCP session deadlines
DoraA_MengjieDoraA_Mengjie成员
4 天前 update merge request[project id: 10064997, iid: 18, commit_id: c7c3e6c3826240aa588d2f8cf5496f0a0ea8324d] virtual merging success
openeuler-ci-bot
openeuler-ci-bot成员
4 天前 评论:

CLA Signature Guide

@jie-qi , thanks for your pull request.

The following commit(s) are not associated with a signed Contributor License Agreement (CLA).

Commit Reason
c7ad5d04 test: cover configured MCP sessi... the email used in the commit is an invalid email!
please check all commits.

To sign CLA, click here.

To check if your email is configured correctly, refer to the FAQs.

Once you've signed the CLA or updating your email, please comment /check-cla to revalidate CLA status.

likedislike