[BUG] record.set reports a rejected value as internal: engine/transport failure
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 55/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- rust
调研方向
Read aimdb-core/src/typed_record.rs around line 1524 to understand the rejected value error, then trace how map_db_err in aimdb-core/src/session/aimx/dispatch.rs maps it and how RpcError is decoded in aimdb-client/src/engine.rs and aimx/codec.rs. The issue calls for a distinct wire error code that preserves the deserialization message while keeping engine and transport failures internal. Done means rejected values produce the specific error and unknown codes still fall back as described; the issue does not name tests to run.
由索引模型根据 Issue 内容生成。
描述
Describe the bug
When a remote record.set value fails to deserialize into the record's type, the client gets the same error as a broken engine or transport:
AimDB client error: Server error (code internal): engine/transport failure
The write is refused correctly and the session stays up. The problem is the report: a caller, especially an MCP agent, cannot tell that its own value was at fault, so it has no reason to correct it.
The server does build a specific message (typed_record.rs:1524), but it is lost on the way out:
map_db_errsends everything except not-found and permission errors toRpcError::Internal.RpcErrorcarries no message, so the client fills in its generic text (engine.rs:593).
To Reproduce
- Run an instance with a writable record whose type rejects some JSON, for example a custom deserializer that bounds a list's length.
- Call
record.set(or MCPset_record) with a value that type rejects. - See the error above.
Observed with a list over its bound (33 and 2000 elements against a limit of 32). A coordinate of 1e40 for an f32 field got the same reply; I did not trace that case separately.
Expected behavior
A distinct error code for a value the record's type rejected, separate from internal, ideally carrying the deserialization message. Real engine and transport failures keep internal.
Environment
- OS: macOS 13 (Darwin 22.6)
- Rust Version: rustc 1.98.0
- AimDB Version: main at d9c7be0
Additional context
A new code changes the AimX wire vocabulary, so existing clients need to handle it. code_err in aimx/codec.rs currently maps unknown codes to Internal, so older clients would fall back to today's behaviour.
- 主要语言
- 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 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
维护者通常 1 天内回复
相似的 Issue
-
good first issue help wanted
难度 2/5 1-3 小时 新手友好度 72/100
servo/rust-smallvec#873 ·
-
难度 1/5 1 小时以内 新手友好度 82/100
维护者通常 3 天内回复
-
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 天内回复
-
C-bug needs-triage SO-print-config
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复