Commit Graph
24494 Commits
Author SHA1 Message Date
J. Nick Koston 395f6d7182 Merge remote-tracking branch 'upstream/dev' into integration 2026-03-11 09:14:31 -10:00
J. Nick Koston 928f6f1866 [ci] Add PR title check for unescaped angle brackets (#14701) 2026-03-12 07:57:43 +13:00
J. Nick Koston 6cc1d191fd Merge remote-tracking branch 'upstream/dev' into integration 2026-03-11 08:46:55 -10:00
Jesse Hills e7c3277eeb Bump version to 2026.4.0-dev 2026-03-12 07:34:53 +13:00
Kevin Ahrendt bef5e4de9c [speaker_source] Add announcement pipeline (#14654) 2026-03-11 08:29:17 -10:00
04bcd9f56b [dashboard] Use sys.executable for dashboard subprocess commands (#14698)
Co-authored-by: Jonathan Swoboda <swoboda1337@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2026-03-11 14:25:36 -04:00
Jonathan SwobodaandClaude Opus 4.6 03c0ce704b Bump pyupgrade to v3.21.2 for Python 3.14 compatibility (#14699)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 08:22:48 -10:00
Kevin Ahrendt b27165a842 [speaker_source] Add shuffle support (#14653) 2026-03-11 08:11:00 -10:00
3d4ebe74ce [sensirion_common] Use SmallBufferWithHeapFallback helper (#14270)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
2026-03-11 08:00:42 -10:00
Kevin Ahrendt 4e16f270a3 [speaker_source] Add playlist management (#14652) 2026-03-11 07:47:58 -10:00
J. Nick Koston 9977dd7295 Merge branch 'fast-nodelay' into integration 2026-03-10 22:40:32 -10:00
J. Nick Koston a9c2be5193 Check socket type before accessing pcb.tcp union member
Move the NETCONN_TCP type check before the pcb.tcp null check
to avoid reading the wrong union member on non-TCP sockets.
2026-03-10 22:39:36 -10:00
J. Nick Koston 17c144bed2 Merge branch 'fast-nodelay' into integration 2026-03-10 22:32:13 -10:00
J. Nick Koston ef9f34b9ab Include lwip_fast_select.h for esphome_lwip_set_nodelay declaration
The forward declaration of struct lwip_sock alone is not enough -
the fast path in setsockopt() needs the function declaration too.
2026-03-10 22:31:48 -10:00
J. Nick Koston f9fd5fa0ad Include lwip_fast_select.h for esphome_lwip_set_nodelay declaration
The forward declaration of struct lwip_sock alone is not enough -
the fast path in setsockopt() needs the function declaration too.
2026-03-10 22:31:43 -10:00
J. Nick Koston 0df4fda9e5 Merge branch 'fast-nodelay' into integration 2026-03-10 22:29:42 -10:00
J. Nick Koston 426251f705 Address review: add TCP type check and null optval guard
- Check NETCONNTYPE_GROUP is NETCONN_TCP before accessing tcp_pcb
- Add optval != nullptr guard before dereferencing in fast path
2026-03-10 22:28:08 -10:00
J. Nick Koston 0e95504b48 Address review: add TCP type check and null optval guard
- Check NETCONNTYPE_GROUP is NETCONN_TCP before accessing tcp_pcb
- Add optval != nullptr guard before dereferencing in fast path
2026-03-10 22:27:59 -10:00
J. Nick Koston 15e981e6db Merge branch 'fast-nodelay' into integration 2026-03-10 22:17:35 -10:00
J. Nick Koston c530e52669 [socket] Fast path for TCP_NODELAY bypass lwip_setsockopt overhead
On ESP32 with CONFIG_LWIP_TCPIP_CORE_LOCKING, bypass lwip_setsockopt()
for TCP_NODELAY by directly modifying tcp_pcb->flags under the TCPIP
core lock. This eliminates ~1091 bytes of overhead per call (socket
lookups, hook, switch cascade, refcounting) for what is just a single
bit flip.

The API frame helper toggles Nagle's algorithm on every message send
via set_nodelay_for_message(), making this a hot path. The fast path
reduces set_nodelay_raw_ from calling the full lwip_setsockopt to just
acquiring the mutex, loading 3 pointers, and flipping the TF_NODELAY
bit.

Only enabled when both USE_LWIP_FAST_SELECT (cached lwip_sock pointer)
and CONFIG_LWIP_TCPIP_CORE_LOCKING (real mutex protection) are
available. Falls back to the standard setsockopt call otherwise.
2026-03-10 22:08:22 -10:00
J. Nick Koston 567617b95f Merge remote-tracking branch 'upstream/fix-ble-client-disconnect-race' into integration 2026-03-10 21:30:51 -10:00
J. Nick Koston 5362966848 Merge branch 'dev' into fix-ble-client-disconnect-race 2026-03-10 21:29:15 -10:00
c52a48ed38 [multiple] Convert static function locals to member variables (#14689)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2026-03-11 07:11:46 +00:00
236f6b1935 [micronova] Add command queue (#12268)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
Co-authored-by: edenhaus <edenhaus@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
Co-authored-by: J. Nick Koston <nick+github@koston.org>
2026-03-11 19:52:43 +13:00
J. Nick Koston e8e700a683 [socket] Fix RP2040 heap corruption from malloc in lwip accept callback (#14687) 2026-03-11 19:51:54 +13:00
Adam DeMuri 4df3d3554e Enable the address and behavior sanitizers for C++ component unit tests (#13490) 2026-03-10 19:44:05 -10:00
J. Nick Koston 40c5b6a4bf Merge remote-tracking branch 'upstream/dev' into integration 2026-03-10 19:41:25 -10:00
Keith Burzinski d0f37ae694 [logger] Fix UART selection not applied before pre_setup() (#14690) 2026-03-11 04:31:27 +00:00
Keith Burzinski 6561c9bc95 [core] Fix waiting for port indefinitely (#14688) 2026-03-10 17:32:29 -10:00
J. Nick Koston e1721afeb3 Merge remote-tracking branch 'upstream/dev' into integration 2026-03-10 16:52:49 -10:00
J. Nick Koston 794098de99 [rp2040] Add HardFault crash handler with backtrace (#14685) 2026-03-10 16:40:45 -10:00
J. Nick Koston 68a6db8ee7 Merge branch 'rp2040-accept-no-irq-malloc' into integration 2026-03-10 16:04:03 -10:00
J. Nick Koston 50dd6983b5 [socket] Fix potential pbuf leak when recv callback gets err != ERR_OK
Defensively free pb when err != ERR_OK but pb != nullptr in both
recv_fn and s_queued_recv_fn. In practice lwip never sends data
with an error code, but this prevents a leak if it ever does.

Also add comment noting tcp_recved is deferred to read().
2026-03-10 16:03:27 -10:00
J. Nick Koston 0a120fa7bd [socket] Fix potential pbuf leak when recv callback gets err != ERR_OK
Defensively free pb when err != ERR_OK but pb != nullptr in both
recv_fn and s_queued_recv_fn. In practice lwip never sends data
with an error code, but this prevents a leak if it ever does.

Also add comment noting tcp_recved is deferred to read().
2026-03-10 16:03:04 -10:00
J. Nick Koston 01dcc7f41a Merge remote-tracking branch 'upstream/rp2040-accept-no-irq-malloc' into integration 2026-03-10 15:59:22 -10:00
J. Nick Koston c3bd9af738 [socket] Add thread safety comments to lwip callbacks
Mark all lwip callbacks with IRQ context warning and
note that heap allocation (malloc) is not safe in this
context on RP2040.
2026-03-10 15:57:52 -10:00
J. Nick Koston 63ceb61dec Merge remote-tracking branch 'upstream/rp2040-accept-no-irq-malloc' into integration 2026-03-10 15:10:50 -10:00
J. Nick Koston a0681bce6b [socket] Combine shift and tcp_arg update into single loop in accept() 2026-03-10 15:09:41 -10:00
J. Nick Koston 9c28195130 [socket] Combine shift and tcp_arg update into single loop in accept() 2026-03-10 15:09:29 -10:00
J. Nick Koston 9238e7d55d Merge branch 'rp2040-accept-no-irq-malloc' into integration 2026-03-10 14:57:39 -10:00
J. Nick Koston 7cb32321b1 cleanup 2026-03-10 14:57:30 -10:00
J. Nick Koston b8e9ad931b Merge remote-tracking branch 'upstream/dev' into rp2040-accept-no-irq-malloc 2026-03-10 14:55:56 -10:00
J. Nick Koston fddd76a446 Merge branch 'rp2040-accept-no-irq-malloc' into integration 2026-03-10 14:54:34 -10:00
J. Nick Koston a9e921e053 [socket] Refactor accept() to skip null entries without duplicate code
Consolidate the dequeue + shift + tcp_arg update into a single while
loop that skips null entries (freed by lwip while queued) and returns
the first valid PCB. Eliminates the duplicated shift/update logic.
2026-03-10 14:52:38 -10:00
J. Nick Koston fab32d9e7b [socket] Refactor accept() to skip null entries without duplicate code
Consolidate the dequeue + shift + tcp_arg update into a single while
loop that skips null entries (freed by lwip while queued) and returns
the first valid PCB. Eliminates the duplicated shift/update logic.
2026-03-10 14:51:09 -10:00
J. Nick Koston acbfe9838d Merge remote-tracking branch 'upstream/rp2040-accept-no-irq-malloc' into integration 2026-03-10 14:47:01 -10:00
J. Nick Koston 6751fcf0b8 clear error first 2026-03-10 14:46:44 -10:00
J. Nick Koston b1e41be02f clear error first 2026-03-10 14:46:02 -10:00
J. Nick Koston 9265d9e0f8 [socket] Buffer early data on queued PCBs to prevent data loss
When LWIPRawImpl creation was deferred to the main-loop accept(),
the queued PCB had no recv callback registered. lwip's default
tcp_recv_null handler ACKs incoming data but drops it silently.

On ESP8266, lwip processes TCP segments in batches — if the SYN
completion and first data packet arrive in the same batch, the
API handshake data is lost, causing SocketClosedAPIError (EOF).

Fix: register temporary recv/err callbacks on queued PCBs that
buffer any data received before accept() creates the LWIPRawImpl.
The buffered data is transferred to the new socket via init().
2026-03-10 14:45:45 -10:00
CFlix b84d773bec [bme280] Change communication error message to include "no response" hint. (#14686) 2026-03-10 20:24:46 -04:00