test(mentions): pin that a tool-named member rewrites the receipt #495

Merged
coilyco-ops merged 1 commit from qa/pin-the-code-span-collision into main 2026-08-13 14:33:23 +00:00
Member

Pins #486 without reddening main, and verifies the candidate fix rather than guessing at it.

c061344 excluded links, 97c6aed excluded Discord markup. A backtick span is neither, and the disclosure footer is made of them:

> 🔨 ✅ `eco.get_market`   ->   > 🔨 ✅ `<@999>.get_market`

The footer reaches resolveMentions on every tool-using turn — resolution runs in sendReply at agent.go:1316 and the footer is appended before it. Tool names are short lowercase words, which is exactly the shape a display name takes.

The once-per-person detail is pinned deliberately

Only the first occurrence is rewritten, so the receipt ends up naming a person for one call and the tool for the next:

> 🔨 ✅ `<@999>.get_market`
> 🔨 📭 `eco.find_trade` — no results

That is asserted, not incidental. A fix that rewrote both lines would be a different defect rather than none, and this test would still fail — correctly.

The fix is verified, and it is one line

mentionSpans already splits the reply into prose and opaque spans, which is the mechanism the two landed fixes use. Adding code spans to opaqueSpan:

urlSpan.String() + "|<[@#:][^>]{0,64}>|<a?:[^>]{0,64}>" + "|```(?s:.*?)```|`[^`\n]*`"

Flips both pins and leaves the prose half passing. So no offset work is needed and the existing structure is sufficient — worth knowing before anyone opens the file expecting the mapping problem the original 465 fix had.

Why I did not just write it

This is a third span exclusion in one function. The shape is now a design question — a growing list of excluded spans, or an allowlist of prose — and after three of these I would expect the answer to be the latter. That is one deliberate pass, not a third patch, and it is not mine to choose.

The prose half is pinned beside the defect: eco confirmed it, **eco** confirmed it, and she said "eco" earlier must all still resolve. Emphasis and quotation around a name do not stop it being a name, and a fix that over-narrows fails here.

Test-only. No production change.

Refs #486

Pins https://forgejo.coilysiren.me/coilyco-gaming/sirens-echo/issues/486 without reddening `main`, and **verifies the candidate fix** rather than guessing at it. `c061344` excluded links, `97c6aed` excluded Discord markup. A backtick span is neither, and the disclosure footer is made of them: ``` > 🔨 ✅ `eco.get_market` -> > 🔨 ✅ `<@999>.get_market` ``` The footer reaches `resolveMentions` on **every tool-using turn** — resolution runs in `sendReply` at `agent.go:1316` and the footer is appended before it. Tool names are short lowercase words, which is exactly the shape a display name takes. ## The once-per-person detail is pinned deliberately Only the first occurrence is rewritten, so the receipt ends up naming a **person** for one call and the **tool** for the next: ``` > 🔨 ✅ `<@999>.get_market` > 🔨 📭 `eco.find_trade` — no results ``` That is asserted, not incidental. A fix that rewrote *both* lines would be a different defect rather than none, and this test would still fail — correctly. ## The fix is verified, and it is one line `mentionSpans` already splits the reply into prose and opaque spans, which is the mechanism the two landed fixes use. Adding code spans to `opaqueSpan`: ```go urlSpan.String() + "|<[@#:][^>]{0,64}>|<a?:[^>]{0,64}>" + "|```(?s:.*?)```|`[^`\n]*`" ``` **Flips both pins and leaves the prose half passing.** So no offset work is needed and the existing structure is sufficient — worth knowing before anyone opens the file expecting the mapping problem the original 465 fix had. ## Why I did not just write it This is a **third** span exclusion in one function. The shape is now a design question — a growing list of excluded spans, or an allowlist of prose — and after three of these I would expect the answer to be the latter. That is one deliberate pass, not a third patch, and it is not mine to choose. The prose half is pinned beside the defect: `eco confirmed it`, `**eco** confirmed it`, and `she said "eco" earlier` must all still resolve. Emphasis and quotation around a name do not stop it being a name, and a fix that over-narrows fails here. Test-only. No production change. Refs https://forgejo.coilysiren.me/coilyco-gaming/sirens-echo/issues/486
test(mentions): pin that a tool-named member rewrites the receipt
All checks were successful
ci / image-build (pull_request) Successful in 23s
ci / test (pull_request) Successful in 33s
ci / publish-echo-image (pull_request) Has been skipped
ci / publish-observed (pull_request) Has been skipped
9c026bd5bb
c061344 excluded links from mention resolution and 97c6aed excluded Discord
markup. A backtick span is neither, and the disclosure footer is made of them.

  > 🔨  `eco.get_market`     ->  > 🔨  `<@999>.get_market`

The footer reaches resolveMentions on every tool-using turn, because resolution
runs in sendReply and the footer is appended before it. Tool names are short
lowercase words, which is the shape a display name takes.

Once per person means only the first line is rewritten, so the receipt ends up
naming a person for one call and the tool for the next. That is pinned too,
since a fix that rewrote both would be a different defect rather than none.

Characterization, because this is a third span exclusion in one function and
the shape is now a design question rather than a patch: a list of excluded
spans or an allowlist of prose.

The candidate fix is verified rather than guessed. Adding code spans to
opaqueSpan flips both pins and leaves the prose half passing, so the mechanism
mentionSpans already provides is sufficient and no offset work is needed.

Refs sirens-echo#486

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!495
No description provided.