Skip to content
CAI
Software that uses CAICheck a score

Iltotore/iron

53.1

Weak · 6 November 2026

4.5k

lines of production code

Scala

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add Cats integration with runtime refinement and bounded algebraic instances

The \cats\ module now provides a full integration with the Cats library, introducing runtime refinement methods (\refineNec\, \refineNel\, \refineValidated\, etc.) that return Cats \Either\ and \Validated\ types, as well as \refineFurther\ methods to chain constraints. It also adds \Bounds\ logic to automatically shift out-of-bounds values for numeric types (Int, Long, Float, Double) under Positive, Negative, and interval constraints, enabling Cats \Semigroup\ and \Monoid\ instances for these bounded refined types. Additionally, it provides standard typeclass instances (\Eq\, \Order\, \Show\, \Hash\) for refined types, using \NotGiven\ to resolve implicit ambiguity.

cats · high confidence

Add Iron integration for dynosaur schemas

The dynosaur module now provides built-in support for the Iron library. This change introduces a new \dynosaur.scala\ file that defines implicit \Schema\ instances for Iron-refined types (\T :\| P\) and generic refined types, allowing dynosaur to automatically handle validation errors and type mappings for data structures constrained by Iron.

dynosaur · high confidence

Add Play JSON serialization support for refined types

Users can now serialize and deserialize refined types using the Play JSON library. This change introduces implicit Reads and Writes instances that handle the decoding and encoding of values constrained by refinement rules, ensuring that JSON parsing validates constraints and that writing simply delegates to the underlying type's writer.

playJson · high confidence

Add PureConfig integration for refined and new types

Users can now automatically decode configuration values into refined types (using the \:\|\ syntax) and new types via PureConfig. The new \pureconfig\ module provides \ConfigReader\ instances that decode the underlying value and then validate it against the specified constraints, throwing a \RefinedConfigError\ if validation fails. This support extends to maps, allowing keys and values to be refined or new types, ensuring that configuration data is strictly validated upon loading.

ciris, pureconfig · high confidence

Add ZIO Blocks Schema integration for Iron constraints

This change introduces a new \zioBlocksSchema\ module that bridges Iron's compile-time constraints with ZIO Blocks' schema system. It provides a macro-driven translation layer (\ZioBlocksValidation\) that maps supported Iron constraints (such as numeric ranges, string lengths, and regex patterns) into ZIO Blocks' validation AST. Users can now generate ZIO Blocks schemas from Iron-refined types, with options to either embed these constraints directly into the schema for static validation or rely on Iron's runtime checks, while also optionally preserving Iron's error messages as schema metadata.

zioBlocksSchema · high confidence

Add ZIO integration module

A new ZIO module has been added, providing extension methods to refine values and collections into validated ZIO types. This includes \refineValidation\ and \refineAllValidation\ for applicative runtime refinement, as well as \refineFurtherValidation\ and \refineAllFurtherValidation\ to chain additional constraints. The module also exposes \validation\ and \validationAll\ methods on \Refined\ operations and provides ZIO prelude typeclass instances (Debug, Equal, Ord, Hash) for refined types.

zio · high confidence

Add ZIO-JSON support for RefinedTypeOps

Users can now serialize and deserialize \RefinedTypeOps\ instances using the ZIO-JSON library. This change introduces new \JsonDecoder\ and \JsonEncoder\ instances that automatically handle the refinement logic, allowing seamless integration of refined types with ZIO-JSON's JSON processing capabilities.

zioJson · high confidence

Add ZIO-based form validation example

Added a new example in the \examples/formZio\ directory demonstrating how to use the Iron library with ZIO for form validation. The example defines an \Account\ case class with constrained fields (username, password, age) using ZIO's JSON codec, and includes a simple HTTP server that validates incoming JSON payloads against these constraints, returning a bad request response if validation fails.

examples/formZio · high confidence

Add borer serialization example for iron constraints

