J. Nick Koston
2a451cb870
[core] Strengthen scheduler-pool integration test with lower-bound check
...
Adds an assertion that the observed peak pool size exceeds the old
MAX_POOL_SIZE=5 cap. Without this, a silent regression that re-introduced a
small cap could pass the existing pool_full_count == 0 invariant. Phase 5 + 6
of the fixture schedule 8 + 10 same-component timeouts, so the peak should
comfortably exceed 5.
Address Copilot review feedback on PR.
2026-04-30 10:57:11 -05:00
J. Nick Koston
f9b87d0ede
[core] Replace scheduler pool vector with unbounded intrusive freelist
...
The fixed MAX_POOL_SIZE=5 cap was the source of the heap churn the pool was
meant to prevent: any device with more than 5 concurrent timers (e.g. a board
with 30+ LD2450 sensors) hit a steady-state oscillation of recycle->delete and
acquire->new on every loop iteration.
Replace std::vector<SchedulerItem*> with a singly-linked freelist threaded
through SchedulerItem::next_free, which shares storage with `component` via an
anonymous union (zero per-item overhead -- the component pointer is dead while
pooled). Drop the cap entirely: the freelist quiesces at the application's
natural concurrent-timer high-water mark, which is the working set the device
already needs while those timers are active.
No std::vector means no growth-doubling slack and no realloc copies during
warm-up. Caller of get_item_from_pool_locked_() must overwrite item->component
before unlocking (already true at the sole call site); nullptr remains a valid
live `component` value for SELF_POINTER items, so we cannot pre-clear it.
2026-04-30 10:42:46 -05:00
J. Nick Koston
c41f38e16d
[scheduler] Add self-keyed timer API for callers without a Component ( #16127 )
2026-04-29 13:24:37 -05:00
J. Nick Koston
e5b1991cf7
[fan] Add tests for fan.turn_on action field combinations ( #16125 )
2026-04-29 12:46:06 -05:00
J. Nick Koston
7fba57ce51
[valve] Add tests for valve.control action field combinations ( #16126 )
2026-04-29 12:45:30 -05:00
J. Nick Koston
5a33c50015
[light] Use constexpr template for DimRelativeAction transition_length ( #16038 )
2026-04-29 14:26:38 +12:00
J. Nick Koston
0d150dc57e
[light] Use constexpr template for ToggleAction transition_length ( #16037 )
2026-04-29 14:25:18 +12:00
Bonne Eggleston and J. Nick Koston
52e8c50f45
[modbus] Split modbus_server from modbus_controller ( #15509 )
...
Co-authored-by: J. Nick Koston <nick+github@koston.org >
2026-04-28 10:21:25 -05:00
J. Nick Koston
e4f413adad
[core] decouple main loop cadence from scheduler wake timing ( #15792 )
2026-04-21 14:48:21 +02:00
J. Nick Koston
38d894dfe7
[ld2412] Fix flaky integration test race condition ( #15833 )
2026-04-18 08:17:22 -05:00
J. Nick Koston
523c6f2376
[core] coerce set_interval(0) / update_interval: 0ms to 1ms ( #15799 )
2026-04-17 02:45:50 -10:00
J. Nick Koston
b232fc91ab
[runtime_stats] Track main loop active time and report overhead ( #15743 )
2026-04-16 14:07:26 -10:00
J. Nick Koston
e48c7165c5
[light] Avoid addressable transition stall at low gamma-corrected values ( #15726 )
2026-04-15 07:45:42 +12:00
J. Nick Koston
da9fbb8044
[core] Fix app_state_ status bits clobbered for non-looping components ( #15658 )
2026-04-14 07:50:11 -10:00
J. Nick Koston
8e02d0a20e
[fan] Store preset mode vector on Fan entity to eliminate heap allocation ( #15209 )
2026-04-09 10:25:37 +12:00
J. Nick Koston
faa05031a7
[climate] Store custom mode vectors on Climate entity to eliminate heap allocation ( #15206 )
2026-04-09 10:25:29 +12:00
J. Nick Koston
5d31f4aeba
[light] Use function-pointer fields in LightControlAction ( #15132 )
2026-04-07 12:00:17 -10:00
J. Nick Koston
674d030cbb
[core] Reschedule fired intervals directly into heap ( #15516 )
2026-04-07 07:36:55 -10:00
Bonne Eggleston and J. Nick Koston
c6bb1fe141
[modbus] Add integration tests for server and server via controller ( #14845 )
...
Co-authored-by: J. Nick Koston <nick@home-assistant.io >
2026-04-03 20:24:02 +00:00
J. Nick Koston
9b97e95cf3
[binary_sensor] Add on_multi_click integration test ( #15329 )
2026-03-31 07:42:12 -10:00
J. Nick Koston
584807b039
[ld2410] Fix flaky integration test race condition ( #15299 )
2026-03-29 11:58:03 -10:00
J. Nick Koston
f5cd1e5e76
[ld2450] Fix flaky integration test race condition ( #15226 )
2026-03-27 08:23:26 -10:00
J. Nick Koston
9fb5b6aa15
[light] Replace initial_state storage with flash-resident callback ( #15133 )
2026-03-24 14:03:18 -10:00
J. Nick Koston
5560c9eef7
[test] Fix flakey ld2412 integration test race condition ( #15100 )
2026-03-22 21:10:51 -10:00
Keith Burzinski and Claude Sonnet 4.6
225330413a
[uart] Rename FlushResult to UARTFlushResult with UART_FLUSH_RESULT_ prefix ( #15101 )
...
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-03-23 01:55:14 -05:00
J. Nick Koston
4d09eb2cec
[tests] Fix flaky ld24xx integration tests by disabling API batching ( #15050 )
2026-03-22 12:29:28 -10:00
J. Nick Koston and Copilot
5e68282519
[light] Fix constant_brightness broken by gamma LUT refactor ( #15048 )
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2026-03-23 09:14:52 +13:00
Bonne Eggleston and J. Nick Koston
92d5e7b18c
[tests] Fix integration helper to match entities exactly ( #14837 )
...
Co-authored-by: J. Nick Koston <nick@home-assistant.io >
2026-03-15 13:02:23 -10:00
J. Nick Koston
bd844fcd0a
[template] Fix misleading 'Text value too long to save' warning ( #14753 )
2026-03-13 07:37:44 -10:00
Kjell Braden
326769e43c
[runtime_image] fix BMP parsing ( #14762 )
2026-03-13 09:18:42 -04:00
J. Nick Koston
89719cf4b2
[water_heater] Set OPERATION_MODE feature flag when modes are configured ( #14748 )
2026-03-12 14:48:41 -10:00
J. Nick Koston
4d2ef09a29
[log] Detect early log calls before logger init and optimize hot path ( #14538 )
2026-03-10 09:12:10 -10:00
J. Nick Koston
9dd3ec258c
[scheduler] Replace unique_ptr with raw pointers, add leak detection ( #14620 )
2026-03-10 09:11:28 -10:00
c31ac662bd
[multiple] Fix crashes from malformed external input ( #14643 )
...
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
Co-authored-by: J. Nick Koston <nick@home-assistant.io >
2026-03-09 20:39:58 -04:00
J. Nick Koston
aef2d74e41
[ld2450] Add integration tests with mock UART ( #14611 )
2026-03-08 14:32:59 -10:00
J. Nick Koston and Clyde Stubbs
88536ff72b
[modbus] Fix timeout for non-hardware UARTs (e.g., USB UART) ( #14614 )
...
Co-authored-by: Clyde Stubbs <2366188+clydebarrow@users.noreply.github.com >
2026-03-08 14:31:42 -10:00
5e842a8b20
[uart] Return flush result, expose timeout via config ( #14608 )
...
Co-authored-by: J. Nick Koston <nick@koston.org >
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2026-03-08 05:23:13 +00:00
J. Nick Koston
888f3d804b
[ld2420] Add integration tests with mock UART ( #14471 )
2026-03-07 13:22:50 -10:00
b0be02e16d
[modbus] Fix timing bugs and better adhere to spec ( #8032 )
...
Co-authored-by: brambo123 <52667932+brambo123@users.noreply.github.com >
Co-authored-by: Keith Burzinski <kbx81x@gmail.com >
Co-authored-by: J. Nick Koston <nick@koston.org >
Co-authored-by: J. Nick Koston <nick+github@koston.org >
Co-authored-by: J. Nick Koston <nick@home-assistant.io >
2026-03-05 20:54:17 +00:00
J. Nick Koston
5df4fd0a27
[tests] Fix flaky uart_mock integration tests ( #14476 )
2026-03-04 15:51:51 -10:00
J. Nick Koston
b2e8544c58
[ld2412] Add integration tests with mock UART ( #14448 )
2026-03-04 07:18:31 -10:00
Jonathan Swoboda and Claude Opus 4.6
ee78d7a0c0
[tests] Fix integration test race condition in PlatformIO cache init ( #14435 )
...
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-03 17:42:41 -05:00
Clyde Stubbs
cfde0613bb
[const][uart][usb_uart][weikai][core] Move constants to components/const ( #14430 )
2026-03-03 07:53:18 -05:00
J. Nick Koston
2e623fd6c3
[tests] Fix flaky log assertion race in oversized payload tests ( #14414 )
2026-03-02 11:48:50 -10:00
J. Nick Koston
3615a7b90c
[core] Eliminate __udivdi3 in millis() on ESP32 and RP2040 ( #14409 )
2026-03-02 11:42:25 -10:00
Bonne Eggleston and J. Nick Koston
3160457ca6
Create integration tests for modbus ( #14395 )
...
Co-authored-by: J. Nick Koston <nick@home-assistant.io >
2026-03-01 22:51:27 -10:00
J. Nick Koston
80a2acca4f
[ld2410] Add UART mock integration test for LD2410 component ( #14377 )
2026-03-01 18:19:32 -10:00
Jonathan Swoboda and Copilot
0d5b7df77d
[sensor] Fix delta filter percentage mode regression ( #14302 )
...
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-02-25 19:32:02 -05:00
J. Nick Koston
8bb577de64
[api] Split ProtoVarInt::parse into 32-bit and 64-bit phases ( #14039 )
2026-02-25 12:23:13 -06:00
J. Nick Koston
b539a5aa51
[water_heater] Fix device_id missing from state responses ( #14212 )
2026-02-22 23:07:56 +00:00