Skip to content

Fix Break Handler V2 pause break completion - #1858

Open
MuffinKid23 wants to merge 1 commit into
chsami:developmentfrom
MuffinKid23:codex/fix-breakhandler-v2-pause-loop
Open

Fix Break Handler V2 pause break completion#1858
MuffinKid23 wants to merge 1 commit into
chsami:developmentfrom
MuffinKid23:codex/fix-breakhandler-v2-pause-loop

Conversation

@MuffinKid23

Copy link
Copy Markdown

Summary

  • keep Break Handler V2 ticking when its own no-logout break pauses scripts globally
  • allow pre-break plugin-stop pause state to continue to the requested break
  • add unit coverage for script guard bypass decisions

Why

No-logout breaks call Microbot.pauseAllScripts.set(true) while the Break Handler still needs to tick until breakEndTime. The next scheduler tick can hit super.run() == false, return early, and leave the break stuck in the requested/paused state instead of completing and rescheduling timers.

Testing

  • ./gradlew.bat :client:compileJava :client:compileTestJava --no-daemon --console=plain
  • ./gradlew.bat :client:test --tests "net.runelite.client.plugins.microbot.breakhandler.breakhandlerv2.BreakHandlerV2DeferralTest" --no-daemon --console=plain (build successful; :client:test is skipped by the current Gradle configuration after compiling test classes)

@coderabbitai

coderabbitai Bot commented Sep 6, 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: 55bdf360-bd4f-4536-b09b-064aac15cf36

📥 Commits

Reviewing files that changed from the base of the PR and between 4294b71 and ccbc26a.

📒 Files selected for processing (2)
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/breakhandler/breakhandlerv2/BreakHandlerV2Script.java
  • runelite-client/src/test/java/net/runelite/client/plugins/microbot/breakhandler/breakhandlerv2/BreakHandlerV2DeferralTest.java

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


Walkthrough

The break handler version changes from 2.0.6 to 2.0.7. The script guard now continues processing selected break states while scripts are paused. WAITING_FOR_BREAK continues only after a plugin stop triggered the pause. New tests cover active breaks, normal waiting, pre-break plugin stops, and unpaused scripts.

Merge Risk: ⚪ Minimal · up to ccbc2

Break handling can now complete and reschedule paused breaks while preserving normal waiting and unpaused-script guard behavior. No concrete current-head merge risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 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: fixing Break Handler V2 pause-break completion.
Description check ✅ Passed The description directly matches the changes. It explains the pause behavior, the pre-break plugin-stop case, the added tests, and the test limitations.
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.

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