Releases: electric-sql/electric
expo-db-electric-starter@1.0.16
@electric-sql/y-electric@0.1.41
@electric-sql/react@1.0.44
@electric-sql/experimental@6.0.15
@electric-sql/client@1.5.15
Patch Changes
-
9f767cf: Add fast-check model-based and micro-target property tests (plus static analysis for unbounded retry loops, unconditional 409 cache busters, tail-position awaits, and error-path
#publishcalls) and fix client bugs uncovered by the new PBT suite:Stream / retry-loop fixes (uncovered by model-based PBT):
- Unconditionally create a new cache buster on every 409 response so that the follow-up request URL always differs from the pre-409 URL (prevents CDN infinite loops on cached 409s).
- Fix a parked stack-frame leak in
ShapeStream#startwhere awaiting a never-resolving live fetch retained the full error handler chain. - Add
EXPERIMENTAL_LIVE_SSE_QUERY_PARAMtoELECTRIC_PROTOCOL_QUERY_PARAMSsocanonicalShapeKeystrips it; previously the SSE and long-polling code paths produced divergent cache keys for the same shape. - Replace the raw 409 response body publish in
#requestShapewith a syntheticmust-refetchcontrol message so subscribers clear accumulated state rather than receiving stale data rows. - Bound the
onErrorretry loop at 50 consecutive retries so a brokenonErrorhandler can no longer spin forever.
Micro-target PBT fixes:
canonicalShapeKeycollapsing duplicate query paramsShape#processclobbering notifications on[up-to-date, insert]batchessubset__limit=0/subset__offset=0dropped on GET path due to truthiness check- Non-canonical JSON keys in
Shape#reexecuteSnapshotsdedup snakeToCamelcolliding multi-underscore columnsShape#reexecuteSnapshotsswallowing errors silentlySnapshotTrackerleaving stale reverse-index entries on re-add/removeShape#awaitUpToDatehanging forever on a terminally-errored stream
Shape notification contract fix:
Shape#processno longer notifies subscribers on data messages while the shape is stillsyncing(i.e. before the firstup-to-datecontrol message). Previously, the sync-service's initial response (offset=-1) could cause subscribers to fire with a partial view whilestream.lastSyncedAt()was stillundefined. Shape now follows the N1/N2 invariants documented inSPEC.md(Shape notification semantics).Shape#processno longer fires an intermediate empty-rows notification onmust-refetch. The status transitions back tosyncingand subscribers receive the post-rotation state on the nextup-to-date, matching the long-standingshould resync from scratch on a shape rotationintegration test.
-
b449f70: Bound the
onErrorretry loop to prevent unbounded retries and memory growth. WhenonErroralways returns a retry directive for a persistent error (e.g. a 400 from a misconfigured proxy), the client now limits consecutive retries to 50 before tearing down the stream and notifying subscribers. The counter resets on successful data (non-empty message batch or 204 No Content), so intermittent errors that recover do not accumulate toward the limit. -
690e25a: Fix permanently stuck expired shape handles in localStorage by adding self-healing retry. When stale cache retries are exhausted (3 attempts with cache busters), the client now clears the expired entry from localStorage and retries once without the
expired_handleparameter. Since the server never reuses handles (documented as SPEC.md S0), the fresh response will have a new handle and bypass stale detection. This prevents shapes from being permanently unloadable when a proxy strips cache-buster query parameters.
@core/sync-service@1.5.1
Patch Changes
- 11b151b: Fix admission control bypass where shapes were created before admission control checks. Shape creation now happens after admission control, preventing resource exhaustion under load.
- 25acc0e: Add read-only mode for seamless rolling deploys. Electric instances now serve existing shape data while waiting for the advisory lock, eliminating the HTTP outage window during rolling deploys.
@core/electric-telemetry@0.2.0
Minor Changes
- cc623d7: Add ETS table memory observability metrics, reporting top N table types by memory usage similar to process memory metrics
@core/sync-service@1.5.0
Minor Changes
- a4efdab: Start admin connection pool before lock acquisition and inline lock breaker
Patch Changes
- 61c64bb: Fix SQL injection in ORDER BY clause validation. Replace permissive catch-all in the AST walker with a deny-by-default allowlist of safe node types, and rebuild the clause from validated AST via PgQuery deparse instead of passing the raw user string through.
- 8aa23ca: Test for empty MapSet using
MapSet.size/1to avoid spurious allocations
expo-db-electric-starter@1.0.15
Patch Changes
- Updated dependencies [deb7c32]
- @electric-sql/client@1.5.14
@electric-sql/y-electric@0.1.40
Patch Changes
- Updated dependencies [deb7c32]
- @electric-sql/client@1.5.14