Repository navigation
Test: replacing a descendant recreates the intermediate store and loses its injections (parity with Swift) - #1
Merged
Conversation
…store, as in Swift Pins what survives when a root replaces a grandchild by writing through the middle level (`state.copy(middle = middle.copy(leaf = ...))`): the middle store is recreated (new instance), its state is carried over, and what it injected with `dependencies.inject` is lost. The Swift library does exactly the same (ReplaceDescendantInjectionTests), so PARITY_AUDIT Issue 21 is not a library gap. Tests only; no production code changes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Tests only (one file, no production change).
ReplaceDescendantInjectionTestpins the behaviour found while investigating PARITY_AUDIT Issue 21: replacing a grandchild through its parent recreates the middle store (new instance, state carried over,dependencies.injectvalues lost,defaultTriggerre-fires). Swift Statoscope 3.1.0 behaves the same way, so this is parity, not a gap; the test keeps it from regressing silently.Related: InQBarna/statoscope#3 (Swift 3.1.0: ancestors'
statecarries the live subtree; descendants of a recreated subtree firedefaultTrigger, which Kotlin already did).🤖 Generated with Claude Code