Skip to content

[Bug] Bot stuck in an infinite retry loop for unit test generation on a closed PR #19

@itvi-1234

Description

@itvi-1234

Hi CodeRabbit Team,

I've encountered a severe edge case where the bot is completely stuck in an infinite loop trying (and failing) to generate unit tests, and it's ignoring all commands to stop.

Context:

Last night, I opened a simple PR (#299 in ioflux-org/studio-json-schema) to add a .coderabbit.yaml configuration file to our repository. Everything seemed normal at first. However, this morning, the bot suddenly started attempting to generate unit tests for the branch.

The Infinite Loop:

Instead of a single attempt, the bot is endlessly looping these two messages every few minutes:

  1. Generating unit tests... This may take up to 20 minutes.
  2. Failed to create PR with unit tests: AGENT_CHAT: Failed to open pull request

What I've tried to stop it (None worked):

I tried multiple ways to break the loop, but all efforts went in vain:

  1. Sent the pause command: I commented @coderabbitai pause (The bot replied ✅ Actions performed, but the loop continued).
  2. Closed the PR completely.
  3. Deleted the source branch (add-coderabbit-yaml) entirely.
  4. The Ultimate Hack: I even reopened the PR, removed the .yaml file, and pushed a dummy mathHelper.ts file with a basic add(a,b) function. My thought process was that if I give the bot an extremely simple logic structure, it might finally successfully generate a test, open the sub-PR, and naturally break the failure loop. Even this didn't work.

Current Status:

The PR is closed, the branch is deleted, yet the bot continues to spam the closed thread with "Generating unit tests... / Failed to create PR".

It looks like the background worker crashed but the retry-queue isn't respecting the pause state or checking if the PR is already closed before aggressively retrying.

Could someone from the backend team look into this and kill that stuck background job? Let me know if you need any more logs from my side!

Repository Details:

  • Repo: ioflux-org/studio-json-schema
  • PR Number: #299

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions