Skip to content

Commit 40b2de8

Browse files
committed
docs(agents): refresh task-state-invariant anchors after rebase
Line anchors for the cancel-path CopyFrom, the inline push send, the get_task wait, and the copy-on-yield caveat had drifted after the 13-commit rebase onto main (which also merged a2aproject#1345/a2aproject#1346 — the very fixes several anchors point at). All eight anchors re-verified against current code; claim 5 notes the caller-side guard merged via a2aproject#1345. Signed-off-by: andy <linux2011@qq.com>
1 parent 40df75d commit 40b2de8

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

  • .agents/skills/task-state-invariants

‎.agents/skills/task-state-invariants/SKILL.md‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,28 +49,29 @@ Each claim is anchored to current `main`. Re-read the file before quoting.
4949
the store is fixed and the other three surfaces stay broken.
5050
3. **`CopyFrom` inherits the previous timestamp.** A copy-then-set-state
5151
transition (for example the cancel path,
52-
`src/a2a/server/agent_execution/active_task.py:971-973`) reuses whatever
52+
`src/a2a/server/agent_execution/active_task.py:979-982`) reuses whatever
5353
timestamp the prior state had, so the terminal write looks like a
5454
`WORKING` update. Set `status.timestamp` explicitly on every transition
5555
you introduce.
5656
4. **Push delivery is best-effort and never task-affecting.**
5757
`_dispatch_notification` already contains delivery failures and returns
5858
a bool; `send_notification` is awaited inline from the consumer at
59-
`src/a2a/server/agent_execution/active_task.py:409`. Anything that can
59+
`src/a2a/server/agent_execution/active_task.py:410`. Anything that can
6060
raise there (config-store reads, URL validators, custom senders) must not
6161
escape into the failure path, or a webhook hiccup rewrites a completed
6262
task to `FAILED`.
6363
5. **Every request must produce at least one event.** With zero events,
6464
`on_message_send` falls through to `active_task.get_task()`
6565
(`src/a2a/server/request_handlers/default_request_handler_v2.py:518-520`),
6666
which awaits `_task_created` with no timeout
67-
(`src/a2a/server/agent_execution/active_task.py:1115-1117`) and hangs the
68-
request, producer, and consumer forever. Guard before awaiting, or the
69-
fallback must be bounded.
67+
(`src/a2a/server/agent_execution/active_task.py:1130`) and hangs the
68+
request, producer, and consumer forever. Guard before awaiting (the
69+
`on_message_send` caller has done so since #1345), or the fallback
70+
must be bounded.
7071
6. **Store and stream must agree.** A blocking call may return a shared
7172
snapshot while later events land on the store — the copy-on-yield caveat
7273
is documented in-code at
73-
`src/a2a/server/agent_execution/active_task.py:965-970` (tracked in
74+
`src/a2a/server/agent_execution/active_task.py:974-981` (tracked in
7475
#1175 / #1191). After any change here, assert `GetTask` equals what the
7576
caller received.
7677
7. **v0.3 compat has two independent mappers.** `compat/v0_3/proto_utils.py`

0 commit comments

Comments
 (0)