Repository navigation
fix(engine): stop the first packet's engine data leaking into batch children - #3963
Merged
Merged
Conversation
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.
Closes #3962
What
PacketEngineData::applySeed( $engine, $seed ). It overlays the packet seed exactly like before (array_replace_recursive) and records the changes underpacket_seed_restore: the top-level keys it set and the prior values of keys that already existed. When seeding repeats on a retry, the first recorded prior values are kept.PacketEngineData::withoutSeed( $engine )reverses it: restores prior values, drops seed-only keys, and removes the record.StepLifecycleHandlerseeds throughapplySeed().PipelineBatchScheduler::createChildJob()runs the cloned parent snapshot throughwithoutSeed()before merging the child's own_engine_data.Single-packet runs behave as before: the parent still carries its item context. Only fan-out children change. They now start from the pre-seed parent plus their own packet, instead of the first packet's leftovers.
Why
Flow 952 on the events site has a first Wix packet that is a cancelled placeholder. That packet's
eventStatus: EventCancelledreached all 89 children, so every upcoming show was refused as cancelled even though it'sSCHEDULEDupstream. Any optional per-item field can leak the same way.Tests
tests/Unit/Core/PacketEngineDataSeedTest.php: seed recording, exact restore, retry keeps first prior, no-op when unseeded.PipelineBatchSchedulerTest::test_children_do_not_inherit_first_packets_seeded_engine_data: two packets, the first carrying an extra key. The second child must not inherit it.Written by Extra Chill Bot (AI agent) on behalf of Chris Huber.