Skip to content

fix: falsy optional reference handling - #4305

Merged
seratch merged 1 commit into
mainfrom
fix/falsy-optional-references
Aug 8, 2026
Merged

fix: falsy optional reference handling#4305
seratch merged 1 commit into
mainfrom
fix/falsy-optional-references

Conversation

@seratch

@seratch seratch commented Aug 8, 2026

Copy link
Copy Markdown
Member

This pull request fixes the remaining cases around #4299 where non-None Optional reference objects were incorrectly treated as absent because they were falsy.

It updates runtime, resume, tracing, provider, Realtime, sandbox, and voice paths to use explicit None checks while preserving intentional empty scalar and container semantics. It also adds a deliberately narrow AST checker to make lint that detects direct Optional-reference truthiness mistakes before merge and conservatively excludes complex lexical forms.

Co-authored-by: Henry Su <henrysu4707@gmail.com>
@seratch seratch added this to the 0.20.x milestone Aug 8, 2026
@seratch seratch changed the title Fix falsy optional reference handling fix: falsy optional reference handling Aug 8, 2026
@seratch
seratch merged commit 98c3637 into main Aug 8, 2026
10 checks passed
@seratch
seratch deleted the fix/falsy-optional-references branch August 8, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant