fix scope-load/clear subscribe notifications (0.3.1 / 0.2.1) - #16
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.
Fixes
subscribeToEntity/subscribeToScopenever firing on scope load/clear — the gap surfaced while porting the TS@laboverwire/stitchpackage to consumestitch-wasm(7 integration tests failed on this).Fix
store.rs(spawn_filtered_forwarder): handleScopeLoaded/ScopeClearedinstead of dropping them. For a subscriber whose entity is affected and whose scope filter matches, synthesize a null-dataMutationEvent(originLoad/Clear) and forward it through the same accept/send path. SosubscribeToScopefirescb()andsubscribeToEntityfires(null, op)— the existing "re-read everything" cue. TheLoad/Clearorigin also satisfies the persistence-mode accept filter.memory_store.rs(create): rootcreateresolves its mutationscope_idviaresolve_scope(root's own id), matchingupdate/delete, so all three land under the same(scope_id, entity)key.Tests
subscribe_fires_on_scope_load_and_clear(times out before the fix).subscribe_to_scope_fires_on_replace_scope_in_browser(mirrors the JS repro with persistence +replaceScope).Release (bundled)
stitch-sync0.3.0 → 0.3.1,stitch-wasm0.2.0 → 0.2.1 (dep updated), CHANGELOG entries for both. Patch bump — backward-compatible bug fix.Verified:
fmt/clippyboth targets clean; native suites + broker/last-will green (no regressions); browser suite 21/21.Tagging
v0.3.1after merge publishes both crates; npm stays manual (cargo make wasm-publish).