Skip to content
CAI
Software that uses CAICheck a score

okuramasafumi/alba

72.9

Strong · 6 November 2026

2.6k

lines of production code

Ruby

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add RBS type checking and Steep integration

The project now includes RBS type signatures and Steep configuration to enable static type checking. A new \Steepfile\ defines the type checking targets and libraries, while the \Rakefile\ exposes \typecheck\, \steep\, and \rbs\ tasks to run these validations. This allows developers to verify type correctness in the library code and examples.

(repo-wide) · high confidence

Add examples directory with type-checkable demonstration scripts

A new \examples\ directory has been added, containing a collection of Ruby scripts that demonstrate various Alba features such as circular associations, conditional attributes, custom types, polymorphic associations, and metadata handling. A \Steepfile\ is included to enable type checking for these examples using the \sig/examples.rbs\ signature file, ensuring the demonstration code adheres to the library's type definitions.

examples · high confidence

Alba library upgraded to version 4.0.0

The Alba serialization library has been updated to version 4.0.0. This release introduces a comprehensive set of new features and architectural changes, including the implementation of a layout system for wrapping serialized output, support for typed attributes with validation and auto-conversion, and the ability to define nested attributes. It also adds conditional attributes, association resource name inference, and a Rails integration via a Railtie that provides \serialize\ and \render\_serialized\_json\ helpers for controllers. Additionally, the library now supports custom inflectors, metadata handling, and various performance optimizations, while deprecating older APIs like \ignoring\ in favor of \attributes\ overriding.

lib/alba · high confidence

Initial RBS type signature files added

Added RBS type signature files for the Alba library, including definitions for the core Resource module, Association, NestedAttribute, TypedAttribute, Layout, and other internal components. This enables static type checking and improved IDE support for Ruby developers using the library.

sig/alba · high confidence

Initial RBS type signature support added

This change introduces RBS (Ruby Signature) type definitions for the Alba library, enabling static type checking and improved IDE support. The \sig/alba.rbs\ file defines the core module interfaces, including types for backends, encoders, inflectors, and resource classes, while \sig/external.rbs\ provides minimal declarations for optional dependencies like ActiveSupport, Rails, and Dry. A \sig/manifest.yaml\ file lists the required RBS tooling dependencies.

sig · high confidence

Introduce comprehensive JSON serializer benchmark suite

The benchmark directory now includes a full suite of scripts and documentation for comparing the performance of various Ruby JSON serialization libraries. This addition introduces \collection.rb\ and \single\_resource.rb\ to benchmark serializers like Alba, Barley, Blueprinter, Jbuilder, Panko, and others against a shared data model defined in \prep.rb\. The suite supports configuration via environment variables to toggle YJIT and \Oj.optimize\_rails\, and includes a \README.md\ with baseline performance results and memory allocation metrics to help users choose the most efficient serializer for their needs.

benchmark · high confidence

Behavioural changes

Apply frozen string literal pragma to bin/console

The bin/console script now includes the frozen\_string\_literal: true directive, ensuring that all string literals in the file are immutable by default. This change improves memory efficiency and prevents accidental string mutation within the console environment.

bin · high confidence

Major refactoring of the Alba core module and introduction of new serialization APIs

The \lib/alba.rb\ file has been significantly expanded and restructured, replacing the previous minimal implementation with a comprehensive core module. This change introduces new public APIs including \Alba.serialize\ and \Alba.hashify\ for simplified object serialization, alongside configuration methods like \backend=\, \encoder=\, and \inflector=\. The module now manages resource class creation via \resource\_class\, handles key transformation logic, and supports custom type registration through \register\_type\. Additionally, the codebase now explicitly requires and integrates \Alba::Resource\, \Alba::Errors\, and \Alba::Deprecation\ modules, and conditionally loads Rails integration via \Alba::Railtie\, marking a shift from a simple gem structure to a full-featured serialization library with enhanced configuration and extensibility.

lib · high confidence

Test coverage

Add isolated gemfiles for testing without ActiveSupport and Oj; Added property-based tests for serialization logic; Added test coverage for association source, circular associations, and key transformation; Added test coverage for resource serialization and Alba configuration; Added tests for Rails integration and dependency handling.

Dependencies

Updated dependencies and gem metadata for Ruby 3.0+ support

The project has updated its dependency constraints to support Ruby 3.0 and newer, dropping support for older versions. Key dependency updates include bumping \rubocop\ to \~\> 1.91.0, \rubocop-minitest\ to \~\> 0.40.0, \rubocop-performance\ to \~\> 1.27.0, \rubocop-md\ to \~\> 2.0, and \rubocop-rake\ to \~\> 0.7.1. Testing dependencies were updated to \minitest\ \~\> 6.0 (for Ruby 3.2+) and \simplecov\ \~\> 1.0, with conditional versioning for \json\ and \minitest\ based on Ruby version. A new \benchmark/Gemfile\ was added to isolate benchmark dependencies, including serializers like \barley\, \props\_template\, and \rabl\. The gemspec metadata was completed with proper URLs for bug tracker, changelog, documentation, and source code, and the required Ruby version was set to \>= 3.0.0.

(dependencies) · 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 71 → 73 (+1.6)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 100 → 100 (+0.0)
  • Architecture 100 → 100 (+0.0)
  • Maturity 59 → 62 (+3.7)
  • Readiness 80 → 79 (-0.4)
  • Security 73 → 73 (+0.0)
  • Domain Modelling 100 → 100 (+0.0)
  • Performance 95 → 95 (+0.0)

Resolved (2)

  • Ambiguous distinction between serialize and hashify. Both methods share the exact same signature and likely perform the same core logic (serializing an object), differing only in the output format (JSON string vs Hash). Without documentation, it is unclear if 'hashify' is a distinct operation or just an alias for getting the intermediate hash representation.
  • Inconsistent mutation semantics. transform_keys takes multiple arguments including root and cascade, while transform_keys! takes only type. It is unclear if transform_keys! is a simplified version, a global override, or if it ignores the root and cascade parameters. The ! suffix usually implies mutation, but the argument list difference suggests different scopes or behaviors.

New (1)

  • Floating git dependency: rubocop-gem_dev

Changes since last survey

  • 13 commits — 12 feature/other, 1 fixes

By area

  • (repo) — 5 commits
  • .github/workflows — 4 commits
  • (root) — 1 commit
  • benchmark/Gemfile — 1 commit
  • lib/alba — 1 commit
  • sig/manifest.yaml — 1 commit

Notable commits

  • fix: Merge pull request #588 from okuramasafumi/copilot/fix-failing-github-actions-job
  • change: Apply remaining changes
  • change: Bump github/codeql-action from 4.39.0 to 4.39.1
  • change: Bump step-security/harden-runner from 2.22.1 to 2.22.2
  • change: Initial plan
  • change: Merge pull request #583 from okuramasafumi/dependabot/github_actions/step-security/harden-runner-2.22.2
  • change: Merge pull request #584 from okuramasafumi/dependabot/github_actions/github/codeql-action-4.39.1
  • change: Merge pull request #587 from unasuke/remove-rbs-from-manifest
  • change: Remove rbs from the dependencies in sig/manifest.yaml
  • change: [Bench] Update sqlite3 for benchmark
  • change: [CI] Run typecheck on Ruby 4.0
  • change: [Release] Bump a version to 4.0.2
  • change: [Release] Keep a changelog for version 4.0.2

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

Survey your own repository

okuramasafumi/alba 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 b610b8cd4ace1d64f91bbcca24463999c062485b — 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.2+preprod-5c4e66d9318b.