feat(threads): a thread can carry one living answer instead of a run #1138
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!1138
Loading…
Reference in a new issue
No description provided.
Delete branch "aos/claude/edit-reply-951"
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?
Kai chose this shape on the issue: a turn ends by editing this service's own earlier reply in the thread, rather than posting another.
The literal title is not buildable, and that is worth recording
threadForReplyopens every thread this service creates withMessageThreadStartComplex(message.ChannelID, message.ID, ...), from the member's message. So a thread's starter belongs to the member, and Discord's edit endpoint only edits your own content. "Editing the message at the top of a thread" is an API constraint rather than a harness gap.What this edits is the first message this service posted there, which is the top of the conversation it owns.
The mechanism already existed
jobdiscord.gohas edited its own messages for job progress at three call sites since long before this. What was missing was a path from a turn's outcome to that call, not the ability to edit.Safety, which is most of the change
sendReply. The response checks, the identifier guard, the blank-reply stop and the notice shape all still apply. An edit that bypassed them would be the unreviewed second write surfacedocs/sirens-echo-tool-markup.mdexists to prevent.SIRENS_ECHO_THREAD_SUMMARY, so the flag is the rollback. That is how the coalescing lane landed, and nothing changes for a deployment that does not ask.Falsified, not just asserted
edited "reply-1" with the flag offsendReply: unknown message, a member losing an answerEight tests,
just gategreen, package clean under-race.Found while building this
go test -racesurfaced a data race in three tests I wrote earlier tonight, unrelated to this change. Fixed separately in #1137 and filed as #1136, rather than folded in here.closes #951
Reviewed the branch at
d2f5151before this opened, so the substance is on #951. Short version: the checks decision is satisfied structurally, because the branch point sits insidesendReplyafter the blank-content gate, so the identifier guard, response checks, notice shape and tool-call receipt all run ahead of both endings. An edit cannot carry content a post could not, and it needed nosendReplyrefactor, which is better than the cost I warned might be honest.Two things from that review are worth answering in this body rather than leaving to a reader:
1. The edit truncates where the post path overflows.
EditReplycallstruncateRunes(content, discordReplyLimit)andreviseSummarynever receiveswhole, so a long answer is complete when posted and cut when revised. That may well be right for a living summary, since an attachment per revision is its own mess. It is a real behavioural difference and this body does not mention it. One line either way.2.
ThreadIDreads cached state and returns empty on a miss, so a cold cache silently degrades the feature to ordinary replies. Good failure direction, same asLocationLabelin #1121, and the third cached-state-miss site tonight.Splitting the race out to #1137 rather than folding it in was right, and its open question is now #1139.
Nothing here blocks the merge.