fix(mentions): resolve names in prose only, so a link survives #472
No reviewers
Labels
No labels
move-to-repo
coilyco-bridge-deploy
move-to-repo
coilyco-flight-deck-agent-compose
move-to-repo
coilyco-gaming-eco-app
move-to-repo
coilysiren-inbox
move-to-repo
unknown
🔒⚠️📦⚠️🔒 SANDBOXED 🔒⚠️📦⚠️🔒
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
c#
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-gaming/sirens-echo!472
Loading…
Reference in a new issue
No description provided.
Delete branch "eng/mentions-skip-link-spans"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Resolution now runs on prose only.
mentionSpanssplits the reply on the sameurlSpanthe four prose validators mask with, and a link span is carried through untouched, so where a link starts keeps one definition rather than gaining a second.The four corpus shapes from the issue now come back byte-identical, and nobody is reached for a link that merely contains their name.
The second defect, filed separately
The replacement joined the mention to the name instead of replacing it whenever the two differed in case:
TrimSuffix(match, name)cannot trim what(?i)was free to match. The splice cuts on the submatch index instead, which needs no assumption about the name's length or case, so this goes away in the same line that skips link spans. Confirmed on mergedmainat3108976before changing anything.What did not change
The four bounds: under three runes, inside a longer word, once per person, and
Parsestill empty so Discord never reads the text. Each keeps its test.One behaviour did change beyond the fix, and deliberately: a name that appears only inside a link no longer counts as resolved. It previously entered the allowed-mentions list, which is the ping harm the issue names second.
Tests
TestANameInsideALinkRewritesTheLinkwas a characterization test that asked to be removed once the behaviour was fixed. It is replaced byTestANameInsideALinkLeavesTheLinkAloneover the same corpus, plus both orderings of the mixed case where one reply carries the name in prose and in a link.Quail: the corpus is in the tree and both halves run under
ward exec gate. Extend it against this branch whenever you like.closes #465
closes #469