Give the furnace crafting game tests a larger tick budget - #241
Merged
Merged
Conversation
testItemsCraftIngotsAndExtractFromStorage and its same-network variant smelt eight ingots one at a time, and no longer fit in their budget on the CI runners. An unmodified master-1.21-lts run fails on the first of them, leaving one raw iron in the input chest. The cost per craft is machine dependent: both tests succeed around tick 1750-2050 locally, while CI does not finish within 4000, completing five to seven of the eight crafts, so roughly 570 to 800 ticks per craft against a 200-tick vanilla smelt. The budget goes to 10000 ticks, which covers the slowest run observed with room to spare. Passing tests are unaffected, as succeedWhen stops as soon as the assertion holds. That the tick cost varies with machine speed at all suggests crafting progress is partly wall-clock bound, which is worth investigating separately. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Nb7EmAYd4R7RYWjmc17e6L
rubensworks
commented
Sep 17, 2026
rubensworks
commented
Sep 17, 2026
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.
Problem
master-1.21-ltsis currently red on its own. Re-running the base branch's existing CI run for 417689d unchanged, run 34686805006 attempt 2, fails onrunGameTestServer:Its last green run was on 12 September, so this is the environment moving rather than a code change.
Measurements
testItemsCraftIngotsAndExtractFromStorageandtestItemsCraftIngotsAndExtractFromStorageSameNetworksmelt eight ingots one at a time undertimeoutTicks = TIMEOUT * 2, so 4000 ticks.I instrumented both with
helper.getTick()and ran the suite three times locally (instrumentation not committed):...ExtractFromStorage...SameNetworkSo locally they finish around tick 1750-2050, comfortably inside 4000.
On CI they do not finish within 4000 at all. Reading the leftovers in the failure messages, the runs completed five to seven of the eight crafts, which puts them at roughly 570 to 800 ticks per craft and extrapolates to 4600-6400 ticks needed, against roughly 240 per craft locally.
Fix
Raise both tests to
TIMEOUT * 5, so 10000 ticks. That covers the slowest run extrapolated above with room to spare, and costs nothing when tests pass, sincesucceedWhenreturns as soon as the assertion holds. The full suite still completes in about 15 seconds locally.What this does not fix
A tick budget is wall-clock independent by construction, so the per-craft tick cost varying by more than 2x between my machine and the runner is itself the interesting part. It suggests crafting progress is partly wall-clock bound, so that a slower server advances fewer crafting operations per game tick. This PR only stops the suite being red; that behaviour is worth a separate look, and I have not touched it here.
Testing
./gradlew buildpasses../gradlew runGameTestServer: all 76 tests pass.Related: #240 inherits this failure, and is otherwise unaffected by it.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Nb7EmAYd4R7RYWjmc17e6L
Generated by Claude Code