Skip to content
CAI
Software that uses CAICheck a score

zio/zio-query

61.3

Adequate · 20 September 2026

4.1k

lines of production code

Scala

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

This system is the ZIO Query library, a Scala framework designed for building composable, batched, and cached data queries. It provides a core execution engine that models request dependencies to optimize parallel and sequential fetching, alongside caching mechanisms to deduplicate and reuse results. The project includes comprehensive performance benchmarks and test suites to validate its batching and execution semantics across multiple Scala versions and platforms.

Features

ZIO Query library initialization with core query execution and caching infrastructure

This change introduces the foundational \zio-query\ library, providing the core types and mechanisms for building composable, batched, and cached queries. It defines the \ZQuery\ effect type along with type aliases (\Query\, \TaskQuery\, etc.) and the \Request\ trait for modeling data dependencies. The library includes a \Cache\ abstraction backed by \ConcurrentHashMap\ for request deduplication and result caching, as well as \DataSource\ and \DataSourceAspect\ for defining and weaving aspects into data fetching logic. Internal structures like \Parallel\ and \Sequential\ manage the batching of requests for efficient execution, while version-specific utilities ensure compatibility across Scala 2.12, 2.13, and 3.

zio-query/shared/src/main · high confidence

ZQuery benchmark suite and internal query execution engine introduced

This release adds a JMH benchmark suite (DataSourceBenchmark, FromRequestBenchmark) comparing ZQuery performance against the Fetch library, and introduces a refactored internal execution engine. The engine now uses a new \BlockedRequests\ data structure to explicitly model parallel and sequential request dependencies, a \QueryScope\ for lightweight resource management, and a new \Continue\ type to distinguish between pure request retrieval and arbitrary effects. These changes support the library's automatic batching and pipelining optimizations while providing measurable performance data.

repository · high confidence

Removals

Removal of internal ZQuery execution engine components

The internal implementation details of the ZQuery library have been removed from the \zquery/shared\ source tree. This includes the deletion of core execution and state-management classes such as \ZQuery\, \DataSource\, \Result\, \Cache\, \BlockedRequest\, \BlockedRequestMap\, \CompletedRequestMap\, and \QueryFailure\, along with their associated test suites (\ZQuerySpec\, \ZIOBaseSpec\). This change eliminates the library's internal machinery for batching, deduplication, and caching of data source requests, effectively removing the ZQuery query execution capability from this module.

zquery/shared · high confidence

Removal of the legacy Docusaurus-based documentation website

The project has removed the entire \website\ directory, which previously hosted the documentation site built with Docusaurus. This change deletes the core configuration (\siteConfig.js\), page components (\index.js\, \Footer.js\), sidebar definitions (\sidebars.json\), custom styles (\custom.css\), and associated static assets (SVG images). Users will no longer be able to access the documentation via the previous Docusaurus deployment structure.

website · high confidence

Behavioural changes

Migrate build tooling and update project documentation

The project has replaced the custom sbt-extras runner with the standard sbt launcher, configuring JVM memory and garbage collection settings via a new .sbtopts file. Scalafmt has been upgraded from version 2.3.2 to 3.7.14 with updated configuration rules, and a .scalafix.conf file has been added to enforce code style and cleanup rules. Node.js support is updated to version 20.8.1, and the README has been regenerated to reflect the project's current status as 'Production Ready' with updated badges and documentation links.

(repo-wide) · high confidence

Test coverage

Added ZQuery performance benchmarks; Added test suite for ZQuery execution and batching behavior.

Dependencies

Migrated build infrastructure to ZIO SBT Ecosystem and updated tooling

The project's build system has been significantly restructured by replacing numerous individual sbt plugins (such as sbt-dotty, sbt-scalajs, sbt-bloop, and sbt-scalafix) with the unified dev.zio/zio-sbt-ecosystem plugin (v0.5.1) and dev.zio/zio-sbt-website. This migration is accompanied by a major upgrade of the sbt version from 1.3.7 to 1.12.11, updates to core plugins like sbt-scalajs (to 1.20.2) and sbt-scoverage (to 2.4.4), and the addition of sbt-scala-native (0.5.10) and sbt-mima-plugin (1.1.4). The legacy BuildHelper.scala file containing custom compiler options and cross-compilation logic has been removed, indicating a shift to the conventions provided by the new ZIO SBT ecosystem.

project · high confidence

Upgrade to ZIO 2.1 and Scala 3.3 with Native platform support

The project has upgraded its core dependency from ZIO 1.x to ZIO 2.1.24 and updated Scala versions to support 2.12.21, 2.13.18, and 3.3.7. This change introduces support for the Scala Native platform alongside existing JVM and JS targets, renames the main library module from 'zquery' to 'zio-query', and migrates the build to use the ZIO SBT Ecosystem Plugin with MiMa for binary compatibility checking. Additionally, the documentation site structure was updated, replacing the old Docusaurus-based website with a new setup under the 'docs' directory.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 61.

Lenses

  • Code Health 96
  • Architecture 100
  • Maturity 46
  • Readiness 73
  • Security 65

Changes since last survey

  • 300 commits — 292 feature/other, 8 fixes

By area

  • (root) — 99 commits
  • project/plugins.sbt — 79 commits
  • zio-query/shared — 63 commits
  • .github/workflows — 27 commits
  • project/build.properties — 17 commits
  • project/BuildHelper.scala — 7 commits
  • benchmarks/src — 3 commits
  • (repo) — 2 commits
  • .github/CODEOWNERS — 1 commit
  • docs/creating-data-sources.md — 1 commit
  • website/static — 1 commit

Notable commits

  • fix: Fix DataSourceAspect.around implementation (#243)
  • fix: Fix issue with parallel queries being executed multiple times if zip is used (#464)
  • fix: Fix propagation of FiberRef modified within a ZQuery (#515)
  • fix: Fix query inference (#409)
  • fix: Reintroduction of #349, fixes performance for very small Iterables (#402)
  • fix: Update Scala, plugin versions and fix compiling errors (#511)
  • fix: fix scala 3 js issue (#390)
  • fix: fix sequential ++ (#412)
  • change: Add DataSource (zquery & fetch) benchmarks (#463)
  • change: Add Project stage to README (#193)
  • change: Add Scala Native to project aggregates (#504)
  • change: Add Scaladoc Support (#400)
  • change: Add fromZIONow variant of fromZIO (#465)
  • change: Add foreach overloads (#225)
  • change: Add method to memoize the result of a ZQuery (#481)
  • change: Add some new operators for ZIO parity (#131)
  • change: Additional CompletedRequestMap constructors and deprecations (#473)
  • change: Allow queries to be eagerly constructed (#488)
  • change: Apply ZIO SBT Ecosystem Plugin (#415)
  • change: Avoid filtering requests when CompletedRequestsMap is empty (#466)
  • …and 280 more

Architecture

  • 0 containers · 1 bounded contexts · 0 dependency edges (baseline)

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

zio/zio-query was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 20 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 314eaca3bf58e71b199aede5f8f3ea16cee3ce33 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-b51f968c9b10.