Repository navigation
Conversation
Most task-lifecycle defects in this SDK are not wrong values: they are a correct value that reached one surface and not the others (persisted store, streaming subscribers, push notifications, the cluster task_events table, and the two separate v0.3 compat mappers). The existing rule layer routes mistakes to mistake-reflection and code style to docs/ai, but nothing tells a change agent which surfaces a status write must reach, so the same class keeps recurring: a2aproject#1276 (status.timestamp mapped for JSON-RPC/REST compat but not gRPC), a2aproject#1188 (handler resumes from a stale snapshot), a2aproject#1206/a2aproject#1411 (contextId inference disagrees between events and the stored task), and the review findings on a2aproject#1346 (stamping the copy instead of the event, and missing the CANCELED paths). Adds .agents/skills/task-state-invariants/SKILL.md with the invariant set (each claim anchored to current main), the sibling-surface checklist, the matching test files per surface, and the evidence expected in a PR, plus a one-line router pointer in AGENTS.md so agents actually load it. Signed-off-by: andy <linux2011@qq.com>
1 task done
a2aproject#1403 is an error-handling divergence on the v0.3 REST surface rather than a field-mapping one, so describe it as the second shape the same gRPC-vs- JSON-RPC/REST split produces instead of implying it dropped a field. Signed-off-by: andy <linux2011@qq.com>
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.
Description
Adds a second agent skill to the repo's rule layer, plus the router line that makes it loadable. Proposed and discussed in #1413.
AGENTS.mdroutes code style todocs/ai/coding_conventions.md, the pre-done gate todocs/ai/mandatory_checks.md, and mistakes tomistake-reflection— but nothing states which surfaces a task-state write must reach. That missing link keeps producing the same defect class: a value that is correct on one surface and missing or stale on another.This PR adds
.agents/skills/task-state-invariants/SKILL.md, in the same shape asmistake-reflection(trigger list → procedure → anti-patterns):main: terminal states requirestatus.timestamp(utils/constants.py:35→database_task_store.py:152-157); stamp the event beforeCopyFrom, not the copy after (task_manager.py:285);CopyFrominherits the previous timestamp, so explicit transitions such as the cancel path (active_task.py:971-973) must restamp; push delivery is best-effort (active_task.py:409); zero events means an unbounded wait (default_request_handler_v2.py:518-520→active_task.py:1115-1117); store and stream must agree; v0.3 compat has two independent mappers (compat/v0_3/proto_utils.pyvsconversions.py); continuation identity is inferred per spec §3.4.3;docs/ai/evidence_rules.md.Also adds one numbered item to
AGENTS.md→ "Mandatory workflow". Without it the skill is unreachable: the rule layer scan showsAGENTS.mdis the only file in the repo that links into.agents/skills/.Scope is documentation only — no runtime code, no public API, no behavior change. If maintainers would rather the rule text live in
docs/ai/with a thin skill pointer, or want theAGENTS.mdline dropped, say so and I will reshape it.CONTRIBUTINGGuide.bash scripts/format.shfrom the repository root to format)Fixes #1413 🦕
Validation
mistake-reflection..agents/skills/contained one skill (mistake-reflection) andAGENTS.mdhad one route into it; nothing documented sibling-surface propagation. AFTER: two skills, two routes, no code change (git diff --name-onlylists onlyAGENTS.mdand the newSKILL.md)../scripts/lint.sh: SUCCESS — "All linting and formatting tasks complete", ty reports only the 3 pre-existingunused-ignore-commentdiagnostics that are present on cleanmainas well.uv run pytest: 2520 passed, 207 skipped, 4 xfailed, 1 xpassed. The 4tests/integration/cross_versionerrors are environmental, not caused here: stashing this branch's changes and re-running on cleanmainreproduces the identical 4 errors (AssertionError: Server 0.3 HTTP failed to start— the sandbox cannot bind the subprocess server).file:linein the skill was re-read from currentmainat this head rather than copied from older notes; the anchors that changed since I first drafted them (a duplicatedTERMINAL_TASK_STATESthat has since been centralized inutils/constants.py:35) were corrected before committing.Prepared with AI assistance (WorkBuddy); reviewed and verified by Linux2010