packages feed

shikumi-cache-postgres 0.1.2.3 → 0.1.3.0

raw patch · 3 files changed

+17/−9 lines, 3 filesdep ~baikaidep ~shikumidep ~shikumi-cachePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: baikai, shikumi, shikumi-cache, shikumi-cache-postgres

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -2,6 +2,12 @@  ## Unreleased +## 0.1.3.0 — 2026-09-08++- Raise the internal `shikumi-cache` bound to `^>=0.2.0.0` for the breaking cache release.++- Upgrade the dependency on `mori://shinzui/baikai/packages/baikai` to `>=0.7.0.0 && <0.8`.+ ## 0.1.2.3 — 2026-08-29  ### Changed
shikumi-cache-postgres.cabal view
@@ -1,6 +1,6 @@ cabal-version:   3.4 name:            shikumi-cache-postgres-version:         0.1.2.3+version:         0.1.3.0 synopsis:        Postgres-backed shikumi cache (EP-6) category:        AI description:@@ -42,7 +42,7 @@     , base           >=4.20     && <5     , effectful      >=2.5      && <2.7     , hasql          >=1.9      && <1.11-    , shikumi-cache  ^>=0.1.2.0+    , shikumi-cache  ^>=0.2.0.0     , text           ^>=2.1  test-suite shikumi-cache-postgres-test@@ -52,15 +52,15 @@   main-is:        Main.hs   ghc-options:    -threaded -with-rtsopts=-N   build-depends:-    , baikai                  >=0.6      && <0.7+    , baikai                  >=0.7.0.0  && <0.8     , base     , effectful     , ephemeral-pg     , generic-lens     , lens-    , shikumi                 ^>=0.3.0.0-    , shikumi-cache           ^>=0.1.2.0-    , shikumi-cache-postgres  ^>=0.1.2.0+    , shikumi                 ^>=0.4.0.0+    , shikumi-cache           ^>=0.2.0.0+    , shikumi-cache-postgres  ^>=0.1.3.0     , tasty     , tasty-hunit     , text
test/Main.hs view
@@ -21,10 +21,12 @@ import Data.Vector qualified as V import Effectful (Eff, IOE, liftIO, runEff, type (:>)) import Effectful.Dispatch.Dynamic (interpret)+import Effectful.Error.Static (runErrorNoCallStack) import EphemeralPg qualified as Pg import Shikumi.Cache (CachedResponse (..), cacheKey, cachedLLM, currentKeyVersion, lookupCache, storeCache) import Shikumi.Cache.Backend.Postgres (PostgresCache, closePostgresCache, openPostgresCache, runCachePostgres) import Shikumi.Effect.Time (runTime)+import Shikumi.Error (ShikumiError) import Shikumi.LLM (LLM (..), complete) import System.Environment (lookupEnv) import System.Exit (exitFailure, exitSuccess)@@ -95,8 +97,8 @@         "shikumi-cache-postgres"         [ testCase "memoize: first request MISS (provider once), repeat is a Postgres HIT" $ do             refA <- newIORef 0-            (r1, r2) <--              runEff . runTime . runCachePostgres cache . runCountingLLM refA stubResponse . cachedLLM $ do+            Right (r1, r2) <-+              runEff . runErrorNoCallStack @ShikumiError . runTime . runCachePostgres cache . runCountingLLM refA stubResponse . cachedLLM $ do                 a <- complete fixModel fixCtx fixOpts                 b <- complete fixModel fixCtx fixOpts                 pure (a, b)@@ -106,7 +108,7 @@             -- A fresh run (fresh counter) now finds the row already in Postgres → HIT.             refB <- newIORef 0             _ <--              runEff . runTime . runCachePostgres cache . runCountingLLM refB stubResponse . cachedLLM $+              runEff . runErrorNoCallStack @ShikumiError . runTime . runCachePostgres cache . runCountingLLM refB stubResponse . cachedLLM $                 complete fixModel fixCtx fixOpts             nB <- readIORef refB             nB @?= 0,