fix(mentions): the first label of a schemeless host is not a person either #521

Merged
coilyco-ops merged 1 commit from coilyco-ops/the-first-label-of-a-host-is-not-a-person into main 2026-08-13 15:06:49 +00:00 AGit
Member

closes #515 - reading the adjacent character made the same host safe for one member and not another. The rule now walks forward to the dotted label.

closes #515 - reading the adjacent character made the same host safe for one member and not another. The rule now walks forward to the dotted label.
fix(mentions): the first label of a schemeless host is not a person either
All checks were successful
ci / image-build (pull_request) Successful in 22s
ci / test (pull_request) Successful in 40s
ci / publish-echo-image (pull_request) Has been skipped
ci / publish-observed (pull_request) Has been skipped
c6fb878ae3
A member named eco turned eco-app.coilysiren.me into a mangled address and got
a real Discord notification for it, because the resolved id reaches
AllowedMentions.Users:

  in ="see eco-app.coilysiren.me for jobs"
  out="see <@999>-app.coilysiren.me for jobs"   ids=[999]

inDottedIdentifier read the character adjacent to the name. That is why the
same host was safe for coilysiren and not for eco: one sits after a dot and the
other has a space before it, and a space before a name is exactly what prose
looks like. Nothing before the first label of a host says hostname.

So the signal is what follows. The rule now walks the run after the name across
label characters and hyphens, and reports a label when that run arrives at a
dot beginning another label.

A hyphen joins labels, so the walk crosses one. A hyphen that arrives at no dot
is an ordinary word, and a member named eco is still reached in eco-friendly
builds. That case is pinned in both directions, because without it this becomes
"a name before a hyphen never resolves", which loses real mentions silently.

I deferred exactly this on sirens-echo#481, reasoning that a hyphenated label
needed a member named app. That was the wrong read: the first label is the
common case, and eco is three characters in an Eco community. Quail's
enumeration of every position in the address is what made it obvious, and every
position is now covered by a test rather than the one that was reported.

The four earlier boundary rules are untouched and their corpora pass unmodified.
Landed after 498 rather than before it, so the restructure did not have to
merge around a fifth patch.

closes #515

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Kai Siren <coilysiren@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-gaming/sirens-echo!521
No description provided.