Skip to content

fix: prevent infinite bot comment loop#62

Merged
Kavirubc merged 2 commits intosimiligh:mainfrom
mahsumaktas:fix/bot-comment-loop-prevention
Feb 15, 2026
Merged

fix: prevent infinite bot comment loop#62
Kavirubc merged 2 commits intosimiligh:mainfrom
mahsumaktas:fix/bot-comment-loop-prevention

Conversation

@mahsumaktas
Copy link
Copy Markdown
Contributor

@mahsumaktas mahsumaktas commented Feb 14, 2026

Summary

Fixes the infinite comment loop where gh-simili-bot posts 20+ duplicate triage reports on the same issue/PR (~1 per minute).

Root Cause

Marker mismatch — the bot could never recognize its own comments:

Component What it does
response_builder.go Writes ### Simili Triage Report
command_handler.go Checks for 🤖 Simili Triage Report

The emoji 🤖 was never in the output, so the self-detection always failed → every bot comment triggered a new workflow run → new comment → infinite loop.

Fix: Defense-in-Depth (4 Layers)

Layer Where What
1. Hidden HTML marker response_builder.go Prepends <!-- simili-bot-report --> to every triage comment
2. Multi-marker detection command_handler.go New isBotComment() checks HTML marker + legacy emoji + plain-text header
3. Author-based filtering gatekeeper.go + command_handler.go New isBotAuthor() checks [bot] suffix, gh-simili prefix, and configurable bot_users list
4. Config-driven bot_users config.go New bot_users YAML field for environments using PAT tokens (no [bot] suffix)

Why 4 layers?

  • Marker alone is fragile — someone could edit the comment body
  • Author alone is fragile — PAT tokens don't get [bot] suffix
  • Config alone is incomplete — users forget to configure
  • Together they're robust — any single layer stops the loop

Additional Fix

pr_comment events were not handled in command_handler's self-detection branch. Now issue_comment and pr_comment both go through the same path.

Config Example

For environments using a PAT token instead of a GitHub App:

bot_users:
  - "my-bot-account"
  - "another-automation"

Files Changed

File Lines Change
response_builder.go +3 Add HTML marker to triage report header
command_handler.go +23/-5 isBotComment(), author check, pr_comment support
gatekeeper.go +31 isBotAuthor(), early exit for bot events
config.go +5 BotUsers field

Testing

  • go build ./...
  • go vet ./...
  • go test ./... ✅ (all packages pass)

Summary by CodeRabbit

  • New Features

    • Config option to list GitHub usernames to ignore (prevents comment-looping).
    • Bot-generated reports now include an invisible marker to allow reliable detection.
  • Bug Fixes

    • More robust bot/comment detection using multiple markers and author checks.
    • Events and commands from detected bot authors or bot-generated comments are skipped to prevent unintended processing.

The bot was posting duplicate triage reports in an infinite loop because:

1. Response builder wrote '### Simili Triage Report' but command_handler
   checked for '🤖 Simili Triage Report' — marker mismatch meant the
   bot never recognized its own comments
2. No author-based filtering existed — even if the marker worked,
   relying solely on body content is fragile
3. pr_comment events were not handled in command_handler's self-detection

Defense-in-depth fix (4 layers):

Layer 1 — Hidden HTML marker:
  Response builder now prepends '<!-- simili-bot-report -->' to every
  triage comment. This marker survives title rewording.

Layer 2 — Multi-marker detection (isBotComment):
  Checks for HTML marker, legacy emoji marker, AND plain-text header.
  Used in command_handler and history analysis.

Layer 3 — Author-based filtering (isBotAuthor):
  Gatekeeper and command_handler both check if the comment author is
  a known bot (heuristic: '[bot]' suffix, 'gh-simili' prefix, or
  user-configured bot_users list in config).

Layer 4 — Config-driven bot_users list:
  Users can add custom bot usernames to 'bot_users' in simili.yaml
  for environments using PAT tokens (which don't have '[bot]' suffix).

Also fixes: pr_comment events now go through the same self-detection
path as issue_comment events.

Signed-off-by: Mahsum Aktas <mahsum@mahsumaktas.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 14, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Added configurable bot user list and multi-marker bot-detection across Gatekeeper, CommandHandler, and response generation; injected a hidden HTML marker into triage summaries to reliably identify bot-generated comments and prevent self-triggered processing loops.

Changes

Cohort / File(s) Summary
Configuration
internal/core/config/config.go
Added public BotUsers []string field (yaml:"bot_users") to Config to list GitHub usernames whose events should be ignored (used alongside built-in heuristics).
Gatekeeper / Author Guard
internal/steps/gatekeeper.go
Added isBotAuthor(author, configBotUsers) helper and early-exit in Run to skip events from detected bot authors (heuristics + configured list).
Command Handling / Comment Detection
internal/steps/command_handler.go
Added isBotComment helper (hidden HTML marker, emoji, plain header), extended Run to handle issue_comment and pr_comment, and updated history/undo logic to treat bot comments accordingly and skip processing when detected.
Response Generation
internal/steps/response_builder.go
Prepends hidden HTML marker <!-- simili-bot-report --> before the visible "### Simili Triage Report" header to allow reliable detection of bot-generated summaries.

Sequence Diagram(s)

sequenceDiagram
    participant Event as Incoming Event\n(issue_comment / pr_comment)
    participant Gate as Gatekeeper
    participant Config as Config
    participant Handler as CommandHandler
    participant Builder as ResponseBuilder

    Event->>Gate: Deliver event with author + body
    activate Gate
    Gate->>Config: Read BotUsers
    Gate->>Gate: isBotAuthor(author, BotUsers)?
    alt bot author
        Gate-->>Event: Log and skip event
    else not bot
        Gate-->>Handler: Forward event
    end
    deactivate Gate

    activate Handler
    Handler->>Handler: isBotComment(body)?
    alt bot comment
        Handler-->>Event: Log and skip processing
    else user comment
        Handler->>Handler: Process commands (e.g., /undo)
        Handler->>Handler: Scan history using isBotComment to find prior transfers
        Handler->>Builder: Build any response
    end
    deactivate Handler

    activate Builder
    Builder->>Builder: buildTriageSummary()
    Builder->>Builder: Prepend <!-- simili-bot-report --> then visible header
    Builder-->>Event: Post response (contains hidden marker)
    deactivate Builder
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • fix: prevent infinite bot comment loop #62: Implements the same set of changes (Config.BotUsers, isBotComment/isBotAuthor helpers, hidden HTML marker, and unified pr_comment handling) and appears directly related.

Poem

🐰 I hid a note where humans peep,
a tiny mark to guard my sleep.
Bot names listed, loops undone,
now comments stop when chores are done.
Hooray — no endless chat, just hops and fun! 🥕✨

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: prevent infinite bot comment loop' clearly and concisely summarizes the main objective of the changeset: preventing the bot from repeatedly commenting on itself by implementing multiple bot-detection mechanisms.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 8.8/10 (Good)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • Missing explicit numbered reproduction steps
  • No specific environment details
  • Add a dedicated 'Steps to Reproduce' section, even if it's just 'Run the bot on an issue/PR'
  • Include details about the bot's deployment environment or relevant GitHub platform version
Similar Threads
Similarity Thread Status
81% #41 fix: PR triage review feedback (synchronize tri... Open
81% #25 fix: resolve issue transfer loop and enhance si... Open
80% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 9.5/10 (Excellent)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • No direct link to an example issue/PR where the loop occurred
  • No mention of the specific GitHub Actions workflow file that runs the bot
  • Add a link to an example issue/PR affected by the infinite loop
  • Specify the GitHub Actions workflow file name (e.g., '.github/workflows/simili-triage.yml')
Similar Threads
Similarity Thread Status
81% #41 fix: PR triage review feedback (synchronize tri... Open
81% #25 fix: resolve issue transfer loop and enhance si... Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 9.5/10 (Excellent)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • No explicit environment details
  • Specify the bot's deployment environment or version if relevant
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@internal/core/config/config.go`:
- Around line 46-50: mergeConfigs currently fails to preserve parent BotUsers
when a child config uses extends; update mergeConfigs to merge the BotUsers
slice from the parent into the child (similar to how other list fields are
handled) by appending parent.BotUsers into cfg.BotUsers and deduplicating
entries (or preserving order) so inherited bot usernames are retained; reference
the BotUsers field on the config struct and the mergeConfigs function to locate
where to add this merge logic.
🧹 Nitpick comments (1)
internal/steps/command_handler.go (1)

33-40: Centralize bot markers to prevent drift.

The markers are duplicated across files; consider defining shared constants in steps and using them in both isBotComment and ResponseBuilder to avoid future mismatch.

♻️ Suggested refactor
@@
-import (
+import (
 	"fmt"
 	"log"
 	"strings"
@@
 )
+
+const (
+	botReportMarker = "<!-- simili-bot-report -->"
+	botReportEmoji  = "🤖 Simili Triage Report"
+	botReportHeader = "### Simili Triage Report"
+)
@@
 func isBotComment(body string) bool {
-	return strings.Contains(body, "<!-- simili-bot-report -->") ||
-		strings.Contains(body, "🤖 Simili Triage Report") ||
-		strings.Contains(body, "### Simili Triage Report")
+	return strings.Contains(body, botReportMarker) ||
+		strings.Contains(body, botReportEmoji) ||
+		strings.Contains(body, botReportHeader)
 }

And update internal/steps/response_builder.go to use botReportMarker when building the header.

Comment on lines +46 to +50

// BotUsers is a list of GitHub usernames whose events should be ignored
// to prevent infinite comment loops. Built-in heuristics (e.g. "[bot]" suffix,
// "gh-simili" prefix) always apply in addition to this list.
BotUsers []string `yaml:"bot_users,omitempty"`
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Merge BotUsers during config inheritance.

BotUsers is added on Line 46, but mergeConfigs doesn’t copy it, so parent bot_users will be lost when using extends. This can re-enable the comment loop in inherited configs. Consider merging it the same way you handle other list overrides.

🛠️ Proposed fix (mergeConfigs)
@@
 	// Repositories: child completely overrides if non-empty
 	if len(child.Repositories) > 0 {
 		result.Repositories = child.Repositories
 	}
+
+	// BotUsers: child overrides if non-empty
+	if len(child.BotUsers) > 0 {
+		result.BotUsers = child.BotUsers
+	}
🤖 Prompt for AI Agents
In `@internal/core/config/config.go` around lines 46 - 50, mergeConfigs currently
fails to preserve parent BotUsers when a child config uses extends; update
mergeConfigs to merge the BotUsers slice from the parent into the child (similar
to how other list fields are handled) by appending parent.BotUsers into
cfg.BotUsers and deduplicating entries (or preserving order) so inherited bot
usernames are retained; reference the BotUsers field on the config struct and
the mergeConfigs function to locate where to add this merge logic.

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 9.0/10 (Excellent)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • Missing specific environment details
  • No direct link to an example occurrence
  • Specify the GitHub environment (e.g., Cloud, Enterprise)
  • Provide a link to an issue/PR where this behavior was observed
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 9.8/10 (Excellent)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • Missing explicit reproduction steps
  • Missing environment details
  • Add explicit reproduction steps for clarity (e.g., 'Trigger bot by X')
  • Specify environment details (e.g., GitHub platform, runner OS/version)
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 9.2/10 (Excellent)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • No explicit step-by-step reproduction guide
  • Missing specific environment details (e.g., bot version, specific repository/workflow)
  • For future bug reports, include explicit steps to reproduce the issue if applicable
  • Specify the exact environment (e.g., bot version, GitHub Actions runner version, repository context) where the issue was observed
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 9.0/10 (Excellent)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • Missing specific links to affected GitHub issues/PRs
  • Missing explicit environment details
  • Include links to specific issues/PRs where the loop was observed
  • Specify the bot's operating environment (e.g., GitHub.com, GitHub Enterprise version)
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 9.5/10 (Excellent)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • No direct links to affected issues/PRs demonstrating the loop
  • Environment details (e.g., specific workflow name) are implied but not explicitly stated
  • Add links to one or more issues/PRs where the infinite loop was observed
  • Explicitly mention the GitHub Actions workflow (e.g., 'simili-triage.yml') where this bot runs
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot gh-simili-bot added the triage Label for incoming issues label Feb 14, 2026
@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 8.8/10 (Good)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • Missing specific environment details
  • Explicit step-by-step reproduction instructions are not provided
  • Specify the exact environment where the bot is deployed and the loop was observed (e.g., GitHub Actions runner version, specific repository context)
  • Optionally, include a link to an example issue/PR where the infinite loop occurred
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 8.8/10 (Good)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • Missing specific bot version or deployment environment details
  • No direct link to an example issue/PR where the loop occurred
  • Specify the bot version or deployment environment (e.g., GitHub Cloud, Enterprise) where this bug was observed.
  • If possible, include a link to an issue or pull request where the infinite loop manifested.
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 9.5/10 (Excellent)
The issue is well-described.

Classification

Category Value
Labels
Quality Improvements
  • Consider adding a link to an example issue/PR where this behavior was observed for additional context.
  • While not strictly necessary for this type of logic bug, explicitly stating the GitHub Actions runner environment (e.g., 'ubuntu-latest') could be a minor completeness improvement.
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 9.0/10 (Excellent)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • Missing specific bot version
  • No explicit GitHub Actions runner environment details
  • Specify the bot version where the bug was observed
  • Mention the GitHub Actions runner environment (e.g., ubuntu-latest)
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 8.8/10 (Good)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • No direct link to an example of the infinite loop occurring
  • No specific environment details (e.g., bot version, GitHub Actions runner version)
  • Add a link to an issue or PR where the bot exhibited the infinite loop behavior
  • Specify the bot version or the GitHub Actions environment details where this bug was observed
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 9.5/10 (Excellent)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • No direct link to an affected issue/PR where the loop occurred
  • Bot version not explicitly stated
  • Provide a link to an example issue or PR demonstrating the infinite loop
  • Mention the specific version of the bot that exhibited this behavior
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 9.5/10 (Excellent)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • No explicit environment details (e.g., bot version, specific GitHub instance if applicable)
  • Consider including specific environment details if the bot operates in varied setups, though less critical for this logic bug
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 9.5/10 (Excellent)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • No specific environment details (e.g., bot version, specific workflow run ID where the loop occurred)
  • No raw error logs provided (though the root cause explanation is very thorough)
  • For future bug reports, include specific environment details or links to affected runs/repositories
  • For future bug reports, provide relevant log snippets if available
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 9.5/10 (Excellent)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • Missing specific bot version
  • Missing GitHub environment details
  • Specify the bot version if relevant
  • Indicate if the issue occurred on GitHub.com or GitHub Enterprise
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 9.5/10 (Excellent)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • Lacks explicit, numbered reproduction steps
  • No specific environment details (e.g., bot version, runtime environment)
  • Add a simple, explicit reproduction step for clarity, even if implied
  • Include relevant environment context, such as the bot version or GitHub Actions runner details
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 8.8/10 (Good)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • No explicit environment details
  • No raw error logs provided
  • Consider adding environment details if relevant (e.g., GitHub Actions runner type)
  • If applicable, include specific log snippets or links to workflow runs exhibiting the behavior
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 8.5/10 (Good)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • No explicit environment details
  • Specify the environment where the bot runs (e.g., GitHub Actions runner version, self-hosted vs. cloud) if there are variations that could impact the fix.
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 8.8/10 (Good)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • No direct link to an affected issue/PR demonstrating the loop
  • No specific examples (e.g., screenshots or text snippets) of the 20+ duplicate comments
  • Provide a link to an example issue/PR where the infinite loop occurred
  • Include a snippet or screenshot of the duplicate comments for visual confirmation
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 9.0/10 (Excellent)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • No explicit reproduction steps
  • Missing specific environment details
  • Add explicit reproduction steps for future bug reports
  • Include relevant environment details (e.g., GitHub Actions runner version, language runtime) if applicable
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 9.5/10 (Excellent)
The issue is well-described.

Classification

Category Value
Labels
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 8.8/10 (Good)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • Missing explicit environment details (e.g., bot version, GitHub environment)
  • No specific error logs (though the problem is a logical loop, not a crash)
  • Specify the bot version or deployment environment if relevant
  • If any logs did show the repeated actions, include snippets
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 9.2/10 (Excellent)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • No explicit environment details (e.g., GitHub Actions runner version)
  • No direct error logs (though the problematic comments serve as the error manifestation)
  • If relevant, specify the environment where the bot runs (e.g., GitHub Actions runner version)
  • If any internal logs were generated before the infinite loop, mentioning them could add value
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 9.2/10 (Excellent)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • No explicit step-by-step reproduction instructions
  • Lack of specific environment details (e.g., workflow run IDs, specific repository context if not obvious)
  • Provide explicit reproduction steps (e.g., 'Trigger the bot by X, observe Y')
  • Include any relevant environment details that could aid debugging or context
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 8.8/10 (Good)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • Implicit reproduction steps (could be more explicit)
  • Missing specific bot version or action run details
  • No link to an example occurrence (if applicable)
  • Add a dedicated 'Steps to Reproduce' section, even if simple
  • Include the bot's version or the GitHub Action run ID where the issue was observed
  • Provide a link to an issue/PR where the infinite loop occurred, if publicly accessible
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 9.5/10 (Excellent)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • Missing explicit environment details (e.g., bot version, specific GitHub setup)
  • Add specific bot version or deployment environment details if relevant for future debugging or context
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 9.5/10 (Excellent)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • No explicit environment details
  • Consider adding specific environment details (e.g., GitHub Actions runner OS/version) if relevant for debugging.
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 9.5/10 (Excellent)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • Bot version not specified
  • Include the specific bot version or deployment context if known
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 9.5/10 (Excellent)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • Missing explicit environment details
  • No direct error logs provided
  • Include details about the GitHub environment (e.g., GitHub.com, GHE version) if relevant
  • If available, add relevant log snippets that show the bot's incorrect behavior or related errors, although the root cause is very well explained here
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 8.8/10 (Good)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • Missing explicit reproduction steps
  • Missing environment details (e.g., bot version, GitHub Actions runner)
  • While the root cause explains the bug's manifestation, adding formal 'Steps to Reproduce' could further enhance completeness.
  • Specify any relevant environment details, such as the bot's deployed version or the GitHub Actions runner environment where the loop occurred.
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 9.2/10 (Excellent)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • No explicit reproduction steps (though root cause is clear)
  • Missing specific bot version or deployment environment details
  • Consider adding explicit steps to observe the infinite loop before the fix (if easily reproducible)
  • Specify the bot version or the environment where this issue was observed
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 9.5/10 (Excellent)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • No direct links to relevant code files
  • Add direct links to the mentioned code files (e.g., response_builder.go) for quick navigation
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 9.5/10 (Excellent)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • Missing specific bot version or GitHub Actions runner details
  • Include the bot's version and relevant GitHub Actions runner environment details
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 8.8/10 (Good)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • No explicit environment details
  • Reproduction steps are implicit
  • Add explicit environment details (e.g., GitHub Actions runner OS)
  • Provide explicit step-by-step reproduction instructions for clarity
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 8.8/10 (Good)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • Missing a direct link to an example issue/PR demonstrating the infinite loop
  • Environment details (e.g., specific GitHub Action runner, bot version) are not explicitly stated
  • Include a link to an affected GitHub issue or PR for direct observation of the bug
  • Specify the operational environment of the bot (e.g., GitHub Action runner OS, bot version)
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri... Open
82% #28 Similar Issue Open

Generated by Simili Bot

@Kavirubc Kavirubc merged commit eb3c118 into similigh:main Feb 15, 2026
4 of 5 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in simili-bot-v1-release Feb 15, 2026
@gh-simili-bot
Copy link
Copy Markdown
Contributor

Simili Triage Report

Note

Quality Score: 8.8/10 (Good)
The issue could be improved. See suggestions below.

Classification

Category Value
Labels
Quality Improvements
  • Missing explicit reproduction steps
  • No specific environment details
  • Add explicit steps to reproduce the infinite loop
  • Specify bot version and GitHub Actions runner environment
Similar Threads
Similarity Thread Status
84% #41 fix: PR triage review feedback (synchronize tri...
82% #28 Similar Issue

Generated by Simili Bot

Kavirubc added a commit that referenced this pull request Feb 17, 2026
The gatekeeper's bot-author check was only effective for issue_comment
events because CommentAuthor was only set from comment.user.login.
For pull_request.edited (and other PR) events the field stayed empty,
causing the guard `if ctx.Issue.CommentAuthor != ""` to short-circuit
and skip the isBotAuthor check entirely.

As a result, bot-triggered pull_request.edited events (e.g. coderabbitai
updating a PR review) passed through the gatekeeper and re-ran the triage
pipeline, posting duplicate triage comments and labels (#62 fix partial).

Fix: fall back to sender.login in enrichIssueFromGitHubEvent when
CommentAuthor is not already set. sender is present in all GitHub webhook
payloads and correctly identifies who triggered the event, giving the
gatekeeper full coverage across all event types.

Signed-off-by: Kavirubc <hapuarachchikaviru@gmail.com>
Kavirubc added a commit that referenced this pull request Feb 17, 2026
The gatekeeper's bot-author check was only effective for issue_comment
events because CommentAuthor was only set from comment.user.login.
For pull_request.edited (and other PR) events the field stayed empty,
causing the guard `if ctx.Issue.CommentAuthor != ""` to short-circuit
and skip the isBotAuthor check entirely.

As a result, bot-triggered pull_request.edited events (e.g. coderabbitai
updating a PR review) passed through the gatekeeper and re-ran the triage
pipeline, posting duplicate triage comments and labels (#62 fix partial).

Fix: fall back to sender.login in enrichIssueFromGitHubEvent when
CommentAuthor is not already set. sender is present in all GitHub webhook
payloads and correctly identifies who triggered the event, giving the
gatekeeper full coverage across all event types.

Signed-off-by: Kavirubc <hapuarachchikaviru@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation bot bug Something isn't working fix maintenance reliability triage Label for incoming issues

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

3 participants