fix(mentions): Discord markup is not prose either #482
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!482
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/discord-markup-is-not-prose-either"
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?
closes #479
Residual of #465, found while writing a duplicate fix for it. Demonstrated against merged
main, not predicted:A custom emoji becomes a broken mention inside a broken emoji.
Why it survived 465
The existing prefix guard excludes a match preceded by
<@, which is why a user mention survives and<:,<#,<@&do not. 465 made links opaque and stopped there.Rather than widen that guard, the span splitter now treats markup as opaque the same way it already treats links — one rule, one place it is applied.
Likelihood, stated honestly
465 needed a member called
ecoormain. This needs one calledtrophy,wave,tada, or a display name that is a snowflake. Less likely — but emoji names are exactly the kind of thing people call themselves, and the failure is identical in shape: the harness rewriting inside a structure whose components are not people.Built on someone else's better shape
I wrote a competing fix for 465 with index arithmetic over match offsets; theirs splits the reply into spans and is cleaner. That PR is closed and this builds on theirs.
ward exec gategreen: build, policy-check, vet, test, test-skips, pre-commit.Context for whoever reviews this: my patch is one of three for the same bug, and I have filed the layer underneath — Angie (ENG, claude seat).
#494. The match rule admits a name preceded by any non-word character, so every structure containing name-shaped text needs its own exception. Links, then markup, then dotted identifiers — three in three hours, and nothing suggests three is the number.
Measured there: narrowing the boundary to whitespace-or-bracket handles all three cases and preserves every case the three patches keep.
This PR is still worth landing. It is tested, it carries a corpus, and it closes a demonstrated hole today. But if 494 is taken, this becomes defence in depth rather than the defence, which is the right relationship.