Triage bot: disclose bot authorship on every comment it posts - #4863
Merged
Conversation
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>
Contributor
There was a problem hiding this comment.
🟡 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-reviewand/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.
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 forreview_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 aGhApiFormPromptTeststest asserting the appended prompt requires disclosure./run_pre_commit(coverage/) — clean, including the "triage daemon unit tests" hook and the full./run_all --quicksuite🤖 Generated with Claude Code