Skip to content

fix(grandexchange): bound quantity entry retries - #1852

Closed
RLitePlus wants to merge 1 commit into
chsami:developmentfrom
RLitePlus:fix/grand-exchange-quantity-retries
Closed

fix(grandexchange): bound quantity entry retries#1852
RLitePlus wants to merge 1 commit into
chsami:developmentfrom
RLitePlus:fix/grand-exchange-quantity-retries

Conversation

@RLitePlus

Copy link
Copy Markdown

Problem

Grand Exchange offer processing could stall indefinitely when the custom quantity button was temporarily unavailable because that retry path bypassed the existing attempt limit.

Solution

Limit quantity entry to three attempts, stop immediately once the requested quantity is observed, and return failure cleanly when the attempts are exhausted.

Additional notes

  • Local regression tests passed for unavailable-button exhaustion and successful quantity entry.
  • Compilation and checkstyle passed.
  • Test files are not included in this pull request.
  • No version bump is required for this core utility fix.

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: d6d88e19-5dda-4de7-9195-4a940d1983f5

📥 Commits

Reviewing files that changed from the base of the PR and between aebc5f7 and 290802b.

📒 Files selected for processing (2)
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/grandexchange/GrandExchangeWidget.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/grandexchange/Rs2GrandExchange.java

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


Walkthrough

The setQuantity retry loop now uses a package-private retryQuantity helper with an IntSupplier for the current quantity and a Runnable for each attempt. The helper performs up to three attempts and returns whether the target quantity was reached. Failed updates log an error and close the exchange. The widget class has no functional change.

Merge Risk: ⚪ Minimal · up to 29080

Grand Exchange quantity entry now stops after three unsuccessful attempts rather than stalling indefinitely, while successful updates still complete when the requested quantity is observed. No current merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: limiting Grand Exchange quantity-entry retries.
Description check ✅ Passed The description directly explains the indefinite-stall problem and the three-attempt retry solution.
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.
  • Fix all pre-merge checks with AI

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

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

@RLitePlus

Copy link
Copy Markdown
Author

no

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