Skip to content

Add UNSPECIFIED zero value for ActorSnapshotTagScope - #898

Merged
Julian Gutierrez Oschmann (juli4n) merged 1 commit into
agent-substrate:mainfrom
laoj2:fix-unspecified
Aug 13, 2026
Merged

Add UNSPECIFIED zero value for ActorSnapshotTagScope#898
Julian Gutierrez Oschmann (juli4n) merged 1 commit into
agent-substrate:mainfrom
laoj2:fix-unspecified

Conversation

@laoj2

Copy link
Copy Markdown
Collaborator

Fixes #897

  • Tests pass
  • Appropriate changes to documentation are included in the PR

@EItanya

Copy link
Copy Markdown
Collaborator

I don't fully understand why this is necessary? If the default is ATESPACE, why can't that be 0?

@laoj2

Copy link
Copy Markdown
Collaborator Author

I don't fully understand why this is necessary? If the default is ATESPACE, why can't that be 0?

substrate's API style guide (https://github.com/agent-substrate/substrate/blob/main/docs/api-style-guide.md#51-enum-naming) made an explicit decision of requiring _UNSPECIFIED values for the "not set" case so we can avoid issues like this:

  1. We add a new ACTOR_SNAPSHOT_TAG_SCOPE_XXX to the enum
  2. A client gets released before the server.
  3. The stale server receives a request with the new ACTOR_SNAPSHOT_TAG_SCOPE_XXX
  4. The proto field accessor in the server returns the default value: the server silently gets _ATESPACE, potentially making a wrong decision instead of failing

@juli4n
Julian Gutierrez Oschmann (juli4n) merged commit 5fbfd77 into agent-substrate:main Aug 13, 2026
11 checks passed
@laoj2
Luiz Oliveira (laoj2) deleted the fix-unspecified branch August 13, 2026 20:52
Julian Gutierrez Oschmann (juli4n) pushed a commit that referenced this pull request Aug 13, 2026
#914 got merged in
between the time I sent
#898 for review and its
submission.

#898 wasn't rebased, so tests broke.
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.

Add UNSPECIFIED zero value for ActorSnapshotTagScope

3 participants