Skip to content

Conversation

@anthonyting
Copy link
Contributor

Issue #, if available:

Description of changes:

In some cases, if two updates come at the exact same time, the testing library creates a duplicate invocation. This is due to the invocation tracker only registering the invocation AFTER the startInvocation API completes, so it doesn't know there's an active invocation until after the API call completes. If two updates that start an invocation come too quickly, the second one may come before the first one registers the invocation, so it will re-invoke concurrently.

The fix is to register the invocation BEFORE the startInvocation API is called to ensure it happens synchronously.

To help find these bugs, we could also have the testing library to stop allowing the same execution to use different checkpoint tokens and be more properly idempotent. This can come later, as things like this can only really happen if the testing library or language SDK have bugs.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@anthonyting anthonyting marked this pull request as ready for review December 5, 2025 18:36
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