Skip to content
CAI
Software that uses CAICheck a score

typelevel/cats-effect

67.0

Adequate · 27 September 2026

39.2k

lines of production code

Scala

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a high-performance, cross-platform functional effect system for Scala, providing a runtime for asynchronous and concurrent programming via the IO monad. It supports execution on the JVM, Scala.js, and Scala Native, offering platform-specific optimizations for scheduling, I/O polling, and signal handling. The library includes a comprehensive standard library of concurrency primitives, such as queues, mutexes, and references, along with robust testing tools for deterministic simulation and property-based law verification.

How it got here

2019–2020 — Cats Effect 3.0 development

29 changes.

This period focused on the major architectural overhaul for Cats Effect 3, introducing a new high-performance IO runtime with fiber-local state and a restructured typeclass hierarchy. It also established comprehensive cross-platform support for JVM, Scala.js, and Scala Native, alongside extensive property-based testing and benchmarking infrastructure.

2021–2022 — Scala Native support and runtime enhancements

37 changes.

This period focused on establishing initial Scala Native support for the core runtime, including scheduling, I/O polling, and tracing, while consolidating shared implementations across JVM and Native targets. It also introduced comprehensive stack tracing capabilities for debugging, expanded Scalafix migration rules for Cats Effect 3.x upgrades, and added detailed JMX metrics for runtime monitoring.

2023–2025 — Platform expansion and test migration

22 changes.

This period focused on extending Cats Effect's support to Scala Native and JavaScript, introducing platform-specific metrics, signal handling, and unsafe concurrency primitives. The work was heavily supported by a comprehensive migration of the test suite to Munit and the addition of extensive cross-platform test coverage for kernel, standard library, and unsafe components.

Features

Add JavaScript platform implementations for Console, Dispatcher, Env, and SecureRandom

This change introduces the JavaScript-specific implementations for several standard effect types in \std/js\. The \Console\ implementation now supports writing to stdout and stderr on Node.js (with \readLine\ deprecated and unimplemented for general Scala.js), while \Dispatcher\ gains \unsafeToPromise\ to bridge to JavaScript Promises. \Env\ is implemented to read from \process.env\, and \SecureRandom\ is provided via a shim that uses the Web Crypto API or Node.js crypto module. These additions complete the standard library support for the JavaScript target.

std/js · high confidence

Add JavaScript-specific platform implementations for Async, Clock, and Ref

This change introduces new platform-specific traits and classes in the \kernel/js\ module to support JavaScript runtime features. \AsyncPlatform\ adds \fromPromise\ and \fromThenable\ methods, allowing Cats Effect to interoperate with native JavaScript Promises and Thenables. \ClockPlatform\ provides a \realTimeDate\ method that returns a JavaScript \Date\ object. Additionally, a new \SyncRef\ implementation is added, providing a synchronous, single-threaded reference implementation suitable for the JavaScript environment.

kernel/js · high confidence

Add native platform support for Console and SecureRandom

This change introduces the missing \Console\ and \SecureRandom\ standard library implementations for Scala Native. The \Console\ companion now provides a \make\ method to construct console operations for \Sync\ types, while \SecureRandom\ is implemented using the native \getentropy\ system call to provide cryptographically secure random data, replacing the previous lack of support or platform-specific workarounds.

std/native · high confidence

Add weak reference support for Scala.js

The Scala.js platform now supports weak references via new \Reference\, \ReferenceQueue\, and \WeakReference\ classes in \cats.effect.unsafe.ref\. These classes wrap JavaScript's \WeakRef\ and \FinalizationRegistry\ to allow the garbage collector to reclaim objects while still providing a mechanism to detect when they have been collected, enabling better memory management for long-lived data structures on the JS runtime.

core/js/src/main/scala/cats/effect/unsafe/ref · high confidence

Added GraalVM native image configuration for signal handling

Added native image configuration files for cats-effect to support GraalVM compilation. The new configuration enables dynamic proxy support for sun.misc.SignalHandler, allowing signal handling functionality to work correctly in native images.

core/jvm/src/main/resources · high confidence

Added JVM example application demonstrating IO cancellation

A new example application has been added to the JVM module that demonstrates how to handle cancellation in an IO program. The example extends IOApp.Simple and runs an infinite loop that prints a start message, allowing users to see how the onCancel handler triggers when the program is interrupted.

example/jvm · high confidence

Added JVM/Native-specific syntax and unsafe reference type aliases

This change introduces new source files for the jvm-native platform, adding a \DispatcherSyntax\ trait in the \cats.effect.syntax\ package and a \package.scala\ in \cats.effect.unsafe.ref\. The latter defines private type aliases for Java's \Reference\, \ReferenceQueue\, and \WeakReference\ classes, enabling platform-specific unsafe reference handling for JVM and Native targets.

core/jvm-native/src/main/scala/cats/effect/syntax, core/jvm-native/src/main/scala/cats/effect/unsafe/ref · high confidence

Added POSIX signal handling helper for Scala Native

A new C source file, signal\_helper.c, has been added to the Scala Native resources. This file provides a helper function, cats\_effect\_install\_handler, which uses POSIX sigaction to install signal handlers. It specifically masks SIGPIPE (signal 13) during handler execution to prevent unexpected interruptions, ensuring more robust signal handling for applications running on Scala Native.

core/native/src/main/resources · high confidence

Added Scalafix migration rules and documentation for Cats Effect 3

Users can now automatically migrate Cats Effect 2.x code to Cats Effect 3.0.0 using the provided Scalafix rules. This change introduces the \v3\_0\_0\ migration rule, along with configuration files (\.scalafmt.conf\) and a README detailing the setup process, including enabling SemanticDB synthetics and running the \scalafixAll\ command.

scalafix · high confidence

Added Scastie example script for concurrent IO operations

Added a new Scastie-compatible Scala script and its corresponding SBT configuration to demonstrate concurrent effects using Cats Effect. The example script defines a simple application that prints greetings in English, French, and Spanish concurrently with random delays, serving as a reference implementation for users exploring asynchronous programming patterns in Scastie.

scripts/data · high confidence

Added unsafeRunSyncToFuture and unsafeRunSyncToPromise syntax for JS Dispatcher

Users of the JavaScript platform can now use the \unsafeRunSyncToFuture\ and \unsafeRunSyncToPromise\ methods on \Dispatcher\ instances via the \cats.effect.syntax.DispatcherSyntax\ import. These methods allow effects to be executed by first attempting a synchronous step (limited by a configurable \syncLimit\) before falling back to asynchronous execution, returning results as a Scala \Future\ or a JavaScript \Promise\ respectively.

core/js/src/main/scala/cats/effect/syntax · high confidence

Automated release tooling for PRs, site updates, and Discord notifications

New shell scripts have been added to automate post-release workflows. \make-release-prs.sh\ uses the GitHub CLI to create pull requests for minor and major version branches, updating version references via \update-versions.sh\. \make-site-pr.sh\ updates the website's Scastie integration by posting new code snippets to the Scastie API and creating a PR to the docs branch. \post-release-discord.sh\ sends a notification to a Discord webhook upon release completion.

scripts · high confidence

Centralized syntax imports via cats.effect.syntax package object

Users can now import all effect typeclass syntax from a single location using \import cats.effect.syntax.\_\. The new \cats.effect.syntax\ package object provides named sub-objects (such as \monadCancel\, \spawn\, \concurrent\, \temporal\, \async\, \resource\, \clock\, \supervisor\, and \dispatcher\) that expose the corresponding kernel and standard library syntax traits, simplifying access to the library's functional programming capabilities.

core/shared/src/main/scala/cats/effect/syntax · high confidence

Enable stack tracing for Scala.js with environment-based configuration

Stack tracing is now available on the Scala.js platform, allowing users to inspect call stacks in their JavaScript applications. The tracing mode is configured via the \CATS\_EFFECT\_TRACING\_MODE\ environment variable, defaulting to 'cached' tracing in Node.js environments and disabled ('none') in browsers. The implementation includes a cache to optimize repeated stack traces and applies filters to exclude internal Scala.js and library frames from the output, with specific handling for Firefox compatibility.

core/js/src/main/scala/cats/effect/tracing · high confidence

IORuntime and unsafe runtime internals introduced

The \cats.effect.unsafe\ package now includes the core runtime infrastructure: \IORuntime\ (the central runtime context holding compute, blocking, and scheduler execution contexts), \IORuntimeBuilder\ (for constructing custom runtimes with configurable execution contexts, shutdown hooks, and failure reporters), and supporting data structures like \StripedHashtable\, \ThreadSafeHashtable\, \WeakBag\, and \WeakList\ for efficient, low-contention internal state management. Additionally, \FiberMonitorShared\ provides shared fiber monitoring logic, \CpuStarvationMetrics\ exposes CPU starvation and clock drift metrics, and \UnsafeNonFatal\ offers a runtime-specific non-fatal exception filter. The global implicit \IORuntime\ is now provided via \cats.effect.unsafe.implicits.global\.

core/shared/src/main/scala/cats/effect/unsafe · high confidence

Initial Scala Native support for core runtime components

Cats Effect now provides a native implementation of its core runtime infrastructure, enabling applications to run on Scala Native. This change introduces platform-specific versions of \IOApp\ (the standard entry point), \FileDescriptorPoller\ (for asynchronous I/O), \Signal\ (handling OS signals like SIGINT/SIGTERM), and \Platform\ detection. It also includes \IOCompanionPlatform\ to share companion object logic with other platforms and replaces a test utility with a native-specific \InterruptThrowable\ helper, establishing the foundational runtime behavior for the native target.

core/native/src/main/scala/cats/effect · high confidence

Initial Scala.js platform support for Cats Effect

This change introduces the foundational runtime implementation for Scala.js, enabling Cats Effect applications to run in JavaScript environments. It provides a complete \IOApp\ entry point for Node.js (including process argument forwarding, exit code reporting, and signal handling), platform-specific optimizations for internal data structures like \ArrayStack\ and \CallbackStack\ using native JavaScript arrays, and interoperability helpers to convert \IO\ effects into JavaScript \Promise\ and \Future\ types.

core/js/src/main/scala/cats/effect · high confidence

Introduce TestControl for deterministic IO testing

Added a new \TestControl\ API in the testkit that provides a fully functional, single-threaded mock runtime for \IO\ programs. This allows users to manually control execution via \tick\ and \tickAll\ effects, manipulate time with \advance\, and observe results, enabling deterministic testing of concurrency and timing-sensitive logic without relying on real-world scheduling or wall-clock time.

testkit/shared · high confidence

Introduce runtime-based stack tracing for enhanced exception debugging

The \cats.effect.tracing\ module has been implemented, introducing a ring-buffer-based mechanism to capture stack traces during \IO\ execution. This feature allows the runtime to augment thrown exceptions with detailed fiber trace information (via \TracingEvent\ and \RingBuffer\), providing users with richer debugging context for asynchronous errors. The implementation includes platform-specific filtering logic to exclude internal runtime frames and supports sourcemap integration for JavaScript environments to ensure accurate source line reporting.

core/shared/src/main/scala/cats/effect/tracing · high confidence

Introduces new runtime infrastructure and fiber-local state management

This change adds the core runtime components for the new high-performance IO implementation, including the \IOFiber\ class which manages the fiber runloop, cancellation, and finalization. It introduces \IOLocal\ for fiber-local context propagation, \IODeferred\ for high-performance async synchronization, and \ContState\ to manage continuation states. Additionally, it adds \CpuStarvationCheck\ to monitor and warn about CPU starvation, \FiberSnapshot\ for debugging live fibers, \Trace\ for stack trace capture, \ExitCode\ for application exit codes, \LiftIO\ for lifting IO into other effect types, and \ResourceApp\ as a convenience trait for resource-managed applications.

core/shared/src/main/scala/cats/effect · high confidence

JVM CPU starvation metrics are now exposed via JMX MBeans

The JVM-specific CPU starvation monitoring implementation now registers a JMX MBean (named \cats.effect.unsafe.metrics:type=CpuStarvation\) to expose starvation metrics. This change moves the MBean initialization into a non-blocking \IO.delay\ context to avoid blocking the compute pool during startup, and includes error handling that logs a warning if registration fails, allowing the system to proceed with no-operation metrics in that case.

core/jvm/src/main/scala/cats/effect/metrics · high confidence

JVM runtime gains configurable CPU starvation detection and MBean metrics

The JVM \IORuntime\ now exposes detailed operational metrics via JMX MBeans (covering compute pools, local queues, timer heaps, pollers, and worker threads) and introduces configurable CPU starvation detection. Users can tune the starvation check interval, initial delay, and threshold via system properties (\cats.effect.cpu.starvation.check.\*\), and the runtime configuration now supports a shutdown timeout and unhandled fiber error reporting, providing deeper visibility and control over runtime behavior.

core/jvm/src/main/scala/cats/effect/unsafe · high confidence

JVM-specific Async and Resource platform extensions

The JVM kernel now includes platform-specific traits to bridge Java concurrency primitives with the effect system. \AsyncPlatform\ adds \fromCompletionStage\ and \fromCompletableFuture\ methods, allowing users to suspend \java.util.concurrent\ futures into the \F\[\_\]\ context with cooperative cancelation semantics that respect backpressure. Additionally, \ResourcePlatform\ introduces \fromDestroyable\, enabling the creation of resources that automatically call \destroy()\ on \javax.security.auth.Destroyable\ instances upon release.

kernel/jvm · high confidence

Native platform support for Cats Effect IORuntime

This change introduces the native-specific implementation of the Cats Effect runtime, enabling the library to run on Scala Native targets. It adds platform-specific components including \EpollSystem\ for Linux and \KqueueSystem\ for macOS/BSD to handle high-performance I/O polling, alongside \SleepSystem\ as a fallback. The runtime wiring is provided via \IORuntimeCompanionPlatform\, which configures the work-stealing thread pool and selects the appropriate polling system based on the operating system at link time. Additionally, \IORuntimeConfigCompanionPlatform\ allows tuning runtime behavior (such as CPU starvation checks and cancellation thresholds) via environment variables, and \WorkStealingThreadPoolPlatform\ provides native-optimized timing functions.

core/native/src/main/scala/cats/effect/unsafe · high confidence

Native platform tracing enabled via environment variable

Tracing support has been added to the Native platform, allowing users to control stack tracing behavior through the \CATS\_EFFECT\_TRACING\_MODE\ environment variable. The implementation uses a \ConcurrentHashMap\ for caching tracing events and only activates when the application is in debug mode, supporting both 'cached' and 'full' tracing modes as specified by the environment variable.

core/native/src/main/scala/cats/effect/tracing · high confidence

New GraalVM example application added

A new standalone example application for GraalVM has been added to the project. This new module, located at graalvm-example, contains a simple Scala application (GraalVMExample) that demonstrates basic cats-effect usage with IO, Async, and Parallel typeclasses, printing 'grrrraal' upon execution. This provides users with a concrete reference implementation for running cats-effect applications under GraalVM.

graalvm-example · high confidence

New JVM MBean interfaces for runtime metrics

This change introduces a set of new Java Management Extensions (JMX) MBean interfaces and their corresponding sampler implementations in the \cats.effect.unsafe.metrics\ package. These additions expose detailed operational metrics for the runtime's internal components, including the compute thread pool (worker, active, and blocked thread counts), local queues (fiber counts, spillovers, and steal attempts), timer heaps (outstanding and executed timers), I/O pollers (operation success/errored/canceled counts), and individual worker threads (idle time, polling, and blocking counts). It also adds MBeans for monitoring CPU starvation events and triggering live fiber snapshots, enabling users to monitor and diagnose performance characteristics of the Cats Effect runtime via standard JMX tools.

core/jvm/src/main/scala/cats/effect/unsafe/metrics · high confidence

New JVM/Native unsafe runtime components for fiber monitoring and scheduling

This change introduces a suite of new platform-specific files in \core/jvm-native/src/main/scala/cats/effect/unsafe\ that implement the core scheduling and monitoring infrastructure for the JVM and Native targets. Key additions include \FiberMonitor\ for tracking suspended fibers and providing live snapshots for debugging, \LocalQueue\ and \ScalQueue\ for lock-free, work-stealing task distribution among worker threads, and \TimerHeap\ for managing scheduled timers. The \WorkStealingThreadPool\ and \WorkerThread\ classes manage the thread pool lifecycle, worker states, and integration with polling systems, while \IORuntimeBuilderPlatform\ exposes platform-specific configuration options like custom polling systems. Additionally, \SleepSystem\ provides a default polling mechanism using \LockSupport\, and \SchedulerCompanionPlatform\ handles default scheduler creation. A renamed \BatchingMacrotaskExecutor\ (formerly \Async\) now serves as a private execution context abstraction within this unsafe package.

core/jvm-native/src/main/scala/cats/effect/unsafe · high confidence

New JavaScript and Native example applications

Added new example applications for the JavaScript and Native platforms, demonstrating concurrent execution using IOApp. The JavaScript example illustrates starting two concurrent fibers that print arguments five times each, while the Native example provides a simpler concurrent print demonstration.

example/js · high confidence

New concurrency primitives and data structures in cats.effect.std

The \cats.effect.std\ package introduces several new concurrency primitives and data structures: \AtomicCell\ provides a synchronized, concurrent mutable reference with blocking-capable updates; \AtomicMap\ offers a sharded, per-key atomic map for reduced contention; \KeyedMutex\ and \Mutex\ provide purely functional locking using a CLH-style queue; \CyclicBarrier\ allows fibers to wait until a set number of participants arrive; \NonEmptyHotswap\ (replacing the deprecated \Hotswap\) enables safe, linear resource swapping without accumulation; \Env\ provides effect-agnostic environment variable access; \Console\ adds cross-platform I/O with transformer support; \FailureSignal\ is a private runtime signal; and \QueueSink\/\QueueSource\ define queue interaction traits.

std/shared/src/main/scala/cats/effect/std · high confidence

New kernel-testkit module with property-based testing generators

The \kernel-testkit\ module has been introduced to provide property-based testing utilities for \cats-effect\ kernel types. This includes \Generators.scala\, which defines a hierarchy of Scalacheck generators (e.g., \ApplicativeGenerators\, \SyncGenerators\) that recursively construct effectful values for law testing, and \TestInstances.scala\, which provides \Arbitrary\ and \Eq\ instances for \Resource\. The module also adds \TimeT.scala\, a time-manipulation wrapper built on \Kleisli\ to allow deterministic testing of temporal effects, and \freeEval.scala\, which supplies a \Sync\ instance for \FreeT\[Eval, \*\]\ to support pure, stack-safe effect testing.

kernel-testkit/shared · high confidence

New platform-specific kernel implementations for JVM and Native targets

This change introduces new platform-specific trait implementations in the kernel module to support JVM and Native runtimes. For JVM, a new \ClockPlatform\ trait adds \realTimeInstant\ and \realTimeZonedDateTime\ methods to the \Clock\ interface, enabling direct access to Java time objects. It also introduces a \SyncRef\ implementation for JVM/Native that provides atomic reference operations backed by \java.util.concurrent.atomic.AtomicReference\, allowing for concurrent state management. Additionally, empty platform traits (\AsyncPlatform\ and \ResourcePlatform\) are added for the Native target to serve as extension points for future platform-specific logic.

kernel/jvm-native · high confidence

New platform-specific metrics for I/O poller and work-stealing thread pool

This change introduces new metrics interfaces and implementations in the \cats.effect.unsafe.metrics\ package for JVM and Native platforms. It adds \PollerMetrics\ to track I/O operation counts (submitted, succeeded, errored, canceled) for accept, connect, read, and write operations, providing a noop implementation for non-instrumented environments. It also includes \WorkStealingThreadPoolMetrics\ and related traits (\WorkerThreadMetrics\, \LocalQueueMetrics\, \TimerHeapMetrics\) to expose detailed runtime statistics such as worker thread counts, active/blocked thread states, fiber queue depths, and timer heap status. These metrics are wired into \IORuntimeMetrics\ via \IORuntimeMetricsCompanionPlatform\, allowing users to inspect the internal state of the work-stealing thread pool and I/O poller.

core/jvm-native/src/main/scala/cats/effect/unsafe/metrics · high confidence

New syntax imports for Backpressure and Supervisor

Users can now import \cats.effect.std.syntax.all.\\ or \cats.effect.std.syntax.supervisor.\\ to access convenient extension methods. The \all\ import provides \metered\ on effect types for \Backpressure\ handling, while the \supervisor\ import provides \supervise\ for launching effects under a \Supervisor\.

std/shared/src/main/scala/cats/effect/std/syntax · high confidence

Unsafe queue APIs for side-effecting offers

Added new \BoundedQueue\ and \UnboundedQueue\ types in the \cats.effect.std.unsafe\ package that allow impure code to add elements to queues without indirecting through a \Dispatcher\. \BoundedQueue\ provides an \unsafeTryOffer\ method for non-blocking side-effecting adds, while \UnboundedQueue\ extends this with \unsafeOffer\ for blocking side-effecting adds. These types include \Invariant\ and \Contravariant\ type class instances to support type transformations.

std/shared/src/main/scala/cats/effect/std/unsafe · high confidence

Behavioural changes

Automated migration rules for Cats Effect 3.0 and 3.3 API changes

This change introduces Scalafix rules that automatically rewrite deprecated Cats Effect APIs to their modern equivalents, reducing the manual effort required to upgrade. For Cats Effect 3.0, the rules handle symbol migrations such as \Bracket\ to \MonadCancel\, \Timer\ to \Temporal\, and \ContextShift\ to \Spawn\, while also transforming method calls like \IO.async()\ to \async\_\, \suspend()\ to \defer\, and \Resource.parZip()\ to \both\. The migration further removes obsolete implicit parameters like \Blocker\ and \ContextShift\, replacing usages with \Resource.unit\ and \Sync.blocking\ respectively, and updates \Bracket\#guarantee\ to fuse its parameter lists. For Cats Effect 3.3, the rules convert \IO.interruptible\ and \Sync\#interruptible\ calls with boolean arguments into the new \interruptible\ or \interruptibleMany\ methods based on the argument value.

scalafix/rules · high confidence

Cats Effect 3.0 migration rules for v3\_0\_0

The scalafix v3\_0\0 migration rules have been updated to reflect Cats Effect 3.0 API changes. Key rewrites include replacing \Blocker\ with \Sync\[F\].blocking\ and \Resource.unit\, migrating \ContextShift\ to \Spawn\ (e.g., \shift\ to \cede\), and updating \Bracket\/\MonadCancel\ signatures (e.g., \guarantee\ taking two arguments, \uncancelable\ taking a function). \IO.suspend\ becomes \IO.defer\, \IO.async\ becomes \IO.async\\, and \Timer\ is replaced by \Temporal\. \Resource.liftF\ is rewritten to \Resource.eval\, and \Resource\#parZip\ to \Resource\#both\. Package imports for \Deferred\, \Ref\, and \Semaphore\ are updated to \cats.effect\ or \cats.effect.std\, and \ApplicativeThrow\/\MonadThrow\ are moved to \cats\. The \Parallel\ constraint is simplified to \Concurrent\ where appropriate.

_scalafix/v3\_0\0/output · high confidence

Introduce JVM-specific tracing platform implementation

A new \TracingPlatform\ class has been added to the JVM-specific tracing module, providing the concrete implementation for stack trace calculation and filtering on the JVM. This file defines how tracing events are computed (supporting both cached and full stack tracing modes) and how internal classes are filtered out, serving as the platform-specific backend for the tracing system.

core/jvm/src/main/scala/cats/effect/tracing · high confidence

JVM Console readLine is now cancelable and SecureRandom/UUIDGen implementations are updated

On the JVM, Console.readLine is now cancelable, implemented via a dedicated daemon thread that processes read requests asynchronously. The SecureRandom companion object now provides a platform-specific implementation that attempts to use the non-blocking NativePRNGNonBlocking algorithm on Java 9+ for better performance, falling back to a thread-safe pool for older versions or if the optimal provider is unavailable. Additionally, UUIDGen's default fromSync method is deprecated in favor of using an implicit SecureRandom instance for more efficient UUID generation.

std/jvm · high confidence

JVM-specific runtime and application entry-point components

The JVM core module now includes platform-specific implementations for the application entry point and runtime infrastructure. \IOApp\ provides the standard way to launch Cats Effect applications, handling runtime setup, shutdown hooks, and signal handling. New companion methods \fromCompletableFuture\ and \fromCompletionStage\ allow converting Java \CompletableFuture\ and \CompletionStage\ instances into \IO\ effects. The runtime exposes a \Selector\ abstraction for NIO-based polling and an \IOLocal\ extension that can expose a \ThreadLocal\ view for debugging when fiber context tracking is enabled. Additionally, a \NonDaemonThreadLogger\ helps diagnose JVM termination issues by logging non-daemon threads, and \InterruptThrowable\ standardizes detection of interruption-related exceptions.

core/jvm/src/main/scala/cats/effect · high confidence

JVM-specific stack tracing configuration via TracingConstants

A new Java class, TracingConstants, has been added to the JVM core module to manage stack tracing behavior. This class reads the \cats.effect.tracing.mode\ system property to determine whether to use 'cached' or 'full' stack tracing, defaulting to 'cached'. It is implemented in Java specifically to avoid the volatile bitmap access overhead that the Scala compiler would introduce for module field accesses, ensuring efficient reading of the tracing mode flag in IO constructors.

core/jvm/src/main/java/cats/effect/tracing · high confidence

Java implementation of core runtime constants and signal handling

The JVM-specific runtime internals now include Java classes for managing fiber execution constants and operating-system signal handling. IOFiberConstants defines the continuation and resume state IDs used by the fiber scheduler, while also providing a reflective check for Java virtual threads. Signal encapsulates sun.misc.Signal registration via reflection, allowing the runtime to handle OS signals gracefully even on platforms where the class is unavailable. SyncIOConstants exposes the stack depth and continuation IDs required for the SyncIO implementation.

core/jvm/src/main/java/cats/effect · high confidence

Kernel typeclass hierarchy restructured with new Async, GenSpawn, and MonadCancel abstractions

The kernel's concurrency and effect model has been reorganized into a new typeclass hierarchy. A new \MonadCancel\ typeclass now handles cancelation, masking, and finalization, introducing \onCancel\ finalizers and \Poll\ for scoped cancelation boundaries. \GenSpawn\ (replacing the previous \Concurrent\/\Spawn\ concepts) manages fiber spawning, racing, and scheduling, while \Async\ provides low-level asynchronous FFI via a new \cont\ (continuation) mechanism and \asyncCheckAttempt\. Time-based operations are now defined in \GenTemporal\ (extending \Clock\), supporting \Duration\ for all time combinators like \sleep\, \timeout\, and \delayBy\. The \Outcome\ type has been refined (e.g., \Succeeded\), and a \MiniSemaphore\ is introduced to optimize parallel traversal. Binary compatibility for older \GenTemporal\ syntax methods is maintained via deprecated forwarders in \GenTemporalSyntaxCompat\.

kernel/shared/src/main · high confidence

New batching execution model and fiber monitoring for Scala.js

The Scala.js runtime now uses a \BatchingMacrotaskExecutor\ to schedule fibers in batches rather than one per event-loop iteration, improving throughput for typical UI/I/O workloads. Fiber debugging is enhanced with a new \FiberMonitor\ that tracks suspended fibers and provides \liveFiberSnapshot\ and \printLiveFiberSnapshot\ capabilities for diagnostics. Runtime configuration is now externally controllable via environment variables (e.g., \CATS\_EFFECT\_CANCELATION\_CHECK\_THRESHOLD\, \CATS\_EFFECT\_CPU\_STARVATION\_CHECK\_INTERVAL\) and the global runtime can be reset. The scheduler uses high-precision \performance.now()\ timing when available, and a JS-optimized \JSArrayQueue\ replaces the standard deque to avoid V8 performance pitfalls.

core/js/src/main/scala/cats/effect/unsafe · high confidence

Platform-specific constants and local implementations for JS/Native

Added platform-specific Scala files for JavaScript and Native targets to define fiber execution constants (such as stack depth and continuation/resume IDs) and provide empty platform traits for IO locals. This change ensures that JS and Native builds have the necessary constant definitions and local handling infrastructure, mirroring the JVM implementation's structure while adapting to platform constraints.

core/js-native · high confidence

Rearranged instance exports into a new instances package

The instance traits previously defined in the internal \ce3\ package (specifically \SyncManaged\) have been moved to \cats.effect.instances\. This location now exposes a consolidated \all\ object containing all instances and a \spawn\ object providing \GenSpawnInstances\, simplifying how users import and access effect type class instances.

core/shared/src/main/scala/cats/effect/instances · high confidence

Refactored JVM scheduler internals with new local queue and constant definitions

The JVM scheduler implementation has been restructured to improve performance and maintainability. A new \LocalQueue\ class has been introduced, featuring explicit memory padding (via \ClassPadding\, \HeadPadding\, etc.) to prevent false sharing between concurrent worker threads, and utilizing a split head/tail structure with atomic updaters to manage work-stealing semantics. Concurrently, scheduling parameters have been consolidated into dedicated constant files: \LocalQueueConstants\ defines a fixed queue capacity of 256 and a spillover batch size of 32, while \WorkStealingThreadPoolConstants\ centralizes thread parking/unparking logic and external work polling intervals (checking every 32 ticks). These changes optimize the underlying concurrency primitives used by the runtime.

core/jvm/src/main/java/cats/effect/unsafe · high confidence

Renamed ExitCase to Outcome and refactored cancellation API

The \ExitCase\ algebra has been renamed to \Outcome\, and the \Concurrent\ trait's \canceled\ method has been removed. Additionally, the \yieldTo\ method in \Concurrent\ has been renamed to \yielding\ with a type change, and the \Region\ trait's \supersede\ method has had its arguments swapped (with a temporary \supersededBy\ added). These changes reflect a broader refactoring of the effect system's exit handling and concurrency primitives.

src/main · high confidence

Repository infrastructure overhaul and documentation refresh

The project has migrated its continuous integration from Travis CI to GitHub Actions, supported by a new Mergify configuration that automatically labels and merges dependency update PRs. Development environment setup now utilizes Nix flakes (flake.nix/flake.lock) instead of the previous shell configuration, and build tooling is standardized with new .scalafmt.conf and .scalafix.conf files. The repository documentation has been significantly expanded, including a new CONTRIBUTING.md guide, a RELEASING.md procedure, and a comprehensive README.md that details the Cats Effect 3.x API, performance benchmarks, and usage examples, while removing the legacy playground.scala file.

(repo-wide) · high confidence

Secure UUID generation for Scala.js and Scala Native

A new platform-specific implementation for \UUIDGen\ has been added to the \std/js-native\ module, enabling secure UUID generation on Scala.js and Scala Native targets. This change introduces a low-priority implicit conversion that leverages \SecureRandom.unsafeJavaSecuritySecureRandom()\ to provide cryptographically secure UUIDs, deprecating the previous less efficient method in favor of explicitly passing a \SecureRandom\ instance or using the new secure default.

std/js-native · high confidence

Shared JVM/Native platform implementations for Console, Dispatcher, Env, and MapRef

This change introduces a new \std/jvm-native\ module that consolidates platform-specific implementations for several standard library components, allowing JVM and Native targets to share code. Specifically, it adds \Console.scala\ to provide a unified console interface with cancelable \readLine\ support, \DispatcherPlatform.scala\ to expose blocking execution methods (\unsafeRunSync\, \unsafeRunTimed\) via Java concurrency utilities, \EnvCompanionPlatform.scala\ to implement environment variable access using \Sync\, and \MapRefCompanionPlatform.scala\ to provide \MapRef\ creation backed by Scala's \TrieMap\. This refactoring reduces duplication between the JVM and Native build targets for these standard effects.

std/jvm-native · high confidence

Shared platform-specific implementations for JVM and Native targets

The \core/jvm-native\ module now provides a unified set of platform-specific implementations for both JVM and Scala Native, consolidating code that was previously split. This includes shared internal data structures (\ArrayStack\, \ByteStack\), CPU starvation check formatting, and the core \IO\ runtime behavior (\IOFiberPlatform\, \IOPlatform\, \IOCompanionMultithreadedPlatform\). Users benefit from a consistent API and behavior across both platforms, particularly regarding interruptible blocking operations (\interruptible\, \interruptibleMany\) and unsafe execution methods (\unsafeRunSync\, \unsafeRunTimed\, \unsafeToCompletableFuture\), which are now defined in these shared files rather than platform-specific ones.

core/jvm-native/src/main/scala/cats/effect · high confidence

Simplified CPU starvation metrics on JavaScript

On the JavaScript platform, the \IORuntimeMetrics\ implementation now provides a basic CPU starvation sampler and metrics without platform-specific dependencies. This change replaces the previous JavaScript-specific metrics logic with a simplified, generic implementation that initializes a \CpuStarvationSampler\ and exposes \CpuStarvationMetrics\, aligning the JS behavior with the stripped-down approach used after moving more complex WSTP metrics to JVM and Native targets.

core/js/src/main/scala/cats/effect/unsafe/metrics · high confidence

Update cats-effect IO.interruptible rewrite rule for v3.3.0

The scalafix rule for cats-effect v3.3.0 has been updated to correctly handle the \IO.interruptible\ and \Sync.interruptible\ API changes. Specifically, the rule now distinguishes between the single-argument \interruptible\ method and the new \interruptibleMany\ variant, ensuring that code using \IO.interruptible(true)\ is rewritten to \IO.interruptibleMany\ while \IO.interruptible(false)\ is rewritten to \IO.interruptible\. This ensures accurate migration of interruptible effect handling in user code.

_scalafix/v3\_3\_0/input, scalafix/v3\_3\0/output · high confidence

Test coverage

Add JavaScript test harness and example runners; Added JVM-Native test examples for finalizers and fatal errors; Added JVM-native test suites for Deferred parallelism and Dispatcher behavior; Added JVM-specific test examples for IOApp behavior; Added JVM-specific test suites and platform detection utilities; Added JVM-specific test suites for Console and MapRef; Added JVM-specific unsafe subsystem tests; Added JVM/Native platform test infrastructure and concurrency suites; Added JavaScript platform test infrastructure and suites; Added Native platform test runner and example registrations; Added Scala Native test suite for file descriptor polling and scheduler; Added Scala.js-specific test suites for unsafe components; Added SyntaxSuite to verify std syntax constraints; Added comprehensive test suites for kernel primitives; Added comprehensive test suites for std components; Added integration tests for IOApp across JVM, Node.js, and Native platforms; Added munit-based test suites for IO implicit resolution and compilation; Added platform detection utility for JavaScript tests; Added platform-specific test suites for Console and Async; Added shared test examples and RawApp trait for runtime behavior verification; Added test scripts for JVM, JS, and Native example applications; Added test suite for CatsEffect migration rules; Added test suite for CatsEffect rules; Added test suites for IO tracing behavior; Added test suites for TestConsole and TestControl using Munit; Migrate kernel tests to Munit; Migrate law tests to munit; Migrate test suite to munit and add comprehensive property-based tests; New JMH benchmark for stream mapping performance; New JMH benchmarks added for core cats.effect types and operations; New property-based laws and tests for effect typeclasses; Removed deprecated CE3 law and test suites.

Dependencies

Add Node.js build infrastructure for Scala.js tests

The project now includes a \package.json\ and \package-lock.json\ to manage Node.js dependencies, specifically adding \source-map-support\ as a dev dependency. This enables the build system to install and run JavaScript tests using Node.js 18 in the CI pipeline, supporting the Scala.js cross-build targets.

(dependencies) · high confidence

Migrated build infrastructure to sbt-typelevel and updated core tooling

The project's build system has been upgraded to sbt 1.13.0, replacing the legacy sbt-spiewak-bintray plugin with the sbt-typelevel ecosystem (version 0.8.6). This migration introduces standardized Typelevel plugins for binary compatibility (MiMa), documentation (mdoc 2.9.2), and code formatting (scalafix 0.14.8, java-formatter 0.8.0). Additionally, the Scala.js and Scala Native compilers have been updated to versions 1.22.0 and 0.5.12 respectively, and the build now supports testing against Firefox and Chrome browsers via the Selenium environment.

project · 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

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 46 → 67 (+21.0)
  • Rubric changed (rubric-2026.08.15 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 100 → 85 (-14.5)
  • Architecture 69 → 98 (+28.6)
  • Maturity 43 → 53 (+10.1)
  • Readiness 35 → 76 (+41.4)
  • Security 60 → 78 (+17.7)

Resolved (46)

  • Dimension evaluation failed
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • …and 26 more

New (174)

  • Change coupling: IO.scala ↔ GenConcurrentSyntax.scala (core/shared/src/main/scala/cats/effect/IO.scala)
  • ConsoleCompanionCrossPlatform.readLineWithCharsetImpl (cognitive 22) (std/shared/src/main/scala/cats/effect/std/ConsoleCrossPlatform.scala)
  • Dependency hygiene PARTLY measured — npm pinning read, dependency currency not (the committed lockfile resolved no direct production dependency)
  • Dispatcher.impl (cognitive 18) (std/shared/src/main/scala/cats/effect/std/Dispatcher.scala)
  • Documentation: no project overview (README.md)
  • Documentation: no project overview (docs/tutorial.md)
  • Duplicated block (10 lines × 2) (kernel-testkit/shared/src/main/scala/cats/effect/kernel/testkit/Generators.scala)
  • Duplicated block (11 lines × 2) (core/native/src/main/scala/cats/effect/unsafe/EpollSystem.scala)
  • Duplicated block (11 lines × 2) (std/shared/src/main/scala/cats/effect/std/Dequeue.scala)
  • Duplicated block (12 lines × 2) (core/shared/src/main/scala/cats/effect/IOFiber.scala)
  • Duplicated block (12 lines × 4) (std/shared/src/main/scala/cats/effect/std/PQueue.scala)
  • Duplicated block (14 lines × 2) (core/jvm-native/src/main/scala/cats/effect/unsafe/WorkerThread.scala)
  • Duplicated block (14 lines × 2) (core/shared/src/main/scala/cats/effect/IOFiber.scala)
  • Duplicated block (15 lines × 2) (core/jvm/src/main/scala/cats/effect/IOApp.scala)
  • Duplicated block (17 lines × 2) (core/jvm/src/main/scala/cats/effect/unsafe/IORuntimeCompanionPlatform.scala)
  • Duplicated block (19 lines × 2) (core/shared/src/main/scala/cats/effect/IOFiber.scala)
  • Duplicated block (19 lines × 2) (core/shared/src/main/scala/cats/effect/unsafe/ThreadSafeHashtable.scala)
  • Duplicated block (19–20 lines × 2) (core/jvm-native/src/main/scala/cats/effect/unsafe/WorkerThread.scala)
  • Duplicated block (20 lines × 2) (core/jvm-native/src/main/scala/cats/effect/CallbackStack.scala)
  • Duplicated block (20 lines × 2) (core/jvm/src/main/scala/cats/effect/IOApp.scala)
  • …and 154 more

Changes since last survey

  • 34 commits — 31 feature/other, 3 fixes

By area

  • (repo) — 16 commits
  • (root) — 5 commits
  • tests/shared — 4 commits
  • project/plugins.sbt — 3 commits
  • docs/core — 2 commits
  • docs/std — 1 commit
  • project/build.properties — 1 commit
  • tests/jvm — 1 commit
  • tests/jvm-native — 1 commit

Notable commits

  • fix: Fix IOApp main thread test on newer JDKs
  • fix: Fix Scala CLI dependency directives in docs
  • fix: Merge pull request #4451 from djspiewak/bug/parTraverseNPerf
  • change: Make Dispatcher error reporting test timing-insensitive
  • change: Make Supervisor restart cancellation tests deterministic
  • change: Merge branch 'series/3.7.x' into release/3.6.4-major
  • change: Merge branch 'series/3.x' into release/3.7.1-major
  • change: Merge pull request #4648 from stasimus/semaphore-o1-cancelation
  • change: Merge pull request #4652 from typelevel/update/series/3.x/sbt-1.12.15
  • change: Merge pull request #4656 from typelevel/update/series/3.x/sbt-1.13.0
  • change: Merge pull request #4660 from djspiewak/build/remove-cirrusci
  • change: Merge pull request #4663 from typelevel/release/3.6.4-major
  • change: Merge pull request #4669 from typelevel/release/3.7.1-major
  • change: Merge pull request #4672 from djspiewak/build/flaky-tests
  • change: Merge pull request #4676 from typelevel/update/series/3.x/scalacheck-1.20.0
  • change: Merge pull request #4677 from typelevel/update/flake-lock
  • change: Merge pull request #4679 from typelevel/update/series/3.x/munit-scalacheck-1.3.1
  • change: Merge pull request #4680 from typelevel/update/series/3.x/sbt-mdoc-2.9.2
  • change: Merge pull request #4682 from typelevel/update/series/3.x/sbt-scalafix-0.14.8
  • change: Merge pull request #4685 from typelevel/update/series/3.x/sbt-buildinfo-0.13.2
  • …and 14 more

Architecture

  • Containers 0 added · 0 removed · contexts 1 added · 0 removed · edges 0 added · 0 removed

Added bounded contexts (1)

  • repository

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

Survey your own repository

typelevel/cats-effect 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 27 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 e07609556fbeeb7f21e0e5e51acfc851707acca1 — 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-d00c643c3f66.