Repository navigation
feat(recall): add bounded atomic memory manifest - #2192
Tech-Circle-48 wants to merge 21 commits into
Conversation
hidb4ai
left a comment
There was a problem hiding this comment.
The tagged manifest path rejects valid input, and the Desktop and skill-validation contracts need to be synchronized. Details inline.
a36e595 to
530b99c
Compare
hireview001
left a comment
There was a problem hiding this comment.
- Resolve merge conflicts with the target branch.
| text="validation", | ||
| description="validation", | ||
| ) | ||
| mode, vector, query_embedding, embedding_calls = await self._resolve_query_embedding( |
There was a problem hiding this comment.
[P1] search() 的解包元数与 _resolve_query_embedding 的返回值不一致,所有检索调用在运行期直接抛 ValueError
7cb90431(Merge branch 'master' into s3,父提交 8f44c20f + 1da99747)的冲突解析把 master 侧的五元返回截成四元:本行删掉了 embedding_fallback,但同文件 _resolve_query_embedding 在该 head 仍返回 5 项(return "text", None, None, 0, _fallback_reason(exc) / return mode, vector, MemoryQueryEmbedding(...), 1, None 等)。
触发条件与影响:ScopedAtomicMemory.search() 的每一次调用都会在解包处失败,覆盖 HTTP POST /v1/atomic-memory/search、MCP 检索工具、Python client 与内部 recall 链路,属核心读路径整体不可用。
证据:
- 本地 exact head 树(
7cb90431)跑本 PR 新增用例:pytest tests/e2e/test_recall_manifest.py→1 failed: ValueError: too many values to unpack (expected 4),栈顶即runtime/atomic_memory.py:590。 - 同一 head 的 CI
tests (3.11, unit)(job 120817133346)日志出现 63 次ValueError: too many values to unpack (expected 4),例如FAILED tests/builtin/artifacts/atomic_memory/test_forgetting.py::test_atomic_forgetting_preserves_history_tags_and_current_projection[sqlite]、FAILED tests/builtin/persistence/test_memory.py::test_sqlite_memory_backend_commits_authoritative_history_and_fts;该 head 当前 32 个红 check(含tests (3.1x, unit/e2e)、quality、Acceptance (sqlite/oceanbase))。
同一处合并还留下第二个缺口::675 仍以 embedding_fallback=embedding_fallback 传给 _rerank,而唯一的赋值已被本行删除 ⇒ 即使只把解包改成 _,该关键字要么继续引用未绑定名字(NameError),要么被顺手删掉从而丢失 master 的 RFC 1435 fallback_reason 上报。
建议:恢复 mode, vector, query_embedding, embedding_calls, embedding_fallback = await self._resolve_query_embedding(...),保留 _rerank(..., embedding_fallback=embedding_fallback) 的传递;并补一条断言检索结果带有 fallback 原因(memory.search.embedding_fallback)的用例,本次合并把该路径的覆盖一并丢了。合并后请重跑 tests/e2e/test_recall_manifest.py 与 unit 选择集确认转绿。
|
@Tech-Circle-48 please fix the file confliction and ci failure. |
Which issue or RFC does this PR close?
Closes #1864
Rationale for this change
Agents currently need to retrieve memory content before deciding which entries are useful. A bounded, metadata-only manifest provides a cheaper first step, allowing agents to select entries before fetching their full content.
What changes are included in this PR?
Are there any user-facing changes?
POST /v1/recall/manifestandget_recall_manifest.How was this change tested?
make checkAI usage statement