packages feed

kioku-core 0.12.0.2 → 0.13.0.0

raw patch · 4 files changed

+49/−21 lines, 4 filesdep ~baikaidep ~keirodep ~keiro-corePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: baikai, keiro, keiro-core, kioku-api, kioku-core, kioku-migrations, kiroku-store, shibuya-kiroku-adapter, shikumi, shikumi-trace

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,6 +1,27 @@ # Changelog -## [Unreleased]+## 0.13.0.0 — 2026-11-08++### Changed++- Require mori://shinzui/baikai/packages/baikai `^>=0.10.1.0`,+  mori://shinzui/shikumi/packages/shikumi `^>=0.5.1.0` and+  mori://shinzui/shikumi/packages/shikumi-trace `^>=0.3.2.0` in library and+  test dependencies. Keep mori://shinzui/baikai/packages/baikai-effectful at+  `^>=0.4.0.5`, the latest binding admitted by Shikumi 0.5.1.0's `<0.5` bound.+  Keep mori://shinzui/baikai/packages/baikai-claude and+  mori://shinzui/baikai/packages/baikai-openai at 0.7.3.0. No new `allow-newer`+  exception or schema change is required.++### Breaking Changes++- Require mori://shinzui/keiro 0.24.0.0,+  mori://shinzui/kiroku/packages/kiroku-store 0.13.0.1 and+  mori://shinzui/kiroku/packages/shibuya-kiroku-adapter 0.7.0.1. Rebuild+  embedded hosts and workers together. Application APIs, event encodings,+  query catalogs and AI policy remain unchanged.+- Treat `CompactionConcurrentMutation` as transient in background workers,+  following the upstream transaction rollback contract.  ## 0.12.0.2 — 2026-11-02 
kioku-core.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: kioku-core-version: 0.12.0.2+version: 0.13.0.0 synopsis: Reusable agent memory runtime description:   Core runtime for kioku. M1 establishes the application effect stack; later@@ -113,7 +113,7 @@   ghc-prof-options: -fno-opt-coercion   build-depends:     aeson >=2.2 && <2.3,-    baikai ^>=0.10.0.0,+    baikai ^>=0.10.1.0,     baikai-claude ^>=0.7.3.0,     baikai-effectful ^>=0.4.0.5,     baikai-openai ^>=0.7.3.0,@@ -134,18 +134,18 @@     hasql-transaction >=1.0 && <1.3,     hs-opentelemetry-api >=1.0 && <1.1,     keiki ^>=0.9.1.0,-    keiro ^>=0.22.0.0,-    keiro-core ^>=0.22.0.0,-    kioku-api ^>=0.12.0.2,-    kiroku-store ^>=0.12.0.0,+    keiro ^>=0.24.0.0,+    keiro-core ^>=0.24.0.0,+    kioku-api ^>=0.13.0.0,+    kiroku-store ^>=0.13.0.1,     lens >=5.2 && <5.4,     mmzk-typeid >=0.7 && <0.8,     relay-pagination ^>=0.1.1.2,     relay-pagination-hasql ^>=0.1.1.2,     shibuya-core ^>=0.12.0.0,-    shibuya-kiroku-adapter ^>=0.7.0.0,-    shikumi ^>=0.5.0.0,-    shikumi-trace ^>=0.3.1.0,+    shibuya-kiroku-adapter ^>=0.7.0.1,+    shikumi ^>=0.5.1.0,+    shikumi-trace ^>=0.3.2.0,     text >=2.1 && <2.2,     time >=1.12 && <1.15,     unix >=2.8.8 && <2.9,@@ -193,7 +193,7 @@   build-depends:     aeson >=2.2,     async >=2.2 && <2.3,-    baikai ^>=0.10.0.0,+    baikai ^>=0.10.1.0,     base >=4.21 && <5,     bytestring >=0.11,     containers >=0.6,@@ -205,17 +205,17 @@     generic-lens >=2.2 && <2.4,     hasql >=1.6,     hasql-transaction >=1.0,-    keiro ^>=0.22.0.0,-    keiro-core ^>=0.22.0.0,-    kioku-api ^>=0.12.0.2,-    kioku-core ^>=0.12.0.2,-    kioku-migrations:test-support ^>=0.12.0.2,-    kiroku-store ^>=0.12.0.0,+    keiro ^>=0.24.0.0,+    keiro-core ^>=0.24.0.0,+    kioku-api ^>=0.13.0.0,+    kioku-core ^>=0.13.0.0,+    kioku-migrations:test-support ^>=0.13.0.0,+    kiroku-store ^>=0.13.0.1,     lens >=5.2,     relay-pagination ^>=0.1.1.2,     shibuya-core ^>=0.12.0.0,-    shikumi ^>=0.5.0.0,-    shikumi-trace ^>=0.3.1.0,+    shikumi ^>=0.5.1.0,+    shikumi-trace ^>=0.3.2.0,     tasty >=1.5,     tasty-expected-failure >=0.12,     tasty-hunit >=0.10,
src/Kioku/Worker/Failure.hs view
@@ -19,7 +19,8 @@ -- -- Transient errors are the ones kiroku's own constructor documentation calls -- retryable: a pool timeout, a connection torn down mid-operation, and the--- catch-all connection error. Everything else describes a stable disagreement+-- catch-all connection error, transaction rollback, or concurrent compaction+-- mutation. Everything else describes a stable disagreement -- between the caller and the database — a version conflict, a missing stream, a -- server error whose SQLSTATE kiroku does not recognise — and would fail -- identically on every redelivery.@@ -39,6 +40,8 @@   -- them permanent, which halted the worker on a conflict it should have   -- retried.   TransientTransactionFailure {} -> True+  -- Compaction lost a reference/count race and rolled back without committing.+  CompactionConcurrentMutation {} -> True   WrongExpectedVersion {} -> False   EmptyAppendBatch _ -> False   StreamNotFound _ -> False
test/Kioku/EmbeddingWorkerSpec.hs view
@@ -58,6 +58,7 @@ import Kioku.Recall.Capability (VectorCapability (..), detectVectorCapability) import Kioku.SpaceFixtures (otherContext, otherSpace, testContext, testContextProvider, testSpace) import Kioku.Worker.Failure (embeddingRetryDelay, isTransientStoreError)+import Kiroku.Store.Compaction.Types (parseCompactionDigestHex) import Kiroku.Store.Connection (defaultConnectionSettings) import Kiroku.Store.Effect (Store) import Kiroku.Store.Effect.Resource (KirokuStoreResource, getKirokuStore)@@ -84,7 +85,7 @@         shouldSkipEmbedding False (Just "hash-a") "hash-a" @?= False         shouldSkipEmbedding True Nothing "hash-a" @?= False         shouldSkipEmbedding True (Just "hash-b") "hash-a" @?= False,-      testCase "classifies only connection-shaped store errors as transient" testTransientClassification,+      testCase "classifies retryable store errors as transient" testTransientClassification,       testCase "backs off on the documented retry schedule" testRetrySchedule,       testCase "real adapter delivers, checkpoints, and shuts down" (testAdapterLifecycle False),       testCase "real adapter adopts a confirmed legacy checkpoint and resumes" (testAdapterLifecycle True),@@ -109,6 +110,9 @@   isTransientStoreError PoolAcquisitionTimeout @?= True   isTransientStoreError (ConnectionLost "reset by peer") @?= True   isTransientStoreError (ConnectionError "pool closed") @?= True+  isTransientStoreError (TransientTransactionFailure "40001" "serialization failure") @?= True+  digest <- maybe (assertFailure "invalid test digest") pure (parseCompactionDigestHex "0000000000000000000000000000000000000000000000000000000000000000")+  isTransientStoreError (CompactionConcurrentMutation digest "reference changed") @?= True   isTransientStoreError (UnexpectedServerError "22000" "expected 1536 dimensions, not 8") @?= False   isTransientStoreError (StreamNotFound (StreamName "kioku_memory-x")) @?= False   isTransientStoreError (DuplicateEvent Nothing) @?= False