Skip to content
CAI
Software that uses CAICheck a score

fs-fio/fio

71.3

Strong · 2 October 2026

9.4k

lines of production code

F#

with Python

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

FIO is a .NET library providing a structured concurrency runtime with primitives for parallel execution, atomic state management, and robust interruption handling. It includes specialized modules for building HTTP servers with configurable routing and timeouts, as well as low-level socket and WebSocket clients and servers with typed error handling. The system is designed to manage application lifecycles, resource cleanup, and network communication with a focus on reliability and precise error classification.

Features

Added automation scripts for building, testing, and packaging

New shell scripts have been added to the scripts directory to streamline development workflows. \check.sh\ automates the restore, build, and test cycle, while \pack.sh\ handles creating NuGet packages in an artifacts directory. Additionally, \benchmark.sh\ provides a quick way to run performance benchmarks, and \stress-test.sh\ allows users to run tests repeatedly to identify flakiness.

scripts · high confidence

New ZipRace benchmark and A/B comparison tool for parallel combinators

The benchmark suite now includes a new ZipRace benchmark that measures the per-invocation cost of the ZipPar and RaceFirst parallel combinators, helping to regression-guard the runtime primitives for fork, settle, and join. Additionally, a new compare.py script has been added to the benchmarks directory, allowing users to generate markdown reports that compare execution time and memory allocation deltas between two sets of BenchmarkDotNet results, with configurable thresholds for flagging regressions and wins.

benchmarks · high confidence

Behavioural changes

Configurable Method Not Allowed handling and naming consistency

The HTTP routing layer now supports custom handling for 405 Method Not Allowed responses. A new \MethodNotAllowedHandler\ field has been added to the \Routes\ record, allowing users to define specific logic for when a request matches a route but uses an unsupported HTTP method; this defaults to returning a standard method-not-allowed response. Additionally, exception variable naming within the \HttpError\ type has been standardized for consistency.

FIO.Http · high confidence

Default socket timeouts changed from 30s to infinite

In FIO.Sockets, the default SendTimeout and ReceiveTimeout for SocketConfig have been changed from 30,000 milliseconds to 0 (infinite). This means that, unless explicitly configured otherwise, socket operations will no longer automatically time out after 30 seconds, potentially causing operations to hang indefinitely if the remote end does not respond.

FIO.Sockets · high confidence

FIO 0.4.0-beta: New concurrency primitives, atomic references, and improved interruption handling

This release introduces several new capabilities and refines existing behavior. A new \Ref\<'A\>\ type provides lock-free, atomic mutable references with both effectful and direct access methods. Parallel combinators have been updated: \ZipPar\ and \ZipParError\ now support fail-fast semantics, interrupting sibling fibers on the first failure or success respectively, and \forEachPar\ uses a new \joinAllFailFast\ primitive for similar behavior. \RaceFirst\ and \raceAll\ have been simplified to use \joinFirst\ internally. Interruption handling is improved: \readLine\ and \readKey\ now support fiber interruption with input stashing, and a new \Defect\ cause in \InterruptionCause\ captures unhandled exceptions. Several API signatures have changed to remove redundant \onError\ parameters (e.g., \sleep\, \timeout\, \timed\), and \DirectRuntime\ now uses a simpler task-based model.

src/FIO · high confidence

Improved error handling and connection management in FIO.Sockets and FIO.WebSockets

The FIO.Sockets and FIO.WebSockets libraries now provide more robust and typed error handling, replacing raw exception wrapping with specific error types like \CodecError\ and \Closed\ in WebSocket extensions. Connection lifecycle management has been refined: WebSocket clients and servers now properly dispose of resources and handle closing handshakes with bounded timeouts to prevent indefinite hangs. Additionally, the server socket accept loop now suppresses errors and includes a brief sleep to prevent tight-loop spinning during interruptions, while WebSocket server connections now expose the remote and local endpoints.

src/FIO.Sockets, src/FIO.WebSockets · high confidence

Refactored request body reading and simplified timeout middleware

The HTTP server now uses a unified, reusable function to read request bodies, which enforces maximum body size limits and properly handles truncated streams for both fixed-length and chunked requests. Additionally, the timeout middleware signature has been simplified by removing the explicit error handler argument, relying on the default timeout response behavior instead.

src/FIO.Http · high confidence

Refined WebSocket error classification and handling

The library now distinguishes between specific failure modes in WebSocket operations. JSON serialization and deserialization errors are explicitly classified as CodecError, while premature connection closures are identified as Closed errors rather than generic failures. Additionally, new internal helper functions (receiveFailed, sendFailed, connectionFailed) allow callers to map generic exceptions to more specific error types (ReceiveFailed, SendFailed, ConnectionFailed) based on the context of the operation, providing more precise error reporting for users.

FIO.WebSockets · high confidence

Refined application lifecycle and new parallel combinators

The FIOApp lifecycle now distinguishes between application outcomes and shutdown hooks: a new \onOutcome\ hook runs after the main effect settles (including finalizers) to handle success, failure, or interruption results, while \onShutdown\ runs afterward for process-level cleanup. Interruption is now strictly reserved for explicit requests (Ctrl+C, SIGTERM, or \Stop()\), whereas defects or invalid arguments result in a fatal error. The runtime introduces \JoinFirst\ and \JoinAllFailFast\ primitives for parallel execution, and improves shutdown reliability by ensuring the effect context is tracked and interrupts are propagated correctly during unmounting.

FIO · high confidence

Updated FIO examples with new SharedCounterApp and API simplifications

The examples directory now includes a new SharedCounterApp demonstrating atomic counter updates across parallel fibers using Ref. The FIOApp showcase (App example) has been refactored to use acquireReleaseWith for resource management instead of a custom shutdown hook, and several API calls (FIO.sleep, Timeout) no longer require the explicit 'id' parameter, simplifying the code. A new README.md has been added to document all runnable example projects.

examples · high confidence

Test coverage

Added test coverage for new concurrency primitives and HTTP routing features; Added tests for console input interruption and sequential reading behavior; Updated test utilities and FsCheck integration; Updated test utilities for FIO.Http; Updated test utilities for WebSocket server management and timeouts.

Dependencies

Update core and test dependencies; add Ref, JoinFirst, and ZipRace benchmarks

This release updates several key dependencies: FSharp.Core to 10.1.401, Expecto and Expecto.FsCheck to 11.1.0, FsCheck to 3.4.0, Microsoft.NET.Test.Sdk to 18.10.1, and YoloDev.Expecto.TestSdk to 0.16.1. The FIO library now includes a new Ref DSL component, with corresponding tests added for Ref, JoinFirst, and JoinAllFailFast. Benchmarking coverage has been expanded with new ZipRace benchmarks. Additionally, the packaging assets for FIO, FIO.Http, FIO.Sockets, and FIO.WebSockets have been updated to use a new logo file.

(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

Score

  • CAI 70 → 71 (+1.3)
  • Rubric changed (rubric-2026.09.13 → rubric-2026.10.1) — scores are not directly comparable.

Lenses

  • Code Health 82 → 82 (+0.0)
  • Architecture 84 → 91 (+6.9)
  • Maturity 65 → 65 (-0.2)
  • Readiness 70 → 72 (+1.5)
  • Security 76 → 76 (+0.0)
  • Performance 100 (new)

Resolved (9)

  • Hotspot: src/FIO.Http/Types.fs (src/FIO.Http/Types.fs)
  • Low coverage: FIO/App.fs (FIO/App.fs)
  • Low coverage: FIO/Console.fs (FIO/Console.fs)
  • Low coverage: FIO/DSL/CE.fs (FIO/DSL/CE.fs)
  • Low coverage: FIO/DSL/Exceptions.fs (FIO/DSL/Exceptions.fs)
  • Low coverage: FIO/DSL/Extensions.fs (FIO/DSL/Extensions.fs)
  • Low coverage: FIO/DSL/Factories.fs (FIO/DSL/Factories.fs)
  • Low coverage: FIO/DSL/Operators.fs (FIO/DSL/Operators.fs)
  • Low coverage: FIO/DSL/Ref.fs (FIO/DSL/Ref.fs)

New (1)

  • Outdated: coverlet.collector

Architecture

  • Containers 0 added · 0 removed · contexts 0 added · 3 removed · edges 0 added · 6 removed

Removed bounded contexts (3)

  • FIO.Http.Tests
  • FIO.Sockets.Tests
  • FIO.WebSockets.Tests

Removed dependency edges (was a dependency, now gone) (6)

  • FIO.Http.Tests → FIO
  • FIO.Http.Tests → FIO.Http (coupling)
  • FIO.Sockets.Tests → FIO
  • FIO.Sockets.Tests → FIO.Sockets
  • FIO.WebSockets.Tests → FIO
  • FIO.WebSockets.Tests → FIO.WebSockets

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

Survey your own repository

fs-fio/fio 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 2 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit cb15c12a33de4825990080d1515d3ddf208f2d8d — the exact code this score is about.
  • Scored under rubric-2026.10.1 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-351388015767.