You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix buffer timespan requirement updates and overflow handling
This fixes two related issues with buffer timespan management:
1. Simplify _update_buffer_requirements to work with the updated
get_required_timespan() contract (now returns float, not float | None).
This prevents stale timespan requirements from persisting when all
extractors with timespan requirements are removed.
2. Fix TemporalBuffer overflow when timespan=0.0 by properly dropping
all existing data to make room for new values. Previously, the buffer
would fail with "exceeds buffer capacity even after trimming" because
trimming did nothing when timespan <= 0.
Added test_timespan_zero_trims_all_old_data_on_overflow to verify the
fix using TDD approach.
Original prompt: Consider potential bug in _update_buffer_requirements: If extractor was removed and only LatestValueExtractor remains then timespans will be empty so an old requirement for a timespan will not be cleared? Can you write a test trying to reproduce this?
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
0 commit comments