fix(get_path): bump default max_attempts + env-var override#369
Open
rasdani wants to merge 1 commit into
Open
Conversation
GetPath.__call__ polls the async path-handle with exponential backoff (50ms → 1s cap). The old 10-attempt default gave ~6.5s wall-clock budget, which is not enough on a fresh world: the first distant `move_to` has to wait for Factorio's chunk-generation before A* can even start, and chunk-gen routinely exceeds 6.5s. Empirically: - 24-task gpt-5.4 throughput eval at the 10-attempt default: 12/129 tool messages (~9.3%) raised "Path request timed out after 10 attempts", always on the first distant move_to of each rollout. - 6-task Sonnet-4.5 eval at a 30-attempt client-side patch: 2/229 (~0.9%). - 1-task gpt-4o eval at 60-attempt: 1/40 (~2.5%). Bumping the default to 120 (~115s wall-clock budget). Override with `FLE_GETPATH_MAX_ATTEMPTS=N` when running on slower hardware, or lower it explicitly if failing fast on unreachable targets matters more than tolerating cold chunks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GetPath.call polls the async path-handle with exponential backoff (50ms → 1s cap). The old 10-attempt default gave ~6.5s wall-clock budget, which is not enough on a fresh world: the first distant
move_tohas to wait for Factorio's chunk-generation before A* can even start, and chunk-gen routinely exceeds 6.5s.Empirically:
Bumping the default to 120 (~115s wall-clock budget). Override with
FLE_GETPATH_MAX_ATTEMPTS=Nwhen running on slower hardware, or lower it explicitly if failing fast on unreachable targets matters more than tolerating cold chunks.