fix(#497): @[name] is a verbatim wire token, remove the trim
Owner ruling 2026-08-01. Mention autocomplete trimmed the contact name when building the @[...] token while the device stores and matches it byte-for-byte, so any name with leading or trailing whitespace was unmentionable and never beeped. Confirmed on the wire: the contact record keeps the 0x20, the outgoing mention drops it. @[...] is a wire token, not display text. Entry, firmware memcpy, advert encode, advert parse and the contact record are all verbatim by design; this trim was the only transformation applied to a node name anywhere, and it changed the identity of the addressee. - MentionCandidate now separates the two concerns: `name` is raw and goes on the wire, `label` is display-only and may be tidied. The const constructor is preserved, so existing const call sites still compile. - The candidate builder keeps sender and contact names raw. Emptiness is probed on a trimmed copy; the stored value is untouched. - _mentionsSelf drops its own trim as a direct consequence: a raw token requires a raw comparison, or this node stops recognising mentions of its own name. - Contract clause written at both the insertion site and _mentionsSelf, stating the token is byte-for-byte and that a future .trim() tidy-up is forbidden. The contract was silent on raw vs normalised, which is why both sides were reasonable and incompatible. Deliberately out of scope per the ruling: no entry-side trim in settings_screen. It fixes no deployed name and would silently alter deliberate spacing. Test updated to assert the new truth: ' Ben ' does NOT match @[Ben], and DOES match @[ Ben ]. Full suite 732 pass, analyze clean. Agent: CalmBay (session d14220d9)feat/483-button-buzzer-ui
parent
9de6621ec9
commit
a48edb209f
Loading…
Reference in new issue