Skip to content

Sync the InfraredRFReceiveEvent timings span option from esphome - #1999

Merged
J. Nick Koston (bdraco) merged 1 commit into
mainfrom
sync-ir-rf-timings-span
Nov 4, 2026
Merged

J. Nick Koston (bdraco) merged 1 commit into
mainfrom
sync-ir-rf-timings-span

Conversation

@bdraco

Copy link
Copy Markdown
Member

What does this implement/fix?

Syncs api.proto with esphome/esphome#22269, which generates InfraredRFReceiveEvent.timings as a std::span<const int32_t> on the device instead of a std::vector<int32_t>.

  • Only the C++ container_pointer_no_template option changes; the field, its number and the bytes on the wire are unchanged.
  • api_pb2.py is regenerated with protoc 30.0, matching the checked-in header.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code quality improvements to existing code or addition of tests
  • Other

Related issue or feature (if applicable):

  • fixes

Pull request in esphome (if applicable):

Checklist:

  • The code change is tested and works locally.
  • If api.proto was modified, a linked pull request has been made to esphome with the same changes.
  • Tests have been added to verify that the new code works (under tests/ folder).

@bdraco

Copy link
Copy Markdown
Member Author

ESPHome Bot (@esphbot) review

@codecov

codecov Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (ea1c52f) to head (c0c333b).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1999   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           30        30           
  Lines         5281      5281           
=========================================
  Hits          5281      5281           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codspeed

codspeed Bot commented Nov 4, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 61 untouched benchmarks


Comparing sync-ir-rf-timings-span (c0c333b) with main (ea1c52f)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (357cb49) during the generation of this report, so ea1c52f was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@esphbot

Copy link
Copy Markdown
Contributor

PR Review — Sync the InfraredRFReceiveEvent timings span option from esphome

Approve. This is a small, correct proto sync, and the regenerated bindings are consistent with it.

What it does well:

  • The api.proto change is a one-line edit. It changes only the firmware-side C++ codegen hint (container_pointer_no_template) on InfraredRFReceiveEvent.timings. The field number, the sint32 type and the packed = true encoding are unchanged, so the bytes on the wire stay the same and the Python decode path is unaffected.
  • The regenerated api_pb2.py holds together. The option string grows by 4 bytes, from std::vector<int32_t> (20 bytes) to std::span<const int32_t> (24 bytes). Every length prefix that wraps it grows by exactly 4: the string length goes from 0x14 to 0x18, the field options from 0x1a to 0x1e, the field record from 0x2b to 0x2f, and the message from 0x96 to 0x9a.
  • Every _serialized_start and _serialized_end offset after InfraredRFReceiveEvent moves by +4, and the offsets before it are unchanged. This shows the file was regenerated, not hand-edited.
  • The description matches the diff, and the linked esphome PR ([remote_base] Dispatch received frames from a span esphome#22269) satisfies the rule that firmware lands first.

No issues found.



Checklist

  • Wire format unchanged (field number/type/packing preserved)
  • Generated api_pb2.py consistent with api.proto (offsets and length prefixes)
  • Linked firmware PR for api.proto change
  • PR description matches diff

Automated review by Kōan (Claude) HEAD=c0c333b 15s

@esphbot ESPHome Bot (esphbot) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip

No blocking issues found — ready to merge.

@bdraco
J. Nick Koston (bdraco) marked this pull request as ready for review November 4, 2026 19:00
Copilot AI balanced review requested due to automatic review settings November 4, 2026 19:00
@bdraco
J. Nick Koston (bdraco) merged commit 22f36bd into main Nov 4, 2026
26 checks passed
@bdraco
J. Nick Koston (bdraco) deleted the sync-ir-rf-timings-span branch November 4, 2026 19:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the protocol definition and generated-binding update.

No open issues 🎉

What changed in this PR

Synchronizes the Python client’s protocol definition with esphome/esphome#22269, preserving the existing field number, type, and wire encoding.

Changes:

  • Changes the C++ container option for InfraredRFReceiveEvent.timings from std::vector<int32_t> to std::span<const int32_t>.
  • Updates generated Python descriptor metadata and offsets to reflect the option change.
File Description
aioesphomeapi/​api.proto Mirrors the firmware’s span container option for received timings.
aioesphomeapi/​api_pb2.py Updates generated bindings to match the protocol definition.

Review effort: Balanced

@github-actions github-actions Bot locked and limited conversation to collaborators Nov 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants