Skip to content

Keep a receipt test's late recovery out of the next test's telemetry - #2376

Merged
santoshkumarradha merged 3 commits into
app/v3from
c27/overflow-third-row
Nov 5, 2026
Merged

santoshkumarradha merged 3 commits into
app/v3from
c27/overflow-third-row

Conversation

@santoshkumarradha

Copy link
Copy Markdown
Member

Summary

TestOverflowUsageNamesTheActualAttemptRoute sometimes saw three telemetry rows instead of two, but only when the whole internal/provider package ran. It never failed alone.

The extra row came from the test before it, TestRecoveredReceiptAddsOnlyPreviouslyMissingTokens. That test's second settle had usage but no billing sink, so the client fetched the generation's receipt in the background. The test read its spool and ended before the receipt arrived, and the row then landed in the next test's spool. The two rows from the overflow call itself were never doubled.

The earlier test now arms the billing sink its own comment assumes, and checks that the second settle queues no receipt. The overflow test is unchanged.

This changes no product code. Without a billing sink, the client still records that call once, through its receipt.

Validation

Whole internal/provider package, four processes at once:

Version Runs Failures
Before 56 2
After 24 0

The rows caught in both failures matched the earlier test's generation-two. The new check fails before the fix, with 2 receipts queued.

🤖 Generated with Claude Code

TestRecoveredReceiptAddsOnlyPreviouslyMissingTokens settled its second
generation with no billing sink, so the client fetched its receipt in the
background. The test ended first, and that one late row landed in the next
test's spool, which made TestOverflowUsageNamesTheActualAttemptRoute see
three rows.

Arm the billing sink the comment assumes, and check the second settle
queues no receipt.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@CLAassistant

CLAassistant commented Nov 5, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@santoshkumarradha
santoshkumarradha merged commit ab96a99 into app/v3 Nov 5, 2026
@santoshkumarradha
santoshkumarradha deleted the c27/overflow-third-row branch November 5, 2026 06:47
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.

2 participants