[BUG] ListTasks is not sorted by last update time, newest first
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 go/core/internal/database/agent_tasks.go 中 L45-52 附近开始,ListTasks 在这里构建页游标和 ORDER BY t.position, t.id 查询。阅读游标元组如何构造并用于分页,然后将排序和游标都改为按状态时间戳降序的 (t.status_timestamp, t.id)。完成意味着最近更新的任务最先返回,并且分页在各页之间保持一致;如果存在相关数据库测试,请运行它们。
由索引模型根据 Issue 内容生成。
描述
📋 Prerequisites
- I have searched the existing issues to avoid creating a duplicate
- By submitting this issue, you agree to follow our Code of Conduct
- I am using the latest version of the software (checked against
mainat e8cd153) - I have tried to clear cache/cookies or used incognito mode (if ui-related)
- I can consistently reproduce this issue
🎯 Affected Service(s)
Controller (A2A gateway)
🚦 Impact/Severity
Minor
🐛 Bug Description
ListTasks orders tasks by history position (agent_tasks.go L52, ORDER BY t.position, t.id). A2A 1.0.1 §3.1.4 says tasks MUST be sorted by last update time in descending order.
🔄 Steps To Reproduce
- Create two tasks in one context, then update the first one again.
- Call
ListTasksfor that context.
🤔 Expected Behavior
The most recently updated task comes first.
📱 Actual Behavior
The oldest task comes first.
🔍 Additional Context
The page cursor is also (t.position, t.id) (L45-48), so the cursor has to move to (t.status_timestamp, t.id) together with an ORDER BY t.status_timestamp DESC, t.id; changing only the ORDER BY breaks pagination. §3.1.4 names the status timestamp as the sort key.
- 主要语言
- Go
- 星标
- 4.5k
- 派生
- 937
- 平均合并
- 1 天 10 小时
- 30 天内合并 PR
- 150
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
kagent-dev/kagent 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
kagent-dev/kagent#3792 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
kagent-dev/kagent#3790 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
kagent-dev/kagent#3787 ·
维护者通常 1 天内回复
-
[BUG] Python memory summarization fails for Gemini models: the request has no model name可能已有人在做 @BahaaMattar 于 6 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
kagent-dev/kagent#3710 ·
维护者通常 1 天内回复
-
skills-init: commit-SHA skill refs never start (git checkout -- <sha> reads the SHA as a pathspec)可能已有人在做 @talcoh2x 于 14 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 84/100
kagent-dev/kagent#3571 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 kagent-dev/kagent 的全部 Issue
相似的 Issue
-
ai-driven-qa bug claude Minor
难度 2/5 1-3 小时 新手友好度 68/100
linagora/cozy-stack#5374 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
google/certificate-transparency-go#1859 ·
维护者通常 1 天内回复
-
[Bug]: gate 缺失未关闭bug
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 64/100
newrelic/newrelic-cli#1958 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
pingcap/monitoring#1284 ·
维护者通常 1 天内回复