Skip to content

fix!: TaskState.UNRECOGNIZED is called TASK_STATE_UNSPECIFIED in spec#974

Open
kabir wants to merge 3 commits into
a2aproject:mainfrom
kabir:task-state
Open

fix!: TaskState.UNRECOGNIZED is called TASK_STATE_UNSPECIFIED in spec#974
kabir wants to merge 3 commits into
a2aproject:mainfrom
kabir:task-state

Conversation

@kabir

@kabir kabir commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

BREAKING CHANGE: This is an actual bug in our implementation so it was seen as suitable for a micro release. Users compiling against UNRECOGNIZED will need to replace this with TASK_STATE_UNSPECIFIED.

Fixes #958 🦕

…ED in spec

BREAKING CHANGE: This is an actual bug in our implementation so it was seen
as suitable for a micro release. Users compiling against UNRECOGNIZED will
need to replace this with TASK_STATE_UNSPECIFIED.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request renames the UNRECOGNIZED enum constant to TASK_STATE_UNSPECIFIED in TaskState and updates its usages across various mappers and managers. The review feedback highlights an incorrect mapping in TaskStateMapper.toProto where TASK_STATE_UNSPECIFIED is mapped to the synthetic protobuf value UNRECOGNIZED instead of TASK_STATE_UNSPECIFIED. Additionally, the feedback requests updating outdated Javadoc references to UNRECOGNIZED in both TaskState and TaskStateMapper_v0_3.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread spec-grpc/src/main/java/org/a2aproject/sdk/grpc/mapper/TaskStateMapper.java Outdated
Comment thread spec/src/main/java/org/a2aproject/sdk/spec/TaskState.java Outdated
@kabir

kabir commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request renames the UNRECOGNIZED task state to TASK_STATE_UNSPECIFIED across the SDK client, mappers, and specification to align with the standard naming convention. The review feedback suggests updating outdated Javadoc comments in TaskState.java and TaskStateMapper.java to ensure consistency with the new enum constant names and actual implementation.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread spec/src/main/java/org/a2aproject/sdk/spec/TaskState.java Outdated
@kabir

kabir commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request replaces the UNRECOGNIZED task state enum value with TASK_STATE_UNSPECIFIED across several modules, including client task management, gRPC mappers, and compatibility mappers. This change ensures consistent naming conventions for unspecified or unknown task states. There are no review comments, and I have no additional feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@wushunhao wushunhao left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good, but I found another inconsistency.

According to 4.1.3. TaskState, TASK_STATE_UNSPECIFIED is not described as a terminal state.

But I guess it also makes sense to terminate the task when it's in this state. What do you think?

@kabir

kabir commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator Author

@wushunhao I'll try to make it non-terminal and see what happens on CI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Update TaskState enum UNRECOGNIZED to TASK_STATE_UNSPECIFIED

2 participants