Skip to content

feat: harden spec immutability#968

Open
Sh1bari wants to merge 1 commit into
a2aproject:mainfrom
Sh1bari:feat/spec-record-immutability
Open

feat: harden spec immutability#968
Sh1bari wants to merge 1 commit into
a2aproject:mainfrom
Sh1bari:feat/spec-record-immutability

Conversation

@Sh1bari

@Sh1bari Sh1bari commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Spec cleanup: immutable records and copy semantics

Build fails after actions/checkout was bumped from v6 to v7 in PR #948:
#948

@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 introduces defensive copying and immutability for collection fields across several record classes and builders in the org.a2aproject.sdk.spec package using List.copyOf and Map.copyOf. The review feedback suggests further refining these changes by replacing @Nullable Boolean with a primitive boolean in MessageSendConfiguration and utilizing explicit canonical constructors in CancelTaskParams to avoid redundant null checks on record accessors when non-null default values are guaranteed.

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/MessageSendConfiguration.java Outdated
Comment thread spec/src/main/java/org/a2aproject/sdk/spec/CancelTaskParams.java Outdated
Comment thread spec/src/main/java/org/a2aproject/sdk/spec/CancelTaskParams.java
@Sh1bari Sh1bari force-pushed the feat/spec-record-immutability branch 4 times, most recently from 1dea97f to be8709f Compare July 4, 2026 03:05
@Sh1bari Sh1bari force-pushed the feat/spec-record-immutability branch from be8709f to 1151c80 Compare July 4, 2026 03:35
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.

1 participant