feat(discord): send an overflowing reply whole as a file #808
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!808
Loading…
Reference in a new issue
No description provided.
Delete branch "aos/claude/aw85-outbound-spill"
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 #791.
What changed
A reply that does not fit is sent whole. The message carries what fits plus one line naming the file and the byte count, and
reply.txtcarries the complete reply. The size is visible without opening it, which is the same promise the inbound and tool-result paths already make to the model, made to the member.The file is the whole reply, not the tail. Attaching only the remainder would make a reader stitch two pieces together and would disagree with the tool-result path, which saves the whole result rather than the part that did not fit.
The transport declares the capability, asserted like
reactor,replyBudget, andspanTaggeralready are. HTTP and the MCP turn implement nothing and are byte-for-byte unchanged.Answering the five questions the issue raised
runReplyChecksinturnstages.go:51covers tool-call markup, grounding, self-attributed claims, identifiers, identity claims, and response style, and all of it runs before the send budget is consulted atagent.go:1136. The cut was never holding anything back, so sending the rest adds nothing that was not already approved.replyAttachmentBytesismaxScratchFileBytes, so the size we are willing to store is the size we are willing to attach, and it sits far under Discord's floor for an unboosted guild. Above it the reply falls back to today's truncation.One correction to the issue
The shape is the same and the defect is not.
jobTerminalNoticereturns one of three fixed phrases (joboutcomedelivery_test.gopins that), and the other two sites are progress lines. Those cuts can never fire, so there is nothing there to save. Recorded in the doc so the next reader does not re-check it.Failing soft
Three cases send the cut message exactly as before and none reaches the member as an error: a transport that cannot carry a file, a reply over the attachment bound, and a send budget with no room to say the file exists. Same trade the tool-result spill makes.
Mutation
Filesfrom the send:TestTheAttachmentReachesDiscordAsAFilefails on all three assertions, including the content type falling back toapplication/json.TestAnOverflowingReplyKeepsTheWholeTextandTestTheMessageNamesTheFileAndTheTrueSizefail.TestTheMessageNamesTheFileAndTheTrueSizefails.The two Discord tests drive
ChannelMessageSendComplexthrough a captured round tripper, so the multipart body is asserted where Discord actually receives it rather than where the decision is made.TestAnOrdinaryReplySendsNoFilepins that an ordinary reply stays a plain JSON send.ward exec gatepasses on the rebased tree.Not in this change
The
ATTACH_FILESnote incoilyco-bridge/deployservices/sirens-echo/README.mdstill points at nothing. That is a one-line edit in another repository and belongs to its own pull request.coilyco-ops referenced this pull request2026-08-15 16:37:06 +00:00