Repository navigation
Version Packages - #12
Merged
Merged
Conversation
github-actions
Bot
force-pushed
the
tegami/version-packages
branch
from
November 24, 2026 22:09
f2121e4 to
6c9e1d1
Compare
github-actions
Bot
force-pushed
the
tegami/version-packages
branch
from
November 25, 2026 01:33
6c9e1d1 to
6e37399
Compare
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.
Summary
All bumped packages.
@streamsy/projection0.13.00.14.0@streamsy/serve0.13.00.14.0@streamsy/core0.13.00.14.0@streamsy/storage0.13.00.14.0@streamsy/views0.13.00.14.0command-stream0.0.110.0.12durable-response-aisdk0.0.20.0.3durable-response-atom0.0.20.0.3durable-response0.0.20.0.3durable-response-foldkit0.0.20.0.3durable-response-tanstack0.0.20.0.3hex-domination0.0.20.0.3timer-stream0.0.110.0.12Changelogs
fix-sql-transaction-owner.mdShow Bumped Packages (2)
npm:@streamsy/projectionnpm:@streamsy/storageGive nested SQL clients their own transactions
In 0.13.0, nesting
CommitBoundary.withTransactionon a second SQL client ran the inner body without a transaction, so a failure could leave partial writes behind.CommitBoundary.withTransactionon a second SQL client now opens its own transaction, which commits first and survives an outer rollback. Non-transactional projections running on the second client now save their checkpoints inside a transaction. Durable Object clients still share the driver's transaction.CommitBoundary.withTransactionbefore nesting rawsql.withTransactionon that client. Mutating a second client inside its rawsql.withTransactionwhile only the first client's boundary is open now dies instead of running. Fibers or finalizers that outlive a transaction body and reuse its old context now die if they attempt to enter the boundary or mutate storage.See Commit with your own tables.
mysql-storage.mdShow Bumped Packages (2)
npm:@streamsy/projectionnpm:@streamsy/storageList projection bindings and routed outputs on MySQL (schema v4)
Projection.bindings, startup binding discovery for attached projections, andProjection.retire/Projection.forgetfor bindings with routed outputs now work on MySQL. Durable pending marks on MySQL also now support encoded params longer than 512 code points, and both attach hosts reject MySQL projection IDs longer than 255 code points when durability is enabled.Breaking change (MySQL schema v4): Opening a MySQL database adds
full_keytostreamsy_owner_recordsandfull_paramstostreamsy_projection_pending, upgrading MySQL storage to schema version 4. Streamsy 0.13.0 cannot open a MySQL database at version 4. SQLite and Postgres remain at schema version 3.Upgrade steps for MySQL:
See MySQL owner record listing.
MySQL storage transactions default to
READ COMMITTEDBreaking change: On MySQL,
CommitBoundary.withTransactionnow setsREAD COMMITTEDfor each transaction regardless of the session, pool, or global default (includingSERIALIZABLE), so every plain read takes a fresh snapshot. At this isolation level, locking reads cannot lock absent rows or guard ranges against inserts—use a unique key or lock an existing parent row instead.This isolation level ensures consistent reads across concurrent hosts:
Projection.forgetsees a routed binding's first checkpoint committed concurrently by another host.Projection.bindingssees newly committed bindings from other hosts during the same transaction.Configuration and requirements:
SqlClient.BeginTransactionto"START TRANSACTION"to use the session default. Running underREPEATABLE READreintroduces stale Views results in the sequences above and causesProjection.forgetto fail with a retryabletoken-conflictif its snapshot predates a new checkpoint.SET TRANSACTIONandSTART TRANSACTIONin one request (per-transaction only; keep the session in autocommit). Effect'smysql2client enables multi-statement support by default, whereas passing-MULTI_STATEMENTSor using a custom client without it fails at the first transaction.READ COMMITTEDtransactions requirebinlog_format=ROWorMIXED(logged by row in mixed mode).See the MySQL isolation-level reference and MySQL transactions.
projection-generation-identity.mdShow Bumped Packages (2)
npm:@streamsy/projectionnpm:@streamsy/viewsUse
generationinstead ofversionon projections and Views circuitsBreaking change: Projection and Views circuit declarations now use
generationalone to version stored state and rebuilds, and reject any definedversionwithRangeError.version: 1to keep the existing generation. For any other version, removeversionand raisegenerationabove every generation theidhas previously used.ProjectionKey,Unit, and the derived declaration and binding types no longer have aversionfield. If custom stores or handlers includedkey.versionorunit.versionin storage keys, substitute the literal1to preserve keys for the former default version. Passing a key object with a definedversionother than1torecordKey,Projection.forget, or afromStorecheckpoint store throwsRangeError.View.fn(name, version, implementation)keeps its function version argument.When upgrading a declaration that used a
versionother than1, stop the old runners, retain full input history, and prepare output addresses before starting the upgraded process. Let the new generation catch up and move readers before retiring the old binding with a one-off 0.13.0 script that only callsretire. See Migrate a declaration that setversion.projection-transactions-and-lifecycle.mdShow Bumped Packages (1)
npm:@streamsy/projectionUnified transaction commits on SQL and memory hosts
Commit.transactionandCommit.transactionWithCleanupnow use one unified transaction model across SQL andMemoryStoragehosts: composeTransaction.layerandCheckpointStore.layerover the same storage owner so each unit, its outputs, and its checkpoint (or lifecycle cleanup onforget/retire) commit together.Breaking change:
Transactionno longer exposes asqlfield. ReadSqlClientfrom Effect context where SQL is needed, and useLayer.provideMergewhen composing the host so the storage owner'sSqlClientremains in the runner's context (including forStateTableandFoldByKeyrunners).Commit.transactionWithCleanupcallback now takes only the checkpoint key.StateTableandFoldByKeyfail withunsupported-compositionifSqlClienthas no open transaction. Wrap directtable.sync()calls inTransaction.withTransaction.loadfunction provided byCheckpointStore.layerdirectly—wrappingloaddrops owner metadata and fails withunsupported-composition.See
Commit.transaction.Retire forgotten routed streams and undecodable checkpoints
Projection.forget(bound)now marks routed output records as forgotten rather than deleting them, soProjection.retirecan still locate and clean up those streams. Pass the binding fromdeclaration.at(params)with its routed outputs. Replay checks that each forgotten stream starts empty and open.Projection.retirecan now write a tombstone over an undecodable checkpoint and close or remove its streams in the same call.Retired.streamsreplacesRetired.outputsandRetired.routed, andProjection.RetiredOutputis renamed toProjection.RetiredStreamwith anoutputfield. The array is sorted by output name and stream id, and includes shared wrapped outputs as well as the wrapped accepted stream under"@streamsy/accepted".RouteRecordsimplementations must now providestateandforget(fromStorefrom@streamsy/projection/checkpointsupplies both). SeeRouteRecords.Upgrade notes:
retirecannot discover their routed streams.forget(for an existing checkpoint) and routedretirefail withunsupported-compositionwhen the owner store cannot list the binding's records (such as a MySQL range containing a legacy hashed key).See Forget and Retire a generation.
Prevent
Projection.forgetcleanup from overlapping another host's first unitIn 0.13.0 on Postgres, a
Projection.forgetunderCommit.transactionWithCleanupthat saw no checkpoint could run its cleanup after another host committed the binding's first unit, leaving the checkpoint behind without its cleaned-up rows while reporting success.Commit.transactionandCommit.transactionWithCleanupnow re-check the checkpoint after running cleanup. If a checkpoint exists, the forget rolls back and fails with a retryabletoken-conflict. This covers routed and unrouted bindings, including MySQL atREPEATABLE READ(requires@streamsy/storageat the same version).forgetinstead of reporting success on a rolled-back MySQL transaction.Always stop and drain a binding's runners before calling
forget. To clean up a binding left with a checkpoint and missing rows by an earlier release, stop its runners and forget it again, or raisegeneration. One limit remains: if two hosts race to commit a binding's first unit on Postgres or MySQL, one wins while the slower host can hit a non-retryableinvalid-output(orViewDataFaulton a routed Views circuit), stopping the binding untilRegistry.retryor restart—run one host per binding. See One writer.views-hosts-and-live.mdShow Bumped Packages (1)
npm:@streamsy/viewsRun Views on Postgres, MySQL, and in memory
@streamsy/viewsnow supports PostgreSQL, MySQL, and in-memoryMemoryStoragehosts alongside SQLite and Cloudflare Durable Objects.Breaking change:
View.circuitnow requires aViewBackendservice. ProvideViewBackend.layerSql(for SQLite, Postgres, or MySQL) orViewBackend.layerMemory(forMemoryStorage) alongsideCheckpointStore.layerandTransaction.layerover the same storage layer. Code that names a circuit's commit type now usesCommit.TransactionCommit.View.migrate(sql)at startup. If the host also usesStateTable, callStateTable.migrate(sql). See Choose a host.CheckpointStore.layer,Transaction.layer, andViewBackend.layerSqloverSqlStorage, and runView.migrate(sql)at host startup (safe across concurrent hosts). On MySQL (tested on MySQL 8.4.11), install@streamsy/storageat the same version for theREAD COMMITTEDtransaction isolation Views relies on. Neither dialect imposes a length limit on row keys or sort keys, but snapshot arrangement identifiers must fit in 255 UTF-8 bytes (including prefix, encoded State key, and collection name); an overlong identifier or a row/owner key containing a lone surrogate fails the unit with a non-retryableViewDataFault. See Postgres and MySQL.CheckpointStore.layer,Transaction.layer, andViewBackend.layerMemoryoverMemoryStorage.layer(group). Checkpoints, operator state, and output streams commit together in memory with no SQL client or migration. See Run Views in memory.Read live Views snapshots with
View.liveDeclare in-memory views with
View.liveand open a reader withat(params)inside an Effect scope. The reader maintains its own memory host and exposessnapshot(all committed views and their input offsets together),snapshots(a live stream of updates), andcaughtUp(waits for the initial replay). Works in browsers, tests, or any Effect process—provide remote State services withRemoteStreamsto follow server streams and compare committed input offsets against write offsets. See Live snapshots.Break row-key ties consistently across backends
When rows have equal sort terms, Views now breaks ties by encoded row key in SQLite order across all backends. This can change which rows
topemits and how floating-point sums round when keys contain supplementary Unicode characters. SQLite keeps the same stored key bytes and table layout.If an existing view already wrote affected results, raise its circuit's
generationto rebuild from retained input history and switch readers once it catches up. See Lifecycle.Publish
The following packages will be published if merged:
@streamsy/projection0.14.0npm@streamsy/serve0.14.0npm@streamsy/core0.14.0npm@streamsy/storage0.14.0npm@streamsy/views0.14.0npm