feat(daemon): Add pending ACK tracking for sync messaging (agent-relay-484)#244
feat(daemon): Add pending ACK tracking for sync messaging (agent-relay-484)#244khaliqgant wants to merge 5 commits intomainfrom
Conversation
…rdination - Fix AckPayload.response type from boolean to string for richer status codes - Add JSDoc documentation for correlationId, response, responseData fields - Update sendSyncAck() signature and call sites to use 'OK'/'ERROR' strings - Add comprehensive unit tests for sync messaging types (16 new tests) This enables request-response patterns and blocking message semantics for turn-based agent coordination scenarios (e.g., card games, workflows). Closes #483 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add 6 new test cases for daemon pending ACK tracking (agent-relay-484): - Duplicate correlationId rejection with ERROR - Missing correlationId in blocking SEND returns ERROR - Connection cleanup clears pending ACKs - ACK without correlationId is ignored (but still routed) - ACK with unmatched correlationId doesn't resolve wrong pending - Default timeout (30s) when timeoutMs not specified Total: 8 tests for blocking SEND and ACK correlation logic. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…y-484) Implement correlation-based tracking of blocking SEND requests in daemon. When a SEND request has sync.blocking=true and sync.correlationId: - Store promise in pendingAcks map with timeout handler - Resolve when ACK with matching correlationId arrives - Reject if timeout exceeded before ACK Enables clients to send blocking messages that wait for specific responses.
🤖 My Senior Dev — Analysis Complete👤 For @khaliqgant📁 Expert in View your contributor analytics → 📊 55 files reviewed • 9 high risk • 9 need attention 🚨 High Risk:
🚀 Open Interactive Review →The full interface unlocks features not available in GitHub:
💬 Chat here: 📖 View all 12 personas & slash commandsYou can interact with me by mentioning In PR comments or on any line of code:
Slash commands:
AI Personas (mention to get their perspective):
For the best experience, view this PR on myseniordev.com — includes AI chat, file annotations, and interactive reviews. |
|
Closing as superseded. Pending ACK tracking in the daemon is already implemented in the new package structure at |
Summary
Implements pending ACK tracking in the daemon for request-response patterns with blocking message semantics.
Changes
PendingAckinterface andpendingAcksMap to track blocking sendshandleAck()method to resolve pending ACKs with correlationregisterPendingAck()to track outgoing blocking sendsresolvePendingAck()to handle ACK receipt and forwardingFeatures
correlationIdfieldTests
8 comprehensive test cases covering:
Closes #484