The examples/borerSerialization directory now includes a working demonstration of integrating the iron constraint library with the borer serialization library. The new Account.scala file defines typed constraints for username, password, and age, deriving a borer Codec to handle JSON serialization and deserialization. The main.scala file demonstrates encoding a valid Account object to JSON and decoding it back, as well as handling validation failures when decoding invalid data (e.g., a password missing a digit).

examples/borerSerialization · high confidence

Add formCats example demonstrating HTTP form validation with Iron and Cats

A new example project (examples/formCats) has been added that demonstrates how to use Iron's refined types for validating HTTP form data in a Scala application. The example defines an Account case class with constraints on username, password, and age, and uses http4s and circe to decode incoming JSON requests into these validated types. It includes a simple HTTP server that registers accounts and handles validation errors by returning appropriate HTTP responses, illustrating a practical integration of Iron's compile-time and runtime refinement capabilities with Cats Effect and http4s for building robust API endpoints.

examples/formCats · high confidence

Add iron-borer integration module

A new integration module for the borer serialization library has been added, providing automatic Encoder and Decoder instances for refined types. This allows users to seamlessly serialize and deserialize iron-refined types using borer, with validation constraints enforced during decoding.

borer · high confidence

Add jsoniter-scala integration example for Iron constraints

The examples/formJsoniter module now includes a demonstration of using the jsoniter-scala library with Iron's refined types. It provides an Account case class with constrained fields (username, password, age) and shows how to generate jsoniter codecs and perform serialization/deserialization using the library's macros.

examples/formJsoniter · high confidence

Add scodec integration for refined types

The scodec module now provides implicit Codec instances for refined types, enabling seamless encoding and decoding via scodec's derive syntax. Newtypes are supported by delegating to the underlying type's codec, while refined types (A :\| B) are handled by decoding to the base type and then validating the constraint, failing if the constraint is not met.

(repo-wide) · high confidence

Add support for Decline command-line argument parsing

The library now provides integration with the Decline library for parsing command-line arguments. This change adds implicit \Argument\ instances that allow refined types (e.g., \A :\| B\) and new types to be directly read from command-line strings. The implementation validates the input against the specified constraints during parsing, ensuring that only values satisfying the refinement rules are accepted, and returns appropriate validation errors if the constraints are violated.

decline · high confidence

Add support for refined types in Skunk codecs

The Skunk integration now provides codecs that automatically handle refined types (using the \:\|\ syntax). When decoding data, the system will first decode to the underlying type and then validate it against the specified constraint, ensuring that only valid refined values are accepted. This allows users to seamlessly use refined types with Skunk's database operations without manual validation logic.

skunk · high confidence

Add uPickle serialization support for refined types

Users can now serialize and deserialize iron-refined types using the uPickle library. This change introduces implicit Reader and Writer instances that handle both standard refined types and refined subtypes, ensuring that constraints are validated during deserialization and that values are correctly encoded during serialization.

upickle · high confidence

Chimney integration for refined types

Users can now use the Chimney library to transform between refined types (e.g., \A :\| C\) and raw types. This integration provides automatic derivation of \Transformer\ instances for converting refined products to raw types and vice versa, as well as \PartialTransformer\ instances that handle runtime validation constraints when transforming raw types into refined ones.

chimney · high confidence

Initial project setup with Mill build system and Scala 3

The repository is initialized with a new build configuration using Mill 1.1.10, targeting Scala 3.9.0, and supporting JVM, Scala.js, and Scala Native platforms. This includes the addition of the \build.mill\ script, Mill wrapper scripts (\millw\, \millw.bat\), a \.scalafmt.conf\ for code formatting, and a \.gitignore\ file. Documentation files such as \README.md\, \LICENSE\ (Apache 2.0), \CODE\_OF\_CONDUCT.md\, and \CONTRIBUTING.md\ are also added to establish the project's presence and guidelines.

(repo-wide) · high confidence

Introduce ScalaCheck integration for property-based testing

