Skip to content

Triage bot: disclose bot authorship on every comment it posts - #4863

Merged
springfall2008 merged 4 commits into
mainfrom
fix/triage-bot-comment-disclosure
Sep 1, 2026
Merged

Triage bot: disclose bot authorship on every comment it posts#4863
springfall2008 merged 4 commits into
mainfrom
fix/triage-bot-comment-disclosure

Conversation

@springfall2008

Copy link
Copy Markdown
Owner

Summary

  • BOT_CLEANUP (/pr-cleanup) was replying to review threads and posting summary comments with no disclosure they came from the bot, unlike /issue-triage//issue-triage-followup, which already open every comment with one.
  • .claude/skills/pr-cleanup/SKILL.md: adds a disclosure requirement to thread replies, the "nothing to address" comment, and the quality-gate-failure summary comment.
  • .claude/skills/issue-pr/SKILL.md: adds the same disclosure requirement to its step-7 failure comment (it had a plain description, unlike the triage skills' explicit "opening with a line disclosing..." instruction).
  • GH_API_ENDPOINT_FIRST_PROMPT (tools/triage_daemon.py) — the appended system prompt used for review_pr()/cleanup_pr() — now also requires disclosure on every comment/reply posted through it. This is the only lever available for /code-review's comments, since it's a built-in skill whose own instructions we don't own; it also acts as a belt-and-braces backup for /pr-cleanup's replies.
  • mark_pr_not_actionable()'s directly-posted comment didn't open with "Automated ..." the way the other three Python-composed comments (mark_review_failed, mark_pr_review_failed, mark_pr_cleanup_failed) already did — tightened for consistency.

Test plan

  • python3 tools/test_triage_daemon.py — all passing, including new regression tests (CommentDisclosureTests) asserting every Python-composed comment body opens with "Automated", and a GhApiFormPromptTests test asserting the appended prompt requires disclosure
  • ./run_pre_commit (coverage/) — clean, including the "triage daemon unit tests" hook and the full ./run_all --quick suite

🤖 Generated with Claude Code

BOT_CLEANUP's thread replies and summary comments had no disclosure that
they came from the bot, unlike triage/triage-followup which already open
with one. Adds disclosure instructions to pr-cleanup and issue-pr's SKILL.md
failure comments, extends GH_API_ENDPOINT_FIRST_PROMPT (the only lever for
the built-in /code-review skill) to require it on every posted comment or
reply, and tightens the one Python-composed comment that didn't already
open with "Automated ...".

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 30, 2026 15:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

There’s a grammatical error in the new disclosure prompt text and a newly added regression test is too weak to reliably detect future regressions in the “must open with disclosure” requirement.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR tightens the triage bot’s disclosure policy so maintainers can clearly distinguish bot-authored PR/issue comments and review-thread replies from human feedback, across both Python-composed comments and LLM-composed replies.

Changes:

  • Updated GH_API_ENDPOINT_FIRST_PROMPT (used by /code-review and /pr-cleanup) to require an explicit “automated” disclosure line at the start of every posted comment/reply.
  • Standardised mark_pr_not_actionable()’s directly-posted comment body to begin with an “Automated …” disclosure for consistency with other daemon-posted comments.
  • Added regression tests asserting disclosure requirements in both the appended prompt and Python-composed comment bodies; updated agent skill docs to instruct disclosure on replies and summary comments.
File summaries
File Description
tools/triage_daemon.py Adds disclosure requirement to the appended system prompt and standardises one daemon-posted comment to start with “Automated …”.
tools/test_triage_daemon.py Adds regression tests to ensure disclosure requirements remain enforced.
.claude/skills/pr-cleanup/SKILL.md Requires disclosure lines on all cleanup bot replies and on the “nothing to address” / “quality gate failed” summary comments.
.claude/skills/issue-pr/SKILL.md Requires a disclosure line on the step-7 failure comment body.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tools/triage_daemon.py Outdated
Comment thread tools/test_triage_daemon.py Outdated
springfall2008 and others added 3 commits August 30, 2026 16:08
…gression test

Reword the GH_API_ENDPOINT_FIRST_PROMPT disclosure sentence for clarity, and
assert on the actual "must open with"/example-text requirement in
test_requires_disclosure_on_every_posted_comment_or_reply instead of loose
keyword presence, which could pass even if the requirement were watered down.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@springfall2008
springfall2008 merged commit 923d2cd into main Sep 1, 2026
2 checks passed
@springfall2008
springfall2008 deleted the fix/triage-bot-comment-disclosure branch September 1, 2026 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants