stem_sqlite 0.3.0 copy "stem_sqlite: ^0.3.0" to clipboard
stem_sqlite: ^0.3.0 copied to clipboard

SQLite broker and result backend for Stem.

Changelog #

0.3.0 #

  • Ship a package skill for SQLite-backed workflows and persistent restart.
  • Require Dart >=3.13.0 <4.0.0.
  • Use shared journal argument validation so malformed writes raise ArgumentError before any persisted-state mutation.
  • Add a separate workflow journal table and atomic revision/execution checks coupling checkpoint success with ordered compensation registration. Verify retry and cleanup progress across database reopen and schema upgrades.
  • Guard completion, cancellation, and ordinary workflow state mutations against terminal-state replacement; add atomic terminal transition support and nullable hosted-result reopen coverage.
  • Verify typed workflow host reattachment across database reopen, including event suspension and replay without re-executing completed checkpoints.
  • Add the workflow execution-fencing migration and fenced lease/failure operations. Run the new migration before using multiple workers against an existing database; generated workflow run IDs now use UUIDs so independently opened SQLite handles or reopened stores do not collide.
  • Require Stem >=0.5.0 <1.0.0 and the shared adapter contract >=0.3.0 <1.0.0, allowing later pre-1.0 releases.

0.2.3 #

  • Recover the unpublished 0.2.2 release using the corrected publishing workflow. Includes the prefetch and consumer-draining fixes listed below; no additional storage schema changes.

0.2.2 #

  • Enforced queue prefetch as a per-subscription cap on unexpired outstanding leases, including settlement and lease extension through other broker handles. Reused consumer names no longer share prefetch slots; ephemeral broadcasts remain outside the queue prefetch cap.
  • Made broker close idempotent and await consumer database loops before closing connections. Last-listener cancellation now joins the consumer drain and wakes polling promptly instead of leaving database work running after teardown.
  • Released claims cancelled before delivery only while still owned by that subscription, preserved already-delivered leases, and rejected consumption after broker close.
  • Added regression coverage for prefetch, lease expiry/extension, cross-handle settlement, cancellation, and concurrent close.

0.2.1 #

  • Widened Stem compatibility to include the 0.4 portable runtime line.
  • Assigned unique Ormed connection names to file-backed stores so concurrently opened brokers and result backends close every native SQLite handle.
  • Raised the minimum Dart SDK to 3.12.0 and the Ormed dependencies to 0.3.0 and ormed_sqlite 0.4.0.
  • Retained generated model definitions for Stem's internal typed repositories; Ormed's codegen-free database facade remains available for application-side ad-hoc access.
  • Datasource logger injection now uses Stem's dependency-neutral StemLogger facade; the Ormed contextual logger remains an adapter implementation detail.
  • Serialized SQLite transactions and broker mutations across shared file connections to prevent savepoint corruption and database is locked errors under concurrent worker/result-backend traffic.
  • Added a file-backed throughput benchmark with a regression baseline.
  • Added conditional terminal-result updates so late completion attempts cannot overwrite an existing terminal state.
  • Added a restart-recovery integration test that reopens a durable SQLite workflow store and resumes a persisted checkpoint with replacement broker, runtime, and worker instances.
  • Added mixed-version queue coverage: a row written against the pre-namespace schema is upgraded and consumed by the current SQLite broker.
  • Updated the adapter for Stem 0.3.0 and the narrowed broker capability model.
  • Added migration-registry and historical-schema upgrade coverage.
  • Removed the deprecated StemSqliteDatabase placeholder API; use SqliteConnections and QueryContext instead.

0.1.4 #

  • Moved shared logger imports to the explicit package:stem/observability.dart entrypoint as the stable core barrel was narrowed.

0.1.3 #

  • Updated ormed_sqlite to 0.3.0 and raised the package SDK floor to Dart 3.10, matching the new unified native/web SQLite adapter release.
  • Guarded DataSource-backed migrations before applying SQLite PRAGMAs so non-schema drivers fail before any migration side effects.

0.1.2 #

  • Updated internal package constraints to accept the in-progress stem prerelease and matching adapter-test prereleases during workspace development.

0.1.1 #

  • Updated Ormed dependencies to 0.2.0, including the new split ormed_sqlite_core runtime dependency.
  • Simplified SQLite datasource bootstrapping and migration tests to use the new Ormed SQLite code-first datasource helpers.
  • Removed explicit ensureSqliteDriverRegistration() calls from Stem SQLite runtime and seed paths by routing config-driven datasource creation through the new helper-based bootstrap code.
  • Updated the SQLite workflow store to honor caller-provided run ids, keeping local workflow runtime metadata/manifests behavior aligned with the shared store contract suite.
  • Added broker broadcast fan-out support for SQLite routing subscriptions with broadcast channels.
  • Enabled broadcast fan-out broker contract coverage for the SQLite adapter.
  • Wired DataSource and seed runtime initialization to use the shared stemLogger by default, while still allowing explicit logger injection.
  • Hardened datasource/seed configuration overrides to safely merge nullable driver options.

0.1.0 #

  • Added workflow run lease tracking and claim/renew support so workflows can be distributed safely across workers.
  • Added DataSource-based factory helpers that run SQLite migrations for brokers, result backends, and workflow stores.
  • Hardened SQLite connection initialization with file locking/retry to avoid concurrent migration/WAL conflicts, and ensured lazy init before transactions.
  • Migrated the SQLite adapter to Ormed and added a local seed runtime that runs seeders without requiring ormed_cli.
  • Updated Ormed dependencies to 0.1.0.
  • Added workflow run lease migrations, runnable discovery, and offset support for workflow listings.
  • Migrated IDs to UUID v7, regenerated ORM models, and refreshed datasource factories/tests.
  • Added workflow store contract tests plus docs/dependency updates.

0.1.0-alpha.4 #

  • Added durable watcher tables and atomic event resolution so Durable Workflows resume with stored payloads and metadata.
  • Auto-versioned checkpoints and rewind logic now align with the core runtime, while saveStep updates run heartbeats for better ownership tracking.
  • Suspension records capture resumeAt/deadline values sourced from the injected workflow clock.
  • Published sqliteWorkflowStoreFactory so local development and CLI tooling can bootstrap SQLite-backed Durable Workflows without external services.

0.1.0-alpha.3 #

  • First public alpha release extracted from the core Stem workspace.