Skip to content

@gittensory ask/chat share the PR-panel comment slot: answers overwrite the review verdict and land far from the question #5076

Description

@JSONbored

What happens

ask/chat (the two free-text Q&A commands) render their answer through buildPublicAgentCommandComment, which posts via createOrUpdateAgentCommandComment -- the SAME find-and-edit-in-place helper used for the main PR review panel (AGENT_COMMAND_COMMENT_MARKER === PR_PANEL_COMMENT_MARKER, src/github/comments.ts). Every other command sharing that marker (preflight, blockers, etc.) reasonably represents "the PR's current state," so one continuously-updated panel makes sense there. But ask/chat answer a SPECIFIC question at a point in time:

  • A second @gittensory chat question silently overwrites the first answer (and can overwrite the review verdict itself), so a contributor asking two questions loses the first answer entirely.
  • The edited comment stays at its ORIGINAL position in the PR timeline (GitHub doesn't move an edited comment), which is typically wherever the review panel first posted -- not near the question that prompted the edit. A contributor scrolling to their own recent comment sees no reply anywhere nearby.

Confirmed live on #5051: a chat answer was posted successfully, but a second question overwrote it, and neither was ever visible near the asking comment.

Fix

  • ask/chat now post a fresh, standalone reply per invocation via createIssueComment (the same always-fresh pattern already used for approval/closure/pause/resume notices), instead of sharing the PR-panel slot.
  • The reply links back to the specific triggering comment (payload.comment.html_url, already present on the webhook payload) via a "Replying to [this comment]" line.
  • Every other command's behavior (shared, continuously-updated panel) is unchanged.
  • Also fixes a separate, smaller issue found in the same investigation: generateChatQaAnswer now retries once when the local Ollama model returns a genuinely empty completion (confirmed happening live) before reporting empty_chat_answer; a thrown error (network/auth) is still never retried.

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:bugGittensor-scored bug fix — scores a 0.05x multiplier.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions