Fix 9 failing live integration tests (memory leaks + missing status check)#122
Open
Fix 9 failing live integration tests (memory leaks + missing status check)#122
Conversation
Fix 9 failing live tests caused by allocator misuse and missing HTTP status check. Add missing defer deinit in streamText tests, use ephemeral allocators for streaming IDs/copies in Anthropic and Google providers, pass arena_allocator to doGenerate/doStream in generateObject and streamObject, and add HTTP status code validation in Google embed. Fixes #121 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> 🔮 View transcript: https://agentlogs.chsprc.com/s/ytt3vvqtklprurg3atm58nfb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
defer http_client.deinit()anddefer provider.deinit()to all 5 streamText live tests (OpenAI, Azure, Anthropic, Google, xAI)result_allocatortostream_allocatorfor ephemeral text/reasoning block IDs (5allocPrintcalls)result_allocatortorequest_allocatorfor text copies and function call args/names (5 allocations)arena_allocatorinstead of baseallocatortodoGenerateingenerateObject, duperaw_text/id/model_idto base allocator with proper cleanup indeinitarena_allocatorinstead of baseallocatortodoStreaminstreamObjectTest plan
zig build test— all 124 unit test groups pass./scripts/test-live.sh— verify 9 previously-failing tests now passFixes #121