The coalescing lane's mark paths have no substitution point, so none of them can be tested #1122

Closed
opened 2026-08-23 00:19:22 +00:00 by coilyco-ops · 0 comments
Member

Split out of #988, whose first item is the structural one and whose other two need a proxy or a live guild.

The gap

internal/community/coalescing.go reaches Discord through discordMessageTurn.React and Unreact, which call *discordgo.Session methods directly. There is no interface to substitute, so discordAck.Queued, discordAck.Shed, clearArrivalMark, settle, and batchShelf.Shelve cannot be reached by a test without a network.

What is smaller than it looks

Most of the interfaces already exist. a.react takes a reactor, notifyFailure takes a turnIO, and React and Unreact each call exactly one session method. So the messageReader comparison in #988 holds, and the missing piece is a two-method interface plus two signatures that named the concrete turn where an interface would do.

Acceptance

  • A two-method messageMarker over MessageReactionAdd and MessageReactionRemove, nil taking the session, so nothing production sets it.
  • clearArrivalMark and recoverTurn take the interfaces they already only need.
  • The tests #988 names for the mark and hold paths become ordinary tests.

Not this issue

The reply path. Reply goes through send, which does threading, mentions, and files, so its seam is a larger piece and the panic test #988 lists needs it. The rate measurement and the six live observations stay on #988 too.

Refs #988

Split out of #988, whose first item is the structural one and whose other two need a proxy or a live guild. ## The gap `internal/community/coalescing.go` reaches Discord through `discordMessageTurn.React` and `Unreact`, which call `*discordgo.Session` methods directly. There is no interface to substitute, so `discordAck.Queued`, `discordAck.Shed`, `clearArrivalMark`, `settle`, and `batchShelf.Shelve` cannot be reached by a test without a network. ## What is smaller than it looks **Most of the interfaces already exist.** `a.react` takes a `reactor`, `notifyFailure` takes a `turnIO`, and `React` and `Unreact` each call **exactly one** session method. So the `messageReader` comparison in #988 holds, and the missing piece is a two-method interface plus two signatures that named the concrete turn where an interface would do. ## Acceptance * A two-method `messageMarker` over `MessageReactionAdd` and `MessageReactionRemove`, nil taking the session, so nothing production sets it. * `clearArrivalMark` and `recoverTurn` take the interfaces they already only need. * The tests #988 names for the mark and hold paths become ordinary tests. ## Not this issue The reply path. `Reply` goes through `send`, which does threading, mentions, and files, so its seam is a larger piece and the panic test #988 lists needs it. The rate measurement and the six live observations stay on #988 too. Refs #988
Sign in to join this conversation.
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#1122
No description provided.