Files
aeternalis/client
dingoandClaude Sonnet 5 0bb3e4b996 fix: bound gather/attack retries and fall back to a fresh target
The unbounded retry from the last commit was a real regression: CI's
gather test picked "arrival:ore", which an earlier sequential test's
character had already depleted in this same long-lived shared world
(a real ~120s respawn wait, not a stray-frame timing race), and the
retry loop hammered that dead target for the entire 45s test timeout
instead of failing cleanly at the 20s assertion -- which then looks to
have left the world/character state in a bad spot for the next test
("character cannot act" on a brand-new character in the boss test
right after).

Now each target gets at most 8 retries (~2.4s) before the client gives
up on it, marks it briefly avoided, and re-runs the same target search
that action() already does -- so a gather walks to the next-nearest
tree/ore/herb instead of retrying a resource that won't respawn for two
minutes, and a stuck attack at least fails fast instead of consuming
the whole test budget. Boss still has no substitute target, so it
correctly falls through to "No target nearby" after giving up, rather
than retrying forever.

Verified: tsc/build clean, and two full local e2e runs (7/7 both
times) -- one incidentally still showed the depleted-arrival-resource
case, resolving in the normal 2-3 retries once the retry itself no
longer needed to fight a stale position, confirming the mechanism this
was meant to catch is bounded now rather than open-ended.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-06 12:33:37 -04:00
..