Skip to content

Release terminal trajectory capture owners - #1052

Merged
bradhilton merged 2 commits into
mainfrom
hayek/capture-terminal-release-20260930
Sep 30, 2026
Merged

bradhilton merged 2 commits into
mainfrom
hayek/capture-terminal-release-20260930

Conversation

@bradhilton

Copy link
Copy Markdown
Collaborator

Completed HTTP responses can keep an entire captured trajectory alive. HTTPX's response/stream cycle retains ART's capture state, which still owns the trajectory, request and copied response body after capture finishes.

Release those private owners on finish or discard, including failure paths. The recorded exchange keeps its request and response; repeated finish/add calls stay inert. This applies to all adapters using CaptureState and changes no GC settings.

Nine focused lifecycle tests pass, including the actual OpenAI/HTTPX path, streamed delivery, cancellation and error identity. All nine fail on the parent. Existing capture coverage: 78 passed; seven optional Brotli cases skipped locally. This proves the retention mechanism, not a measured reduction in live GC pauses.

@bradhilton
bradhilton marked this pull request as ready for review September 30, 2026 01:27
@bradhilton
bradhilton merged commit c1b99e3 into main Sep 30, 2026
8 checks passed
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