[Feat]: Add a task-state-invariants agent skill for sibling-surface propagation
维护者通常 2 天内回复
评估
这个 Issue 还没有评估数据。
描述
Is your feature request related to a problem? Please describe
The agent rule layer in this repo is good at three things: code style
(docs/ai/coding_conventions.md), the pre-done gate
(docs/ai/mandatory_checks.md), and post-mortem capture
(.agents/skills/mistake-reflection). What none of them state is which
surfaces a task-state write has to reach. That gap keeps producing the same
class of defect: a value that is correct on one surface and missing or stale
on another.
Recent instances, all in this class:
- #1276 (closed):
status.timestampwas mapped by
src/a2a/compat/v0_3/conversions.py(JSON-RPC/REST compat) but not by
src/a2a/compat/v0_3/proto_utils.py(gRPC compat) — the same field appeared
or disappeared depending on transport. - #1331 (open): a framework-written
FAILEDstatus carried no
status.timestamp, andsrc/a2a/server/tasks/database_task_store.py:152-157
deriveslast_updatedfrom it, so the row persistedNULLand dropped out
ofListTasksordering. - #1188 (open) / #1409 (open): the handler resumes or returns from a snapshot
that disagrees with what later reaches the store and the stream. - #1206 (closed as stale) → #1411 (open):
contextIdinference makes events
disagree with the storedTask. - Review findings on #1346: stamping the local copy after
task.status.CopyFrom(event.status)leaves the published event unstamped
(src/a2a/server/tasks/task_manager.py:285), and theCANCELEDpaths at
src/a2a/server/agent_execution/active_task.py:971-973keep the previous
state's timestamp. These were caught by review, not by any documented rule.
The same confusion shows up in the discussion forum, where it has no issue
tracker to land in: #248 ("Should Message events terminate…", 6 comments),
#435, #40 ("What's the purpose of EventQueue?"), and the multi-replica thread
#1224 / #336.
Describe the solution you'd like
A new skill, .agents/skills/task-state-invariants/SKILL.md, in the same
shape as mistake-reflection (trigger list → procedure → anti-patterns),
covering:
- the invariant set, each claim anchored to current
main(terminal states
need a timestamp; stamp the event beforeCopyFrom;CopyFrominherits
the old timestamp; push delivery is best-effort; zero events means a hung
caller; store and stream must agree; v0.3 compat has two independent
mappers; continuation identity is inferred per spec §3.4.3); - a sibling-surface checklist to run before declaring such a change done
(persisted store, streaming subscribers, push notification, cluster
task_eventstable, both compat mappers); - a test map naming the existing file per surface, so coverage lands where
the surface is; - the evidence a PR in this area should carry, consistent with
docs/ai/evidence_rules.md.
Plus a one-line pointer in AGENTS.md "Mandatory workflow". That pointer
matters: AGENTS.md is the only file in the repo that routes to
.agents/skills/, so a skill without a route is never loaded.
Describe alternatives you considered
- A
docs/ai/rules page. Rejected as the primary form:docs/ai/*is
read at task start, while this knowledge is only useful at the moment you
touch a status write — which is howmistake-reflectionis structured.
Happy to have both if maintainers prefer the rule text to live indocs/ai
with the skill as a thin pointer. - Encoding it only in tests. Partially useful, but tests cannot tell a
change agent which sibling surface they forgot. - Fixing each bug as it arrives. Six-plus in about six weeks suggests the
per-bug loop is not converging.
Additional context
Scouting the rule layer, .agents/skills/ has exactly one skill today and it
was introduced internally by #1059 — I found no precedent for an externally
contributed skill, so raising this first rather than assuming. A draft
implementation (skill + the one-line router pointer, markdown-only, no
runtime code) is ready and filed as a PR linked to this issue. Easy to trim:
drop the AGENTS.md line, or scope the skill to the compat-mapper and
timestamp rules only.
Code of Conduct
- I agree to follow this project's Code of Conduct
- 主要语言
- Python
- 星标
- 2.2k
- 派生
- 528
- 平均合并
- 3 天 17 小时
- 30 天内合并 PR
- 43
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
a2aproject/a2a-python 的其他 Issue
-
[Bug]: `A2A-Version` validation ignores minor versions and the query parameter可能已有人在做 @rohityan 于 69 天前认领。 未关闭component: server status:awaiting response
难度 2/5 1-3 小时 新手友好度 75/100
a2aproject/a2a-python#1204 · 3 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
-
[Bug]: REST task/request id sanitization可能已有人在做 @Linux2010 于 128 天前认领。 未关闭maintainers-only
难度 2/5 1-3 小时 新手友好度 65/100
a2aproject/a2a-python#805 · 1 条评论 ·
维护者通常 2 天内回复
-
[Bug]: CancelTaskRequest.metadata never reaches AgentExecutor.cancel可能已有人在做 @muscariello 今天认领。 未关闭maintainers-only
a2aproject/a2a-python#1415 · 已指派 1 人 ·
维护者通常 2 天内回复
-
[Bug]: taskId-only continuation still fails required contextId inference in SDK 1.3.0 (follow-up to #1206)可能已有人在做 @rohityan 于 1 天前认领。 未关闭component: server status:awaiting response
a2aproject/a2a-python#1411 · 1 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
-
[Feat]: Add a PermissionDenied server error with HTTP 403 and gRPC PERMISSION_DENIED mappings可能已有人在做 @Iwaniukooo11 今天认领。 未关闭component: core status: needs review
a2aproject/a2a-python#1410 · 2 条评论 · 已指派 2 人 ·
维护者通常 2 天内回复
查看 a2aproject/a2a-python 的全部 Issue
相似的 Issue
-
ci-rerun: collect.py fails a whole pr-babysit cycle on one transient GitHub 5xx and never retries未关闭follow-up
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
-
Built-in QUBO fallback applies bitwise xor to floating binary states可能已有人在做 @iloveeyjafjalla 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
qboson/kaiwu-pytorch-plugin#1702 ·
维护者通常 3 天内回复
-
bug v2
难度 2/5 1-3 小时 新手友好度 76/100
modelcontextprotocol/python-sdk#3811 ·
维护者通常 1 天内回复
-
cost:cheap practicality:seen-in-the-wild severity:medium
难度 2/5 1-3 小时 新手友好度 72/100
fairagro/m4.2_advanced_middleware_api#620 ·
维护者通常 1 天内回复