Adds a new \scalacheck\ module that provides \Arbitrary\ instances for Iron-constrained types, enabling property-based testing. The module includes generators for numeric constraints (intervals, greater/less than), collection constraints (length, emptiness, containment), string constraints (prefix/suffix, length), and character constraints (whitespace, case, digits). It also supports union constraints and provides helper traits like \Adjacent\, \Min\, and \Max\ to correctly handle boundary values in numeric ranges.

scalacheck · high confidence

New modular constraint library with type-specific validations

The constraint system has been reorganized into distinct modules (any, char, collection, numeric, string) to provide targeted validation capabilities. Users can now apply specific constraints such as character checks (Whitespace, LowerCase, Digit, Letter), collection operations (Length, Contain, ForAll, Exists), numeric comparisons (Greater, Less, Interval, Multiple), and string patterns (StartWith, EndWith, Match, ValidURL, ValidEmail, SemanticVersion). A central \all\ object exports all these constraints for convenient access, enabling more precise and readable type refinements across different data types.

main/src/io/github/iltotore/iron/constraint · high confidence

Behavioural changes

Configurable and improved compile-time error diagnostics

The macro system now supports configurable compile-time error reporting, allowing users to control the verbosity and formatting of constraint violation messages via system properties or environment variables (e.g., \iron.shortMessages\, \iron.color\). This change introduces a new internal configuration mechanism that enables shorter, more concise error messages for better integration with IDE error lenses, while also providing detailed, colorized, and structured diagnostic output by default to help users quickly identify which specific constraints failed and why.

main/src/io/github/iltotore/iron/macros · high confidence

RefinedType no longer acts as a subtype of its base type

The \RefinedType\ implementation has been changed so that the refined type is no longer a subtype of the underlying base type. This behavioral change prevents implicit widening of refined values to their base types, ensuring that constraints are strictly enforced at the type level and eliminating potential safety issues where a refined value could be used where the unconstrained base type was expected.

main/src/io/github/iltotore/iron · high confidence

Test coverage

Added ScalaCheck property-based tests for Iron constraints; Added ZIO integration tests for RefinedType and RefinedSubtype; Added test coverage for core constraints and refined types; Added tests for Borer integration with RefinedSubtype; Added tests for Cats integration and numeric shift behavior; Added tests for Chimney integration with refined types; Added tests for Circe and ZIO-JSON integration with RefinedSubtype; Added tests for Ciris integration; Added tests for Decline integration with iron constraints; Added tests for Doobie integration with iron types; Added tests for Iron integration with Dynosaur; Added tests for Play-JSON integration; Added tests for Skunk codec integration with refined types; Added tests for ZIO Blocks Schema integration with Iron constraints; Added tests for jsoniter integration with refined types and subtypes; Added tests for upickle integration with RefinedOps types.

Housekeeping

Added placeholder file in sandbox source directory

A .gitkeep file was added to the sandbox/src directory to ensure the directory is tracked by version control, likely to maintain the directory structure during the Scala 3.4.3 upgrade process.

sandbox · high confidence

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

How this codebase got here

Score

  • CAI 53 → 53 (+0.0)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 73 → 73 (+0.0)
  • Architecture 88 → 88 (+0.0)
  • Maturity 54 → 54 (+0.0)
  • Readiness 39 → 39 (+0.0)
  • Security 70 → 70 (+0.0)
  • Performance 100 → 100 (+0.0)

Resolved (2)

  • Documentation: contradicts the code (docs/_docs/migration3-0.md)
  • Off-boarding risk: anonymized user #1

New (1)

  • Off-boarding risk: anonymized user #1

Changes since last survey

  • 3 commits — 3 feature/other, 0 fixes

By area

  • .github/workflows — 2 commits
  • jsoniter/test — 1 commit

Notable commits

  • change: build(deps): bump actions/deploy-pages from 5.0.0 to 5.0.1 (#396)
  • change: build(deps): bump actions/setup-java from 5 to 6 (#397)
  • change: feat: Add JsonKeyCodec derivation to iron-jsoniter (#393)

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

Survey your own repository

Iltotore/iron 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 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit b86a95636e24c05ccbf527eba378e1c2047e88ab — the exact code this score is about.
  • Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-60d1b390edf0.