LearnNewsExamplesServices
Frontmatter
id10304
titleEnrich manage_discussion_comment with Comment-ID hand-off protocol
stateClosed
labels
enhancementaiarchitecture
assigneesneo-gpt
createdAtApr 24, 2026, 7:37 PM
updatedAt3:18 PM
githubUrlhttps://github.com/neomjs/neo/issues/10304
authorneo-gemini-pro
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtJun 5, 2026, 3:47 AM

Enrich manage_discussion_comment with Comment-ID hand-off protocol

Closed v13.0.0/archive-v13-0-0-chunk-6 enhancementaiarchitecture
neo-gemini-pro
neo-gemini-pro commented on Apr 24, 2026, 7:37 PM

Context

We implemented the A2A Comment-ID Hand-off Protocol for issues and PRs in #10272 / PR #10287. Ideation Sandbox Discussions can also grow long over multiple review cycles, so Discussion comments need the same linear-cost handoff shape.

Current State (2026-06-03 V-B-A)

  • manage_discussion_comment already returns commentId, url, and createdAt on create, plus commentId, url, and updatedAt on update. That slice was delivered by #10841 / PR #10891.
  • get_conversation supports comment_id, since_comment_id, and last_n selectors for Issues and Pull Requests only.
  • No get_discussion_conversation or equivalent Discussion selective-fetch read tool exists in the GitHub Workflow MCP surface.
  • ideation-sandbox discussion cycles currently still rely on full Discussion context or raw GraphQL/local artifacts, so the N^2 fetch problem remains for long design threads.

Problem

The remaining gap is Discussion-domain selective fetch. A2A messages can carry a Discussion commentId, but there is no agent-callable read tool that fetches only that comment or the comments after it.

Contract Ledger Matrix

Target Surface Source of Authority Proposed Behavior Fallback / Edge Case Docs Evidence
manage_discussion_comment return payload #10841 / PR #10891; current DiscussionService.manageDiscussionComment() Already returns commentId + URL + timestamp. No new implementation required for this row. Update path returns updatedAt, not createdAt; callers should treat timestamp field according to action. GitHubWorkflow.md, OpenAPI if wording is stale Source inspection + focused existing tests if touched
New Discussion selective-fetch tool #10304; issue/PR get_conversation selector contract Add get_discussion_conversation({discussion_number, comment_id?, since_comment_id?, last_n?}) or an equivalent MCP read surface. Selector precedence mirrors issues/PRs: comment_id > since_comment_id > last_n > full. Unknown comment_id returns empty comments; unknown since_comment_id returns empty comments; invalid or missing discussion_number returns structured error; full fetch remains the cold-cache fallback. OpenAPI + GitHubWorkflow.md; ideation-sandbox handoff guidance if changed Unit coverage for selector precedence and structured errors
Discussion comment shape GitHub Discussion GraphQL schema + existing sync query conventions Returned discussion includes title/body/author/category metadata plus filtered comments.nodes; comment nodes include id, author.login, body, createdAt, isAnswer, and replies if included by the existing query shape. Replies remain nested under the returned parent comment; no separate reply selector in this ticket. OpenAPI schema / docs Service test with representative GraphQL fixture
Ideation Sandbox handoff usage ideation-sandbox workflow + A2A commentId handoff precedent from pr-review Long Discussion cycles can pass commentId via A2A so peers fetch only the new Discussion comment when warm-cache context exists. Fresh/cold-cache reviewers still fetch broader context before evaluating a single isolated comment. ideation-sandbox docs; optional cross-reference to pr-review warm-vs-cold discipline Docs grep + review evidence

Acceptance Criteria

  • manage_discussion_comment returns commentId and timestamp metadata. Delivered by #10841 / PR #10891; no new code required.
  • A Discussion selective-fetch read tool exists with comment_id, since_comment_id, and last_n selectors.
  • Selector precedence and fallback semantics match issue/PR get_conversation behavior.
  • OpenAPI/tool documentation names the Discussion selector contract.
  • ideation-sandbox guidance documents commentId handoff for warm-cache Discussion cycles, with cold-cache fallback.
  • Focused tests cover the service/router selector behavior.

Related

  • #10272 / PR #10287 — issue/PR comment-ID return + selective fetch.
  • #10841 / PR #10891 — Discussion commentId return payload.
  • #10376 / PR #10377 — A2A commentId handoff discipline; adjacent but does not close this Discussion-domain read-tool gap.

Origin Session ID: 0b29a8fa-c6b0-42e2-ab3b-8015a99db2d8

tobiu closed this issue on Jun 5, 2026, 3:47 AM
tobiu referenced in commit 2938379 - "feat(github-workflow): add discussion selective fetch (#10304) (#12552) on Jun 5, 2026, 3:47 AM