keiro 0.12.0.0 → 0.13.0.0
raw patch · 4 files changed
+48/−6 lines, 4 filesdep ~keiro-coredep ~kiroku-storePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: keiro-core, kiroku-store
API changes (from Hackage documentation)
Files
- CHANGELOG.md +25/−0
- keiro.cabal +6/−6
- src/Keiro/ProcessManager.hs +1/−0
- test/Main.hs +16/−0
CHANGELOG.md view
@@ -6,6 +6,31 @@ ## Unreleased +## 0.13.0.0 — 2026-08-17++### Breaking Changes++- Requires `kiroku-store >=0.8 && <0.9`, replacing the previous `>=0.7 && <0.8`+ bound. `kiroku-store` 0.8.0.0 maps PostgreSQL's class-40 transaction-rollback+ codes — `40001` serialization_failure and `40P01` deadlock_detected — to a new+ `StoreError` constructor, `TransientTransactionFailure`, instead of to+ `UnexpectedServerError`. Consumers that matched+ `UnexpectedServerError "40001"` or `UnexpectedServerError "40P01"`, and+ exhaustive matches over `StoreError`, must adopt the new constructor.+- Requires the lockstep `keiro-core ^>=0.13.0.0`.++### Other Changes++- `Keiro.ProcessManager.isTransientStoreError` classifies+ `TransientTransactionFailure` as transient, so a serialization failure or+ deadlock surfaced by the store finalizes `AckRetry` on the process-manager and+ router workers rather than halting the subscription. Before this release the+ same conditions arrived as `UnexpectedServerError` and were classified+ deterministic, so they halted. `Keiro.Command.isRetryableConflict` is+ unchanged and still covers only optimistic-concurrency conflicts, so+ `runCommand` continues to surface a transient failure as+ `StoreFailed (TransientTransactionFailure …)` for its caller to classify.+ ## 0.12.0.0 — 2026-08-14 ### Breaking Changes
keiro.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: keiro-version: 0.12.0.0+version: 0.13.0.0 synopsis: Event sourcing framework and workflow engine description: A library that composes kiroku, keiki, and shibuya into an@@ -146,8 +146,8 @@ , hs-opentelemetry-semantic-conventions >=1.40 && <2 , keiki >=0.9 && <0.10 , keiki-codec-json >=0.9 && <0.10- , keiro-core ^>=0.12.0.0- , kiroku-store >=0.7 && <0.8+ , keiro-core ^>=0.13.0.0+ , kiroku-store >=0.8 && <0.9 , lens >=5.2 && <5.4 , mmzk-typeid >=0.7 && <0.8 , random >=1.2.1 && <1.4@@ -205,7 +205,7 @@ , keiki-codec-json , keiro , keiro-test-support- , kiroku-store >=0.7 && <0.8+ , kiroku-store >=0.8 && <0.9 , process >=1.6 && <1.7 , shibuya-core ^>=0.9.0.0 , stm >=2.5 && <2.6@@ -235,9 +235,9 @@ , hs-opentelemetry-sdk >=1.0 && <1.1 , keiki >=0.9 && <0.10 , keiro- , keiro-core ^>=0.12.0.0+ , keiro-core ^>=0.13.0.0 , keiro-test-support- , kiroku-store >=0.7 && <0.8+ , kiroku-store >=0.8 && <0.9 , shibuya-core ^>=0.9.0.0 , streamly-core >=0.3 && <0.4 , tasty-bench >=0.4
src/Keiro/ProcessManager.hs view
@@ -362,6 +362,7 @@ DuplicateEvent {} -> False EventAlreadyLinked {} -> False LinkSourceEventMissing {} -> False+ TransientTransactionFailure {} -> True UnexpectedServerError {} -> False isTransientCommandError :: CommandError -> Bool
test/Main.hs view
@@ -4658,6 +4658,22 @@ isRejectionClass (EncodeFailed (NonObjectCallerMetadata Aeson.Null)) `shouldBe` False ackForCommandError (RetryDelay 5) (StoreFailed (Store.ConnectionLost "boom")) `shouldBe` AckRetry (RetryDelay 5)+ -- kiroku-store 0.8.0.0 types class-40 rollbacks separately from+ -- UnexpectedServerError. The transaction rolled back completely and+ -- nothing was committed, so the source event retries rather than halting+ -- the subscription; every other server code still halts.+ ackForCommandError+ (RetryDelay 5)+ (StoreFailed (Store.TransientTransactionFailure "40001" "could not serialize access"))+ `shouldBe` AckRetry (RetryDelay 5)+ ackForCommandError+ (RetryDelay 5)+ (StoreFailed (Store.TransientTransactionFailure "40P01" "deadlock detected"))+ `shouldBe` AckRetry (RetryDelay 5)+ ackForCommandError (RetryDelay 5) (StoreFailed (Store.UnexpectedServerError "XX000" "boom"))+ `shouldSatisfy` \case+ AckHalt (HaltFatal _) -> True+ _ -> False ackForCommandError (RetryDelay 5) CommandRejected `shouldSatisfy` \case AckHalt (HaltFatal _) -> True _ -> False