fix(summon): resolve thread ownership when cached state cannot #1044
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!1044
Loading…
Reference in a new issue
No description provided.
Delete branch "aos/claude/ka54-thread-ownership"
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 #1043. Kai reported Dowel had stopped answering new messages in a thread again, roughly seven hours before the stream.
The lane was healthy. Three summons in the preceding 40 minutes each completed cleanly. The defect is that
threadOwnedByreads cached gateway state alone, and a miss reads as not my thread. An archived thread drops out ofGUILD_CREATE, and a restart rebuilds state from that payload, so a thread the service opened itself becomes invisible to the ownership check. The pod restarted at 02:31:47Z shortly before the report.#750 chose state-only deliberately, to avoid a REST call per message, recorded as an unseen thread is quieter rather than deaf. For the thread a member is actually talking in, those are the same thing.
resolveThreadOwnershiptries cache, then state, then one REST lookup on the existinglookupsbudget that already bounds gate-forced calls, and caches both answers. One lookup per channel, not per message, which is the bound the original read was protecting. A failed lookup is not cached.summonedLocallyand its five tests are untouched; the resolver runs at the call site only when that returns not-summoned, ahead of the early return that drops the message.just gatepasses. Four new tests cover cache, state read, negative caching, and member-owned threads.Gap: the REST fallback itself needs an HTTP fixture and is not unit tested, so the path that fixes the reported bug is exercised live. Worth confirming against a real archived thread before 10:00.