Repository navigation
fix(world-hop): call hopToWorld once per attempt in Rs2WorldUtil.hopWorld - #1946
Conversation
…orld hopWorld wrapped Microbot.hopToWorld in sleepUntil(..., 6000), so a hop that failed fast (combat, dialogue, an invalid world) was retried on every poll for six seconds, logging an error each time. The isHopping and world checks that follow already handle a failed hop and drive the backoff retries, so call it once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LjtEMzQHGuq4M1Mpqk9pPV
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
Calling hopToWorld once lost the old polling's retry when the hop was refused only because the game was briefly LOADING. Wait up to six seconds for the player to be logged in before the attempt, and drop a stray empty statement. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LjtEMzQHGuq4M1Mpqk9pPV
Problem
Rs2WorldUtil.hopWorldcalledMicrobot.hopToWorldas the condition ofsleepUntil(..., 6000). A hop that failed fast was refused again on every poll for six seconds, about 140 calls per attempt in the unit test, each logging an error. Reasons for failing fast include combat, dialogue, an invalid world, orcantHopWorld. The 6s bound also meant nothing oncehopToWorldblocks: it waits up to 15s to land, and longer for the hop limit from #1942.Change
Call
Microbot.hopToWorld(world)once per attempt. TheisHoppingand world checks that follow already handle a failed hop and drive the backoff retries.The old polling also happened to retry a hop refused only because the game was briefly
LOADING, for example after a region load. To keep that,hopWorldnow waits up to 6s for the player to be logged in before the single call. It also drops a stray empty statement.Removing the lambda renumbers the remaining one in
hopWorld, so its existing client-thread guardrail baseline entry moves fromlambda$hopWorld$8tolambda$hopWorld$7. It is the same violation, not a new one.Nothing in the client or Microbot-Hub calls
hopWorldorhopToNextBestWorldtoday. This came up as a leftover from the #1945 review.Testing
:client:runUnitTests: 2,316 passed, 0 failed. NewRs2WorldUtilHopWorldTest:hopToWorldfailing, two attempts call it exactly twice. On the old code the same test sees 141 calls;Rs2WorldUtil.hopWorldfrom world 301. It hopped on the first attempt and the hop limit counted it once (389 → 388). This was run twice: before the login wait (to 571, 9.6s) and after it (to 335, 8.3s).🤖 Generated with Claude Code
https://claude.ai/code/session_01LjtEMzQHGuq4M1Mpqk9pPV