Files
multica/docs
Lambda e47977212c fix(handler): make on_comment and @mention paths mutually exclusive
Without (issue, agent) coalescing, a single member comment that @mentions
the assignee was enqueueing two tasks with identical trigger_comment_id —
once via shouldEnqueueOnComment → EnqueueTaskForIssue and once via
enqueueMentionedAgentTasks → EnqueueTaskForMention. The same double-fire
hit plain replies that inherit the assignee mention from the thread root.

Add commentMentionsAssignee, which uses the shared
shouldInheritParentMentions logic to compute the same effective mention
set the @mention path will see. Extend the on_comment gate to skip when
that helper says the assignee will be triggered through the @mention
path. Net result: exactly one task per (comment, assignee), with the
trigger comment preserved.

TestOnCommentTriggerDecision updated to reflect the new contract; assignee
mention cases that used to assert the on_comment branch fires now assert
it skips (mention path covers them). New integration test
TestAssigneeMentionDoesNotDoubleEnqueue pins the end-to-end behavior.

Also softens the "ClaimAgentTask guarantees serial execution" wording in
the code and the RFC: it is a coordination-side property under the
current single-poller-per-runtime model, not a DB-level lock on
(issue, agent). FOR UPDATE SKIP LOCKED locks the row being claimed, not
the key.

Co-authored-by: multica-agent <github@multica.ai>
2026-05-09 14:42:25 +08:00
..