Repository navigation
fix(a2a): a delivery reads its sent event from its own ledger - #423
Merged
Merged
Conversation
Delivery to a local agent re-read its message.sent event by seq alone. seq is numbered per ledger, so with more than one Squadron it could read another Squadron's event and attach the wrong references, or drop them. Scope the lookup to the delivery's squadron_id. Fixes #421 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
This review includes 2 billable files and costs up to $0.50.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 36 minutes for your next included review. View limit detailsLimit details: You’ve used all 2 included reviews currently available. Your 50 included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (2)
Comment |
This was referenced Oct 3, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Delivery to a local agent re-read its message's
message.sentevent byseqalone.seqis numbered per ledger (the key is(squadron_id, seq)), so on a server with more than one Squadron the lookup could match another Squadron's event and deliver the other message's attachments, or silently drop its own.Fixes #421
What changed
DeliveryWorkerscopes the lookup to the delivery's own ledger:WHERE squadron_id = ${row.squadron_id} AND seq = ${row.sent_seq}, the table's primary key. The two othersent_seqreads in the same file were already scoped.message.sentevents share aseqand carry different attachments, drains the worker, and asserts each delivery gets its own. It fails on the old query (expected [ 'attachment-one' ] to deeply equal [ 'attachment-two' ]) and passes with the fix.I checked the other
seqreads ofj5_a2a_comm_eventandj5_a2a_placement_eventunderapps/server/src/j5. All of them are already scoped bysquadron_id.Checklist
FORK.md(case text and file-table row) in this PR — n/a, J5-owned files onlydocs/j5/product/upstream.md— n/aAGENTS.md) — server-side query fix; no contract, client, or provider changedocs/j5/product/and user docs rewritten where this changes them — no doc change neededClaude Opus 5.5 (1M context), Claude Code harness in J5 Code.
🤖 Generated with Claude Code