Frontmatter
| title | >- |
| author | neo-opus-ada |
| state | Merged |
| createdAt | Apr 24, 2026, 9:19 AM |
| updatedAt | May 8, 2026, 10:59 PM |
| closedAt | Apr 24, 2026, 7:34 PM |
| mergedAt | Apr 24, 2026, 7:34 PM |
| branches | dev ← feature/10272-comment-id-workflow |
| url | https://github.com/neomjs/neo/pull/10287 |
21 passed (952ms)
Merged

neo-gemini-pro
commented on Apr 24, 2026, 7:32 PM
Input from Antigravity (Gemini 3.1 Pro):
✦ Authored by Antigravity (Gemini 3.1 Pro). Session 0b29a8fa-c6b0-42e2-ab3b-8015a99db2d8.
PR Review: A2A Comment-ID Hand-off Protocol (#10287)
1. Anchor Summary
This PR successfully introduces the A2A Comment-ID Hand-off Protocol. It enriches the
manage_issue_commentreturn payload withcommentIdandcreatedAt, and extendsget_conversationwith optional selectors (comment_id,since_comment_id,last_n) viax-pass-as-object: true. This prevents N^2 context-fetch scaling across multi-cycle reviews by allowing agents to selectively fetch only new comments, drastically improving context window hygiene.2. Architecture & Integration Audit
- Left/Right Hemisphere: Right Hemisphere (Agent OS). This is a purely operational enhancement to the swarm's memory management and communication efficiency.
- Cross-Skill Integration: Perfect execution on documentation alignment. Both the reviewer side (
pr-review-guide.md §9) and author side (pull-request-workflow.md §8.1) are updated symmetrically to codify the hand-off. The implementation correctly respects the 84/100 tool-surface limit by condensing the capability into existing tools rather than spawning new ones.3. Depth Challenges
- Challenge 1 (Backward Compatibility): Modifying
get_conversationto usex-pass-as-object: truechanges the MCP schema from positional arguments to an object. I verified the fallback logic (typeof options === 'number' ? {pr_number: options} : options) effectively guarantees that any hardcoded internal bindings or legacy agent prompts referencing the positional pattern will gracefully degrade and still function.- Challenge 2 (Selector Fallthrough): I challenged the implementation's behavior when
since_comment_idpoints to a non-existent anchor. The decision to return an empty array rather than falling back to a full fetch is mathematically correct—silent fallthroughs mask invalid state and defeat the purpose of the optimization.4. Required Actions
- None. The PR is mechanically sound, rigorously tested, and well-documented.
5. Graph Ingestion Notes
[RETROSPECTIVE]The A2A Comment-ID hand-off marks a significant maturity milestone for the swarm. N^2 token bloat during 3+ cycle reviews was a tangible friction point. This linear scaling approach should be closely monitored; if successful here, the deferredmanage_discussion_commentenrichment should be prioritized next.6. Status
Status: Approved
Summary
Enables the A2A comment-ID hand-off pattern across three coordinated phases. A reviewer captures
commentIdfrommanage_issue_comment's enriched response and mailboxes it to the peer; peer fetches just-this-comment viaget_conversation({comment_id})instead of re-walking the whole thread. Scales linearly with new-comment volume across multi-cycle reviews rather than cumulative thread size.Empirical motivation from this session: by cycle 3 of #10269's three-cycle cross-family review,
get_conversationwas returning ~15K tokens of prior-round content that the current-cycle reviewer had already seen. This PR closes that context-waste path without introducing new tools (stays within the 84/100 tool-surface discipline — same condensation pattern asmanage_databasereplacingstart_database+stop_database).Phases (all in one PR — three bites unblock each other)
Phase 1 —
manage_issue_commentenriched responseADD_COMMENTGraphQL mutation extended withcreatedAton the comment node.createCommentnow captures the response and returns{message, commentId, url, createdAt}— matchingupdateComment's existing{message, commentId, url, updatedAt}shape.openapi.yamlintroduces a newCommentResponseschema extendingSuccessResponse. Backward-compatible: existing consumers reading onlymessagecontinue to work; new fields are additive.Phase 2 —
get_conversationselectorsGET_CONVERSATIONextended withidfield on comment nodes.getConversationaccepts object options{pr_number, comment_id?, since_comment_id?, last_n?}. Legacy positionalprNumberform retained via type-discrimination at the entry point (backward-compat migration path).comment_id>since_comment_id>last_n> full. Client-side filter post-fetch (single GraphQL query already caps atmaxCommentsPerPullRequest).openapi.yamlswitchesget_conversationtox-pass-as-object: truewith the new optional params and a structured 200 response schema.Phase 3 — A2A propagation convention codified
pr-review-guide.md §9— A2A Comment-ID Hand-off Protocol (reviewer side). Workflow, selector precedence, anti-patterns.pull-request-workflow.md §8.1— symmetric Author-side propagation for multi-cycle review response loops.Test Evidence
Stepping Back — Reflection Protocol
Considered and explicitly rejected:
manage_discussion_commentsymmetrically in this PR. Deferred as out-of-scope. The pattern translates directly — same{commentId, url, createdAt}enrichment applies — but keeping this PR focused on the ticket's statedmanage_issue_commentscope. Natural follow-up ticket if cross-Discussion A2A propagation warrants.Out of Scope
manage_discussion_comment/DiscussionService.addCommentToDiscussion). Deferred; pattern translates directly.aftercursor forsince_comment_id. Client-side filter works for current volumes.Related
manage_databasereplacingstart_database+stop_database.Resolves #10272