fix(context): resolve a reply whose reference Discord did not deliver inline #636

Merged
coilyco-ops merged 1 commit from coilyco-ops/resolve-a-reply-to-an-old-message into main 2026-08-13 17:39:20 +00:00 AGit
Member

closes #630 - a reply to a message outside the history window still produced no subject, which is the case the reply-context work was filed for. Also carries attachments, so replying to a screenshot stops reading as replying to empty text.

closes #630 - a reply to a message outside the history window still produced no subject, which is the case the reply-context work was filed for. Also carries attachments, so replying to a screenshot stops reading as replying to empty text.
fix(context): resolve a reply whose reference Discord did not deliver inline
All checks were successful
ci / image-build (pull_request) Successful in 24s
ci / test (pull_request) Successful in 38s
ci / publish-echo-image (pull_request) Has been skipped
ci / publish-observed (pull_request) Has been skipped
07b8a1d434
replyTarget read the Gateway payload and stopped there, so a reply whose
ReferencedMessage was absent produced no subject at all and the turn looked like
an ordinary message. Discord does not always populate that field, and it is
least likely to for old messages, which is the case sirens-echo#579 was filed
about: a reply to something outside the history window.

So the reply that most needed its subject named was the one still not getting it,
and it failed silently.

The harness already knows how to turn a MessageReference into a message.
summonedByReference does exactly this on the summon path, for the same reason.
This draws on the same lookup budget as the other gate-forced REST calls, so a
channel of old replies cannot become one lookup per message, and a reference
that cannot be read stays an ordinary message rather than becoming a failure.

Resolved before the turn runs rather than inside Current, because Current takes
no context and runTurn calls it before History.

The inline payload still wins wherever Discord supplied one, so a fetch can never
contradict what the Gateway already delivered.

Second, smaller: ReplySubject now carries Attachments. Without them, replying to
a screenshot rendered as replying to empty text, which is the defect the
attachment suffix on a transcript entry exists to prevent. It renders through
that same suffix rather than restating it.

Both halves were in pull request 617, closed as superseded because the version
that landed is better in two other places. This carries forward only what was
lost, onto their implementation. The behaviour was also undocumented, so the
prompt doc now describes it.

closes #630

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