Fix two bugs causing intermittent crafting failures when merging jobs with shared recipe dependencies#185
Draft
Copilot wants to merge 3 commits intomaster-1.21-ltsfrom
Draft
Conversation
Copilot
AI
changed the title
[WIP] Investigate intermittent game test failure for crafting items
Investigate flaky testItemsCraftFencesDoorsConcurrent game test
Feb 28, 2026
Co-authored-by: rubensworks <440384+rubensworks@users.noreply.github.com>
Copilot
AI
changed the title
Investigate flaky testItemsCraftFencesDoorsConcurrent game test
Fix intermittent concurrent crafting test failure caused by lost dependents during job merge
Feb 28, 2026
Copilot
AI
changed the title
Fix intermittent concurrent crafting test failure caused by lost dependents during job merge
Fix orphaned dependency jobs leaking ingredients when merging crafting jobs
Feb 28, 2026
…ndents Co-authored-by: rubensworks <440384+rubensworks@users.noreply.github.com>
Copilot
AI
changed the title
Fix orphaned dependency jobs leaking ingredients when merging crafting jobs
Fix CraftingJobDependencyGraph deserialize reading wrong tag for dependents
Mar 1, 2026
Copilot
AI
changed the title
Fix CraftingJobDependencyGraph deserialize reading wrong tag for dependents
Fix two bugs causing intermittent crafting failures when merging jobs with shared recipe dependencies
Mar 1, 2026
Copilot stopped work on behalf of
rubensworks due to an error
March 1, 2026 09:34
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.
When two crafting plans share a sub-recipe (e.g. both fences and doors needing planks, where planks are also needed for sticks), merging the duplicate plank jobs left dependent jobs orphaned and deserialized the dependency graph incorrectly on world reload.
Fixes
Transfer dependents on job merge (
CraftingJobDependencyGraph.mergeCraftingJobs): WhenmergeCraftingJobs(target, mergee, true)is called, the mergee's dependents (e.g.SticksJobwhich depended on the mergedPlanksForSticksjob) were never transferred totarget. As a result, crafted output fromtargetbypassed those jobs and flowed directly to network storage instead of their buffers, stalling the crafting chain. The fix transfers all graph-level and job-level dependent links from mergee to target beforeonCraftingJobFinishedremoves the mergee.Fix deserialization tag key (
CraftingJobDependencyGraph.deserialize): Thedependentsmap was deserialized from the"dependencies"NBT tag instead of"dependents", causingdependencies == dependentsafter every world load and corrupting crafting job routing on restart.💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.