packages feed

kiroku-store 0.7.0.0 → 0.7.0.1

raw patch · 9 files changed

+39/−9 lines, 9 filesdep ~shibuya-corePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: shibuya-core

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,29 @@ # Changelog +## 0.7.0.1 — 2026-08-15++### Bug Fixes++* `nextInput` in the subscription worker did not handle the `Retrying` state+  and would have crashed the worker with a pattern-match failure had that+  state ever driven it. `Retrying` is a surfaced observability state that the+  delivery primitive writes into the state `TVar` and then restores, so it+  should never reach `nextInput`; the new arm is defensive and mirrors+  `step`'s own `Retrying` clause, returning to `Live` at the same cursor.++### Other Changes++* Built with `ghc-options: -Wall -Werror=incomplete-patterns`, matching every+  other package in the repository. Library sources are warning-free; the+  cleanup removed redundant imports in `Kiroku.Store.Effect`,+  `Kiroku.Store.HistoryRetention.SQL`, `Kiroku.Store.Subscription.Stream`,+  and `Kiroku.Store.Subscription.EventPublisher`, and unused binders in+  `Kiroku.Store.HistoryRetention.Internal` and `Kiroku.Store.Transaction`. No+  API or runtime behavior changed.+* The `kiroku-shibuya-overhead` benchmark component now requires+  `shibuya-core >=0.9 && <0.10`. The library has no `shibuya-core`+  dependency.+ ## 0.7.0.0 — 2026-08-13  ### Breaking Changes
kiroku-store.cabal view
@@ -1,6 +1,6 @@ cabal-version:   3.0 name:            kiroku-store-version:         0.7.0.0+version:         0.7.0.1 synopsis:        High-performance PostgreSQL event store description:   Kiroku is a PostgreSQL-backed event store for Haskell applications. It@@ -28,6 +28,8 @@     OverloadedLabels     OverloadedStrings +  ghc-options:        -Wall -Werror=incomplete-patterns+ library   import:          common   exposed-modules:@@ -234,7 +236,7 @@     , generic-lens          >=2.2  && <2.4     , kiroku-store     , lens                  >=5.2  && <5.4-    , shibuya-core          >=0.8  && <0.9+    , shibuya-core          >=0.9  && <0.10     , stm                   >=2.5  && <2.6     , streamly              >=0.11     , streamly-core         >=0.3  && <0.4
src/Kiroku/Store/Effect.hs view
@@ -24,7 +24,7 @@ import Control.Monad.IO.Class (MonadIO, liftIO) import Data.Aeson (Value) import Data.Generics.Labels ()-import Data.Int (Int32, Int64)+import Data.Int (Int32) import Data.List (find) import Data.Map.Strict (Map) import Data.Map.Strict qualified as Map
src/Kiroku/Store/HistoryRetention/Internal.hs view
@@ -35,7 +35,7 @@     current <- Tx.statement (leaseUuid leaseId) SQL.readLeaseForUpdateStmt     case current of         Nothing -> pure (Left HistoryRetentionRenewalUnknown)-        Just lease@HistoryRetentionLease{owner = actualOwner, state}+        Just HistoryRetentionLease{owner = actualOwner, state}             | actualOwner /= requestedOwner -> pure (Left HistoryRetentionRenewalOwnerMismatch)             | state == HistoryRetentionLeaseReleased -> pure (Left HistoryRetentionRenewalReleased)             | state == HistoryRetentionLeaseExpired -> pure (Left HistoryRetentionRenewalExpired)
src/Kiroku/Store/HistoryRetention/SQL.hs view
@@ -14,7 +14,6 @@ ) where  import Contravariant.Extras (contrazip2, contrazip3)-import Data.Functor.Contravariant ((>$<)) import Data.Int (Int32, Int64) import Data.Text (Text) import Data.Time.Clock (DiffTime, UTCTime)
src/Kiroku/Store/Subscription/EventPublisher.hs view
@@ -55,7 +55,7 @@ import Control.Monad (when) import Control.Monad.IO.Class (MonadIO, liftIO) import Data.Foldable (for_)-import Data.Int (Int32, Int64)+import Data.Int (Int32) import Data.IntMap.Strict (IntMap) import Data.IntMap.Strict qualified as IntMap import Data.Vector (Vector)
src/Kiroku/Store/Subscription/Stream.hs view
@@ -39,7 +39,6 @@ import Control.Concurrent.Async qualified as Async import Control.Concurrent.STM (     STM,-    TBQueue,     TMVar,     TVar,     atomically,
src/Kiroku/Store/Subscription/Worker.hs view
@@ -36,7 +36,7 @@ import Control.Exception (SomeException, bracket, fromException, throwIO, try) import Control.Monad.IO.Class (MonadIO, liftIO) import Data.IORef (IORef, newIORef, readIORef, writeIORef)-import Data.Int (Int32, Int64)+import Data.Int (Int32) import Data.Map.Strict (Map) import Data.Map.Strict qualified as Map import Data.Text (Text)@@ -340,6 +340,12 @@                     Right events                         | V.null events -> pure FetchEmpty                         | otherwise -> pure (BatchFetched events)+            -- Defensive totality: 'Retrying' is a surfaced observability state+            -- that the delivery primitive writes into the state TVar and then+            -- restores, so it is never a driving state reaching this function.+            -- Mirror 'step''s defensive 'Retrying' clause, which returns to+            -- 'Live' at the same cursor.+            Retrying c _ -> nextInput (Live c)             Stopped{} -> pure Cancelled          -- Interpret a transition's effects against the *new* state. Returns a
src/Kiroku/Store/Transaction.hs view
@@ -350,7 +350,7 @@     [EventData] ->     (AppendResult -> Tx.Transaction a) ->     Eff es (Either StoreError a)-runTransactionAppendingWith ctor sn@(StreamName name) expected events k+runTransactionAppendingWith ctor sn@(StreamName _) expected events k     | Left err <- validateStreamName sn = pure (Left err)     | null events = pure (Left (EmptyAppendBatch sn))     | otherwise = do