Skip to content

refactor(vocabulary): finish the receiver rename and harden the identity parsers - #250

Draft
deviantintegral wants to merge 3 commits into
stack/01-rename-symbolsfrom
stack/02-rename-rest
Draft

deviantintegral wants to merge 3 commits into
stack/01-rename-symbolsfrom
stack/02-rename-rest

Conversation

@deviantintegral

Copy link
Copy Markdown
Member

Remaining prose, user-facing strings, panel text and docs become receiver; the
pre-existing "receiver" sense (the SDR) becomes radio. Only the ~40 sites that
genuinely mean the tuner were changed, each read rather than swept.

Also hardens the two parsers that decompose identity by colon segment, ahead of
the four-segment templates the topology PR introduces, and reserves receiver
as a token no device_key may equal.

~1,924 LOC of code; the rest is mechanical test churn.

Part of the plan-27 stack (union devices across receivers, #123).
Stacked on the PR below it, so this diff is only its own change.

Order: 01-rename-symbols -> 02-rename-rest -> 03-topology -> 04-union ->
05-availability -> 06-adoption -> 07-websocket -> 08-panel -> 09-migration ->
10-contract-docs -> 11-tests-received

Review 01 first; merging in order collapses the stack.

@netlify

netlify Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for rtl-433-home-assistant ready!

Name Link
🔨 Latest commit c2e6582
🔍 Latest deploy log https://app.netlify.com/projects/rtl-433-home-assistant/deploys/6ad8b0f5b2ad4357af73defc
😎 Deploy Preview https://deploy-preview-250--rtl-433-home-assistant.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

deviantintegral and others added 3 commits October 21, 2026 08:28
…ity parsers

Completes the vocabulary work the symbol rename started. The remaining "hub"
prose, user-facing strings, panel text and documentation become "receiver", and
the pre-existing "receiver" sense -- the SDR hardware -- becomes "radio", so the
two senses stop colliding. The mental model is that a receiver is a computer
running rtl_433, and it contains a radio.

Only the ~40 sites that genuinely mean the tuner were changed to radio; each was
read rather than swept, because "receiver" already meant the server nearly
everywhere else.

Also hardens the two parsers that decompose an identity string by colon segment,
ahead of the four-segment templates the topology work introduces.
device_trigger dropped its maxsplit, so a fourth segment is seen as a fourth
segment rather than being absorbed into the field key, and the orphan-device
scan now takes the first segment after the entry prefix instead of everything
after it. Both then reject the reserved marker, so a receiver identity can never
be decoded as a device field with a device_key of "receiver".

const gains RECEIVER_SEGMENT, RESERVED_DEVICE_KEYS and is_reserved_device_key,
with tests asserting against real pyrtl_433.naming.safe_token output that the
collision is reachable rather than hypothetical.

The four :hub: unique-id templates still emit their current values; giving them
a receiver discriminator belongs to the topology change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RE12ejGYfQw67gnvkYwqnp
`async_remove_config_entry_device` carried nine surviving mutants, one more
than the baseline allowed. Six of them were reachable and are now covered:

  * the `device_key` sentinel, and the `or` joining the two skip conditions --
    an unrelated device (another integration's row carrying this entry's
    prefix, and one of ours carrying another entry's) must leave the entry
    untouched rather than forgetting the empty key;
  * reading the identifier's first segment rather than its last, so extra
    segments cannot turn a receiver into a removable RF device;
  * the key and the default the devices map is read from -- removing one
    device must keep the others, and an entry that has never stored a map
    must not die on `None.items()`.

The remaining three cannot be killed. Two are equivalent: `[0]` of
`split(":", 1)`, `split(":")` and `split(":", 2)` are the same string. The
third swaps `continue` for `break`, which only differs when a non-matching
identifier is visited before the matching one -- and `identifiers` is a set,
so a test asserting that would pass or fail on hash order.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X27WZ4XUXCGAwX1FYbFkLW

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant