fix(daemon): replace synced store with synced export tables under peer formulaand retain sent formulas#3176
Draft
fix(daemon): replace synced store with synced export tables under peer formulaand retain sent formulas#3176
Conversation
Co-authored-by: kumavis <kumavis@users.noreply.github.com>
|
Co-authored-by: kumavis <kumavis@users.noreply.github.com>
Co-authored-by: kumavis <kumavis@users.noreply.github.com>
Co-authored-by: kumavis <kumavis@users.noreply.github.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.
Refs: (no linked issue)
Description
This PR changes cross-peer retention bookkeeping so it is attached to each
peerformula and no longer modeled as user-visible inventory data.The goal is to retain formulas for objects exported to a peer (including when
that object is not saved in the local pet store), while keeping retention rows
out of normal user-facing name APIs.
What changed
syncedStorefield.bootstrap handles under hidden internal names (
@peer-handle,@self-handle).(
trackSentIdentifiers) so locally sourced identifiers sent to a peer areretained in that peer's synced store.
the exported identifier (
@export-...) instead of subjective counters.synced-pet-storesupports internal (non-pet) names for writes/removals, butlist()remains user-facing and returns only pet names.full synced-store state (including hidden rows).
Files touched
packages/daemon/src/daemon.jspackages/daemon/src/host.jspackages/daemon/src/mail.jspackages/daemon/src/store-controller.jspackages/daemon/src/synced-pet-store.jspackages/daemon/src/types.d.tspackages/daemon/test/synced-pet-store.test.jspackages/daemon/test/synced-pet-store-integration.test.jsTesting
Executed:
npx corepack yarn workspace @endo/daemon ava test/synced-pet-store.test.js test/synced-pet-store-integration.test.js --timeout=120sAdded/updated coverage for:
list()Compatibility notes
SyncedPetStore.list()intentionally exposes only regular pet names.not surfaced in user inventory listings.
Nameso internal rowscan be represented explicitly.