Skip to content

test(node): Fix flaky Anthropic integration test#21034

Merged
andreiborza merged 1 commit into
developfrom
ab/fix-flaky-anthropic-pii-test
May 20, 2026
Merged

test(node): Fix flaky Anthropic integration test#21034
andreiborza merged 1 commit into
developfrom
ab/fix-flaky-anthropic-pii-test

Conversation

@andreiborza
Copy link
Copy Markdown
Member

This particular test was looking up the completion span by matching on GEN_AI_INPUT_MESSAGES_ATTRIBUTE which is not unique. Four spans have that same input message, with varying span ordering, the find lookup could match on the wrong span which lacked max_tokens.

The fix is to find th espan by GEN_AI_RESPONSE_ID_ATTRIBUTE which identifies the span better.

Closes: #21029

This particular test was looking up the completion span by matching on
`GEN_AI_INPUT_MESSAGES_ATTRIBUTE` which is not unique. Four spans have that same
input message, with varying span ordering, the find lookup could match on the
wrong span which lacked `max_tokens`.

The fix is to find th espan by `GEN_AI_RESPONSE_ID_ATTRIBUTE` which identifies
the span better.

Closes: #21029
@andreiborza andreiborza requested a review from a team as a code owner May 20, 2026 07:19
@andreiborza andreiborza requested a review from nicohrubec May 20, 2026 07:19
@mydea mydea changed the title chore: Fix flaky Anthropic integration test test: Fix flaky Anthropic integration test May 20, 2026
@mydea mydea changed the title test: Fix flaky Anthropic integration test test(ndoe): Fix flaky Anthropic integration test May 20, 2026
@mydea mydea changed the title test(ndoe): Fix flaky Anthropic integration test test(node): Fix flaky Anthropic integration test May 20, 2026
@andreiborza andreiborza enabled auto-merge (squash) May 20, 2026 07:24
@andreiborza andreiborza merged commit a0fb758 into develop May 20, 2026
49 checks passed
@andreiborza andreiborza deleted the ab/fix-flaky-anthropic-pii-test branch May 20, 2026 07: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

3 participants