Skip to content

fix: escape command triggers in PR comments to prevent re-trigger loop - #54

Merged
csoceanu merged 1 commit into
redhat-community-ai-tools:mainfrom
csoceanu:fix/escape-command-triggers-in-comments
Aug 13, 2026
Merged

csoceanu merged 1 commit into
redhat-community-ai-tools:mainfrom
csoceanu:fix/escape-command-triggers-in-comments

Conversation

@csoceanu

Copy link
Copy Markdown
Collaborator

Summary

  • Bot-posted PR comments on fork PRs contained literal [update-docs] in the footer ("Once this PR is merged, comment [update-docs] again..."), which re-triggered the workflow when the bot user was in the allowed users list — creating ~20 duplicate "Suggested Documentation Changes" comments (see ✨ Undeprecate plugin optionals migtools/crane#794)
  • Also escapes [review-feature] and [review-docs] in error comments posted when Jira credentials are missing, which could cause the same re-trigger loop
  • Uses the same HTML entity approach ([) as the review comment fix in PR fix: compare index hashes against base branch, not PR branch #50

Test plan

  • All 398 tests pass
  • Ruff check clean
  • Verify on a fork PR where the bot user is in the allowed users list

🤖 Generated with Claude Code

Bot-posted PR comments on fork PRs contained literal [update-docs]
text in the footer, which re-triggered the workflow when the bot user
was in the allowed users list — creating ~20 duplicate comments
(see migtools/crane#794).

Also escapes [review-feature] and [review-docs] in error comments
posted when Jira credentials are missing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Aug 13, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 7:23 PM UTC · Completed 7:35 PM UTC

Commit: c3fd3b7 · View workflow run →

@fullsend-ai-review

Copy link
Copy Markdown

Looks good to me


Labels: PR fixes a bug in the comment-posting logic

@fullsend-ai-review fullsend-ai-review Bot added ready-for-merge All reviewers approved — ready to merge bug Something isn't working labels Aug 13, 2026
@csoceanu
csoceanu merged commit b5d2f83 into redhat-community-ai-tools:main Aug 13, 2026
22 checks passed
@fullsend-ai-retro

fullsend-ai-retro Bot commented Aug 13, 2026

Copy link
Copy Markdown

🤖 Finished Retro · ✅ Success · Started 7:37 PM UTC · Completed 7:49 PM UTC

Commit: c3fd3b7 · View workflow run →

@fullsend-ai-retro

Copy link
Copy Markdown

Retro: PR #54 — Escape command triggers in PR comments

Workflow outcome: Good. PR #54 is a correct, complete 4-line bug fix by csoceanu that escapes command trigger strings ([update-docs], [review-docs], [review-feature]) in bot-posted PR comments using HTML entities (&#91;), preventing a workflow re-trigger loop that caused ~20 duplicate comments on fork PRs. The fix extends the same approach introduced in PR #50 for comments.py to additional comment strings in suggest_docs.py.

Timeline: PR opened at 19:22 UTC, review agent triggered immediately (run 31735489403), 4 sub-agents dispatched (correctness, security, style-conventions, docs-currency). The correctness sub-agent flagged an "incomplete fix" concern (low severity) and the security sub-agent found a related medium-severity finding, but the challenger adjudication removed the duplicate and confirmed the escaping approach was sound. All findings fell below the reporting threshold. APPROVE posted at 19:35 with ready-for-merge label. Merged by author at 19:36. Total: ~14 minutes, $3.20 cost.

Fix completeness verified: All bot-posted comment strings containing command triggers are now escaped across both suggest_docs.py and comments.py. The one remaining unescaped reference (line 420 in suggest_docs.py) goes to print() (Actions log), not a GitHub comment, so it cannot re-trigger the workflow.

Autonomy readiness: The review agent was the sole reviewer and correctly approved. The human author (repo owner) merged within 1 minute of bot approval with no additional review. This is positive autonomy evidence for small, clear bug fixes with strong precedent (PR #50).

Evidence supporting existing open issues

  • agents#280: The review comment was a bare "Looks good to me" despite the sub-agents performing meaningful analysis — the correctness sub-agent verified the escaping approach, the security sub-agent confirmed no injection risk, and the challenger evaluated and adjudicated findings. None of this reasoning was visible in the posted comment. A human reviewer seeing "Looks good to me" has no evidence the agent actually checked anything.

  • agents#715: The challenger pass suppressed a security medium finding (removed as duplicate) and downgraded a style finding from low to info, but the review output was indistinguishable from a review that found nothing at all. The review should have disclosed that findings were evaluated and overridden.

No new proposals

All identified improvement opportunities are already tracked by existing open issues. The workflow functioned correctly — the right verdict was reached with no rework needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready-for-merge All reviewers approved — ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant