Skip to content

Fix 9 failing live integration tests (memory leaks + missing status check)#122

Open
tomjnsn wants to merge 1 commit intomainfrom
fix/121-live-test-memory-leaks
Open

Fix 9 failing live integration tests (memory leaks + missing status check)#122
tomjnsn wants to merge 1 commit intomainfrom
fix/121-live-test-memory-leaks

Conversation

@tomjnsn
Copy link
Copy Markdown
Owner

@tomjnsn tomjnsn commented Feb 20, 2026

Summary

  • Add missing defer http_client.deinit() and defer provider.deinit() to all 5 streamText live tests (OpenAI, Azure, Anthropic, Google, xAI)
  • Switch Anthropic streaming from result_allocator to stream_allocator for ephemeral text/reasoning block IDs (5 allocPrint calls)
  • Switch Google streaming from result_allocator to request_allocator for text copies and function call args/names (5 allocations)
  • Pass arena_allocator instead of base allocator to doGenerate in generateObject, dupe raw_text/id/model_id to base allocator with proper cleanup in deinit
  • Pass arena_allocator instead of base allocator to doStream in streamObject
  • Add HTTP status code capture and validation in Google embedding model before parsing response body

Test plan

  • zig build test — all 124 unit test groups pass
  • ./scripts/test-live.sh — verify 9 previously-failing tests now pass

Fixes #121

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
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.

Fix 9 failing live integration tests (memory leaks + missing status check)

1 participant