You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(shared-dataflow): UpdatesStore orderBy + streaming k-way URI merge
UpdatesStore.readEntries / readUpdatedEntries gain an optional
`orderBy: "stamp" | "uri"` argument (new exported ReadOrderBy type).
Default stays "stamp" — the temporal-replay order existing callers
rely on. `"uri"` yields URI-ascending, which is the only order under
which several per-signal diff streams can be merged without buffering.
readUpstreamChanges rewritten to open one orderBy:"uri" iterator per
upstream signal of the cell and run a streaming k-way merge by URI.
Memory is now O(M) in the number of upstream signals, independent of
the number of matching URIs. URI ties between upstreams still resolve
to signal-declaration order (graph.getCellInputs). The iterators are
closed in a finally block so early `break` doesn't leak.
Tests: six new cases on InMemoryUpdatesStore covering the default vs
explicit "stamp", "uri" ordering for both read methods, and the
filter-independence property; one new case on readUpstreamChanges
asserting non-buffering behaviour via a Proxy-spied store (reads stop
when the consumer breaks). 124 → 131 tests in the package.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments