Conversation
Opening a span's detail looked up the raw turn recorded on the span and assumed it still existed. Deleting a task from the panel deletes its episode, and the foreign key cascade removes the episode's raw turns with it, but spans are not in the episode's L1 list, so they stay active and listed. Opening such a span threw a TypeError and the detail request returned 500. The desktop drawer only shows its delete button once the detail loads, so the span could not be deleted there either. When the raw turn is gone, the span detail now returns an empty toolCalls list; toolCallStart, toolCallEnd and the rest of the detail are returned as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
@origami-chen 麻烦审核一下这个 PR:修复删除任务后打开 span 详情会返回 500 的问题。原话已被删除时,详情照常返回,工具调用为空列表。细节见 PR 描述。谢谢! |
This branch has not been deployed
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.
任务与行为
raw_turns按外键级联,把这个任务的原话一起删掉。但从这一轮切出来的 span 不在 episode 的 L1 列表里,删任务后仍是激活状态,列表里还能看到。memmy-memory get取它,走的是同一个读取接口,同样返回 500。toolCalls返回空列表,toolCallStart、toolCallEnd和其他字段照常返回。详情能打开,删除按钮也能正常显示。修改范围
Memory/src/service/read-model/episode.ts:取原话时去掉非空断言,原话不存在时toolCalls为空列表,改了 2 行。Memory/tests/service/evolution/span-big-turn.test.ts:新增用例。先生成 span,再通过面板删除所在的任务,确认原话已被删除、span 仍在列表里,然后读取详情,断言不报错、toolCalls为空、其他字段照常。验证证据
fix-span-detail-missing-raw-turn,起点d101fd58(即当前memmy_1031/v1.2.0),提交bcf6af86。提 PR 前已 fetch 并 merge 集成分支(Already up to date)。TypeError: Cannot read properties of undefined (reading 'toolCalls')(episode.ts:244);修改后通过。npm run memory:test:106 个测试文件中 104 个通过、1 个跳过(仅在 Windows 上运行的安装器集成测试)、1 个失败;921 个用例中 919 个通过。失败的是l3-world-model.test.ts的 "keeps source IDs in evidence order and caps them at the latest 256…",原因是超时:上限 20 秒,这台机器跑全量时它要 35 秒左右。这个失败和本 PR 无关:d101fd58上,同样条件下跑全量,也是这一条超时(35.4 秒,920 个用例中 918 个通过)。npm run lint、npm run typecheck通过。git diff --check upstream/memmy_1031/v1.2.0...HEAD无输出;交付差异只含上面两个文件。upstream/v1.1.9做过试合并(git merge-tree),没有冲突。已知限制
🤖 Generated with Claude Code