Skip to content

fix(antiban): stop full inventory from freezing the action cooldown - #2270

Merged
chsami merged 1 commit into
developmentfrom
claude/err-bug-antiban-farming-cooldown-full-inventory
Nov 15, 2026
Merged

chsami merged 1 commit into
developmentfrom
claude/err-bug-antiban-farming-cooldown-full-inventory

Conversation

@chsami

@chsami chsami commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Problem

In-client bug report MB-6MCFX8, reported against the Hub plugin HerbrunPlugin 1.2.3 on client 2.6.57. Still present on development at c6c08fb.

With universal antiban enabled, Herb runner stops at a herb patch once the inventory is full and never continues. The action cooldown starts, the script is paused, and the cooldown never counts down, so the pause is never released. Nothing tells the player why the script is standing still, and the Antiban panel keeps showing the player as busy.

Root cause

SKILLING_FARMING, SKILLING_PRAYER and SKILLING_CONSTRUCTION in Category.java reported the category as busy when Rs2Player.isAnimating() || Rs2Inventory.isFull().

AntibanPlugin.performActionBreak only decrements the cooldown timeout while the category is not busy, and only releases a busy pause for combat categories. A paused script cannot empty its inventory, so a full inventory kept the category busy, the timeout frozen and the scripts paused forever.

Change

Dropped the inventory-full term from those three categories. They are now busy only while the player is animating, so the cooldown counts down once the picking animation ends and the pause is released as usual.

AntibanPlugin.java is unchanged.

Validation

  • Added universalCooldownCountsDownWithFullInventoryInInventorySkillingCategories to Rs2AntibanActionCooldownTest. For farming, prayer and construction with a full inventory it checks that the cooldown holds while animating, then reaches 0, clears actionCooldownActive and releases pauseAllScripts once the animation stops.
  • ./gradlew :client:runUnitTests --tests '*Rs2AntibanActionCooldownTest': BUILD SUCCESSFUL, 15/15 tests passed including the new one.
  • Reviewed by a code reviewer and a player-experience reviewer; both approved.

Known gaps

  • The new test was not run against the unfixed code. By reading, it fails there: with the inventory mocked as full the category stays busy and the timeout never reaches 0.
  • The full unit test suite was not run locally, only the focused test class.
  • Not verified in a running client.
  • The Javadoc on the three changed categories still says the category is busy when the player is animating or the inventory is full. That is no longer true; the same boilerplate was already inaccurate on smithing and hunter and was left as it is.
  • Category.SKILLING (busy whenever the player is not animating or the inventory is not full) is a different inverted check, used only by Activity.KILLING_ZALCANO, and is untouched.
  • Possible sibling of the same class, not confirmed reachable and not addressed here: SKILLING_RUNECRAFT is busy while the inventory contains essence and is reachable through Activity.fromSkill(RUNECRAFT). A cooldown that starts while essence is in the inventory could freeze in the same way. A central alternative would be for AntibanPlugin.performActionBreak to count down whenever scripts are already paused by the cooldown, instead of relying on each category's busy check.

🤖 Generated with Claude Code

The farming, prayer and construction categories counted a full inventory as busy. Under universal antiban the cooldown pauses scripts and only counts down while the category is not busy, so a full inventory held the pause open forever and the paused script could never free a slot.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The farming, prayer, and construction categories now report busy only while the player is animating. A new test checks universal cooldown behavior for these activities with a full inventory. It verifies that cooldowns do not decrement during animation, then reach zero and end after animation stops.

Merge Risk: Minimal · up to 8b675

The change stops a full inventory from keeping farming, prayer, and construction categories busy, so the antiban cooldown can count down and release paused scripts. Impact is narrow and the test covers the changed behavior. Merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the three skilling categories (farming, prayer, construction) stop counting a full inventory as busy, which fixes the frozen action cooldown. It is specific and matche…
Description check Passed The description explains the bug, its root cause in Category.java and AntibanPlugin.performActionBreak, the change to the three categories, the added test, and known gaps. It matches the changeset clo…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the three skilling categories (farming, prayer, construction) stop counting a full inventory as busy, which fixes the frozen action cooldown. It is specific and matches the changeset and the PR objectives.

Full details: Description check

Explanation

The description explains the bug, its root cause in Category.java and AntibanPlugin.performActionBreak, the change to the three categories, the added test, and known gaps. It matches the changeset closely.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 681b0bb4-7ad9-4e26-852e-ab095609c511
Commits

Reviewing files that changed from the base of the PR and between c6c08fb and 8b6758a.

Files selected for processing: 2

  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/antiban/enums/Category.java
  • runelite-client/src/test/java/net/runelite/client/plugins/microbot/util/antiban/Rs2AntibanActionCooldownTest.java

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@chsami
chsami merged commit b10d8bf into development Nov 15, 2026
3 checks passed
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.

1 participant