[BUG] aimdb-mcp: get_buffer_metrics cannot find a record by its key
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
先查看 tools/aimdb-mcp/src/tools/buffer_metrics.rs 中第 41 行附近的筛选逻辑,再将其与 tools/aimdb-mcp/src/tools/profiling.rs 中第 45 行附近对应的逻辑进行比较。为键名与其 Rust 类型名不同的记录添加或查找一个测试。完成标准是:按键查询时,get_buffer_metrics 能找到该记录,且测试通过。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
get_buffer_metrics takes a record_key, but it only matches that value against the record's Rust type name. When a record's key differs from its type name, querying by the real key returns found: false, even though the record exists.
The filter is in buffer_metrics.rs:41:
.filter(|r| r.name.contains(¶ms.record_key))
get_stage_profiling takes the same parameter and already matches both fields (profiling.rs:45).
To Reproduce
- Run an instance with a record whose key differs from its type name, for example key
motion.policywith typecontracts::Policy. - Call the MCP tool
get_buffer_metricswith{"record_key": "motion.policy"}. - The tool replies:
{
"found": false,
"message": "No records matching this key were found in the running instance.",
"record_key": "motion.policy"
}
Expected behavior
The tool finds the record by its key, as get_stage_profiling does. The fix is to match r.record_key as well as r.name, with a test where the two differ.
Environment
- OS: macOS 13 (Darwin 22.6)
- Rust Version: rustc 1.98.0
- AimDB Version: main at d9c7be0
Additional context
Seen against a host gateway over a Unix socket. The target instance may also be built without the metrics feature, but the lookup fails before that matters.
- 主要语言
- Rust
- 星标
- 101
- 派生
- 20
- 平均合并
- 2 小时 33 分钟
- 30 天内合并 PR
- 90
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
aimdb-dev/aimdb 的其他 Issue
-
🏷️ good first issue enhancement
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
维护者通常 1 天内回复
-
dependencies
难度 4/5 3-5 天 新手友好度 44/100
维护者通常 1 天内回复
相似的 Issue
-
Panic on live viewport resize when unstyled elements exist in display: none subtree可能已有人在做 @GoCoder7 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
DioxusLabs/blitz#1488 ·
维护者通常 1 天内回复
-
S-Needs triage
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
vectordotdev/vrl#2042 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复