Skip to content
CAI
Software that uses CAICheck a score

rage-rb/rage

53.7

Adequate · 6 November 2026

13.9k

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 ActionCable and Raw WebSocket JSON protocols

The \lib/rage/cable/protocols\ directory now includes two new protocol implementations: \ActioncableV1Json\, which provides compatibility with the standard Action Cable protocol (supporting subscribe, unsubscribe, and message commands), and \RawWebSocketJson\, which allows direct WebSocket connections where each connection maps to a single channel subscription. Both protocols inherit from the newly introduced \Base\ class, which handles core subscription management, heartbeat synchronization, and serialization logic.

lib/rage/cable/protocols · high confidence

Add OpenAPI schema parsers for ActiveRecord, Alba, and Blueprinter

The OpenAPI parser now supports automatic schema generation for three serialization patterns. For plain ActiveRecord models, it introspects attribute types (including enums) to build JSON schemas, excluding common metadata columns. For Alba resources, it parses the resource definition AST to handle attributes, associations, root keys, key transformations, and meta blocks, with recursion guards for circular references. For Blueprinter serializers, it extracts fields and associations from specific views, supporting root keys and nested blueprint references.

lib/rage/openapi/parsers/ext · high confidence

Add RuboCop configuration and update Code of Conduct

The project now includes a \.rubocop.yml\ file that enforces a consistent code style, targeting Ruby 3.3 and disabling all cops by default to allow opt-in usage. Additionally, the Code of Conduct has been updated to version 2.1 of the Contributor Covenant, reflecting changes in terminology and providing a new email address for reporting incidents.

(repo-wide) · high confidence

Add low-level Pub/Sub API with Redis adapter

Introduces a new \Rage::PubSub\ module providing a low-level publish/subscribe API for inter-process and cross-node communication, primarily intended for integrations and gems. The module supports subscribing to and publishing messages on topics via \subscribe\, \unsubscribe\, and \publish\ methods, with local delivery handled by Iodine and cross-node delivery enabled by a new Redis adapter (\Rage::PubSub::Adapters::Redis\). The Redis adapter requires the \redis-client\ gem, supports Redis 6+, and allows configuration of connection pooling, channel prefixes, and stream trimming strategies. This infrastructure enables multi-server setups for features like \Rage::Cable\ and \Rage::SSE\ by broadcasting messages across worker processes and nodes.

lib/rage/pubsub · high confidence

Executable entry point for the CLI application

A new executable script named 'rage' has been added to the 'exe' directory. This script serves as the entry point for the command-line interface, initializing the Ruby environment and launching the application via the Rage::CLI::App.start method.

exe · high confidence

Initial release of the Rage web framework

Introduces the Rage framework, a high-performance, fiber-based Ruby web server built on Iodine. This release provides a complete application stack including a CLI for scaffolding and management, a router with DSL support, and a configuration system. Key features include a custom Fiber scheduler for non-blocking I/O, concurrent request handling via Fiber.await, and a middleware stack with built-in support for CORS, request IDs, and development code reloading. The framework also includes a robust logging system with structured context, a centralized error reporting interface, and a daemon system for background processes. It supports standard web features such as cookies (plain, signed, encrypted), sessions, and parameter parsing, while offering integration hooks for Rails applications and custom renderers.

lib/rage · high confidence

Introduce Rage::Events for publishing and subscribing to domain events

The \lib/rage/events\ directory now contains the core implementation for a lightweight event-driven system. Users can define event data structures and create subscriber classes that include \Rage::Events::Subscriber\ to react to those events. The system supports subscribing to multiple event types, handling asynchronous processing via the \deferred: true\ option, and defining custom error handling using \rescue\_from\. Events are published via \Rage::Events.publish\, which automatically routes to registered subscribers, with support for passing additional context and inheriting subscriber configurations.

lib/rage/events · high confidence

Introduce Rage::OpenAPI for automatic API documentation generation

The \lib/rage/openapi\ directory now contains the complete implementation for the \Rage::OpenAPI\ module, enabling automatic generation of OpenAPI 3.0.0 specifications from Rage controller comments. This feature introduces a multi-stage pipeline: \Rage::OpenAPI::Builder\ constructs a tree of action nodes from the router, \Rage::OpenAPI::Collector\ uses the Prism parser to extract comments from source files, and \Rage::OpenAPI::Parser\ interprets tags like \@auth\, \@response\, and \@param\. The \Rage::OpenAPI::Converter\ then transforms these nodes into a final spec, supporting features such as file uploads (mapped to \multipart/form-data\), per-endpoint OAuth2 scopes, and shared component references. An embedded SwaggerUI interface is provided via \index.html.erb\ for interactive documentation, and the system requires the \prism\ gem (version \>= 0.25.0) to function.

lib/rage/openapi · high confidence

Introduce Server-Sent Events (SSE) support

Adds a new Server-Sent Events implementation to the framework, enabling real-time, unidirectional data streaming to clients. This feature supports single-value responses, unbounded enumerator-based streams, and manual connection handling via a \ConnectionProxy\. It also includes a pub/sub-based broadcasting system for unbounded streams, allowing messages to be sent to multiple subscribers, with built-in message buffering for streams created before connections are established.

lib/rage/sse · high confidence

Introduce built-in WebSocket support via Rage::Cable

Rage apps can now mount a real-time WebSocket application at a specified route, allowing clients to connect, subscribe to named streams, and receive broadcast messages in real time. This feature provides a channel-based architecture similar to Action Cable, enabling developers to define connection logic, handle authentication, and manage client subscriptions directly within the Rage framework.

lib/rage/cable · high confidence

Introduce in-process deferred task queue with retry and scheduling

Adds \Rage::Deferred\, an in-process background task queue that allows scheduling tasks for later execution with optional delays or specific future times. Tasks support automatic retries with a configurable maximum (default 20) and a quartic backoff strategy, and can be wrapped from arbitrary objects. The system includes durable storage for pending and dead-letter tasks, backpressure handling to prevent memory overload, and support for periodic task scheduling. Users can also configure enqueue and perform middleware chains to intercept task lifecycle events.

lib/rage/deferred · high confidence

Introduce structured JSON logging and fiber-scoped context for Rage logger

The Rage logger now supports a new \Rage::JSONFormatter\ that outputs log lines in JSON format, including request details like method, path, controller, action, status, and duration when available. This complements the existing text formatter. The logger implementation has been updated to use Fiber storage for managing log tags and context, ensuring that \tagged\ and \with\_context\ calls are properly isolated per request or fiber, and preventing mutation of shared state. Users can configure the JSON formatter via \Rage.configure\ to enable structured logging.

lib/rage/logger · high confidence

Introduces a new telemetry system for monitoring framework operations

The \lib/rage/telemetry\ module now provides a comprehensive observability layer, allowing developers to monitor framework internals via a span-based tracing system and periodic capacity metrics. Users can define custom handlers by subclassing \Rage::Telemetry::Handler\ to observe specific events (such as controller actions, WebSocket handshakes, or SSE broadcasts) using wildcard patterns, and register them via configuration. The system includes a \Rage::Telemetry::Capacity\ module to expose runtime state like the kernel accept queue depth, and a \Rage::Telemetry.every\ method to run periodic sampling blocks in fibers without blocking the server. This change adds the infrastructure for integrating external observability tools with the Rage framework.

lib/rage/telemetry · high confidence

Introduces disk-based durable storage and a no-op backend for deferred tasks

The \lib/rage/deferred/backends\ directory now includes a \Disk\ backend that persists deferred tasks to the local filesystem using a write-ahead log, supporting both immediate and delayed execution, automatic recovery of tasks from crashed workers, and durable dead-letter storage for failed tasks. A \Nil\ backend is also added as a no-op implementation, allowing deferred task processing to be disabled or bypassed without errors.

lib/rage/deferred/backends · high confidence

New CLI commands for scaffolding, OpenAPI validation, and coding agent skills

The Rage CLI now includes new commands to streamline development workflows. Users can scaffold application components using \rage code-generator\ (generating models, controllers, and migrations) and create new projects with \rage new-app\, which supports optional database configuration. An \openapi validate\ command allows users to check their API definitions for warnings. Additionally, a \skills\ command enables the installation and updating of coding agent skills for various tools like Claude Code, GitHub Copilot, and Cursor, with support for JSON output and verbose debugging.

lib/rage/cli · high confidence

New RageController::API with dynamic action registration and custom renderer support

The \lib/rage/controller\ area introduces a new \RageController::API\ base class that dynamically generates action methods via \\_\_register\_action\, integrating support for \before\_action\, \after\_action\, \around\_action\, \rescue\_from\, and parameter wrapping. This controller also supports custom renderers through the \RageController::Renderers\ module, which intercepts the \render\ method to allow user-defined rendering logic while ensuring only one renderer is active per call.

lib/rage/controller · high confidence

New application template scaffolding

The new app generator now provides a complete project structure including environment-specific configuration files (development, production, test) that set up server workers, ports, and logging (defaulting to JSON formatter in production), a base ApplicationController inheriting from RageController::API, a default root route, and standard Rakefile/config.ru entry points.

lib/rage/templates · high confidence

New middleware components for CORS, request tracking, and development reloading

This update introduces several new middleware classes to the Rage framework. Developers can now enforce Cross-Origin Resource Sharing (CORS) policies via \Rage::Cors\, which supports origin validation, method restrictions, and credential handling. Request tracing is enhanced with \Rage::RequestId\, which propagates the \X-Request-Id\ header through logs and responses while sanitizing input. For development workflows, \Rage::Reloader\ enables automatic code reloading on filesystem changes, and \Rage::OriginValidator\ provides a dedicated component for validating request origins. Additionally, \Rage::FiberWrapper\ manages fiber scheduling for request execution, and \Rage::BodyFinalizer\ ensures response bodies are properly closed.

lib/rage/middleware · high confidence

New telemetry spans for fibers, events, and streaming

This change introduces a comprehensive set of new telemetry span definitions within the \lib/rage/telemetry/spans\ directory, expanding observability across the framework. New spans now cover core fiber lifecycle events (\core.fiber.spawn\, \core.fiber.await\, \core.fiber.dispatch\), event publishing and processing (\events.event.publish\, \events.subscriber.process\), and real-time streaming capabilities including WebSocket handshakes (\cable.websocket.handshake\), Cable channel actions (\cable.action.process\, \cable.connection.process\), and both bounded and unbounded SSE streams (\sse.stream.process\, \sse.stream.broadcast\). Additionally, deferred task handling is now observable via \deferred.task.enqueue\ and \deferred.task.process\ spans, allowing users to track background job execution and context propagation.

lib/rage/telemetry/spans · high confidence

Behavioural changes

ActiveRecord integration and connection pool patching for standalone mode

The standalone setup now automatically establishes an ActiveRecord database connection when a DATABASE\_URL or config/database.yml is present, merging configurations and validating the connection. It also patches the ActiveRecord connection pool to work correctly with fibers by overriding connection cache keys and, for versions prior to 7.1, handling the :all role argument. Additionally, it implements manual connection release logic for nested fibers in older ActiveRecord versions (pre-7.2) and enforces a minimum compatibility requirement of ActiveRecord 6+.

lib/rage/ext · high confidence

Custom connection pool with health monitoring and fiber-aware management

The application now uses a custom ActiveRecord connection pool implementation that monitors connection health, automatically reconnects idle or broken connections, and manages connection lifecycles in a fiber-aware manner. This ensures more robust database connectivity by proactively detecting and fixing connection issues, reducing the likelihood of connection timeouts or failures during operation.

_lib/rage/ext/active\record · high confidence

Excludes test dependencies during setup

The setup script now runs bundle install with the BUNDLE\_WITHOUT=test environment variable, ensuring that test-related gems are not installed during the initial environment setup process.

bin · high confidence

New high-performance router with host constraints and Rails integration

The application now uses a completely rewritten router engine (lib/rage/router) based on a static trie structure for faster route matching. Users can define routes using a DSL similar to Rails, supporting HTTP methods, path parameters, and host constraints (via string or regex). The router includes a \Cascade\ mechanism that allows requests to fall back to a Rails application when a route is not found or explicitly cascaded, enabling hybrid usage. It also supports mounting other Rack applications and provides utilities for converting controller paths to class names.

lib/rage/router · high confidence

Rage application entry point consolidated into rage-rb

The main Rage module entry point has been refactored to load the core application logic from a new \lib/rage-rb.rb\ file. This change centralizes the application builder, configuration, routing DSL, and environment access methods, while the original \lib/rage.rb\ now simply requires this new file. Users will see no functional change, but the internal structure of the library is now more modular, separating the core application interface from versioning and legacy stubs.

lib · high confidence

Support legacy routing syntax and explicit controller/action options

The router DSL now supports legacy hash notation (e.g., \get '/path' =\> 'controller\#action'\) and legacy root notation (e.g., \root 'controller\#action'\) for backward compatibility. It also allows explicit \:controller\ and \:action\ keyword arguments in route definitions (e.g., \get :path, controller: :users\), deriving the target handler from these options or the current controller context. Additionally, the \:as\ option is accepted but ignored, as named route helpers are not currently generated.

_lib/rage/router/dsl\plugins · high confidence

Updated database configuration templates and added base model structure

New application templates now include a base \ApplicationRecord\ model class and environment-specific database configuration files for MySQL (mysql2 and trilogy adapters), PostgreSQL, and SQLite3. The database configs introduce connection pool tuning via the \DB\_MAX\_CONNECTIONS\ (or \DB\_MAX\_THREADS\ for trilogy) environment variable, defaulting to 5 connections, and allow users to select their preferred database engine when scaffolding a new app.

lib/rage/templates/db-templates · high confidence

Test coverage

Add integration test application configuration; Added RSpec test helpers for Cable and request testing; Added comprehensive test coverage for RageController::API; Added comprehensive test suite for the Rage router; Added daemon test fixtures for integration testing; Added integration test application configuration; Added integration test application controllers; Added integration test fixtures for RageCable channels and connection; Added integration tests for WebSocket protocols and connection management; Added integration tests for server capabilities; Added integration tests for telemetry controller and exception handling; Added test coverage for OpenAPI parsers in spec/openapi/parsers/ext; Added test coverage for Rage CLI, hooks, request, response, and uploaded file components; Added test coverage for Rage Cable Channel lifecycle and streaming; Added test coverage for core Rage components; Added test coverage for custom renderer configuration; Added test coverage for the Cable subsystem; Added test coverage for the Rage::Deferred subsystem; Added test fixtures for isolated cable presence scenarios; Added test suite for the disk-based deferred task backend; Added test support contexts for mocking classes and routes; Added test support helpers for controllers, integration, websockets, and reactors; Added tests for ActiveRecord extension integration; Added tests for OpenAPI parser components; Added tests for OpenAPI spec parsing and HTML rendering; Added tests for Rage Telemetry components; Added tests for the OpenAPI builder's tag parsing logic; Added tests for the OpenAPI validation and Skills CLI commands; Added tests for the Pub/Sub API and Redis adapter; Added tests for the RequestId middleware; Added tests for the event system; Added unit tests for the Server-Sent Events (SSE) implementation.

Dependencies

Add Appraisal gemfiles for ActiveRecord 7.0–8.1

New Appraisal gemfiles have been added to support testing against ActiveRecord versions 7.0, 7.1, 7.2, 8.0, and 8.1. These files configure the test environment with the corresponding ActiveRecord gem, along with standard test dependencies such as RSpec, database drivers (pg, mysql2), and the \websocket\ gem (version \~\> 1.2) for versions 7.1 and above.

gemfiles · high confidence

Initial gemspec and dependency configuration for rage-rb

The project now includes a formal gemspec (\rage.gemspec\) and template Gemfile (\lib/rage/templates/Gemfile\) that define the \rage-rb\ framework's runtime dependencies, including \thor\, \rack\ (\< 4), \rage-iodine\ (\~\> 6.0), \zeitwerk\ (\~\> 2.6), \rake\, \logger\, and \irb\, while requiring Ruby 3.3.0 or higher. Additionally, the main development Gemfile adds testing and tooling dependencies such as \rspec\, \rubocop\ (\~\> 1.65.0), \yard\, and various database drivers (\pg\, \mysql2\), and the integration test app Gemfile specifies dependencies for \alba\, \prism\, and \redis\.

(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 55 → 54 (-1.6)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 62 → 62 (+0.0)
  • Architecture 89 → 88 (-1.3)
  • Maturity 63 → 63 (+0.0)
  • Readiness 59 → 59 (+0.0)
  • Security 44 → 41 (-3.4)
  • Domain Modelling 100 → 100 (+0.0)

Resolved (4)

  • Ambiguous broadcast API: Rage.Cable.broadcast and Channel.broadcast appear to do the same thing (broadcasting to a stream), while Channel.broadcast_to suggests a different intent (broadcasting to a streamable object). It is unclear if Channel.broadcast is a convenience wrapper for Channel.broadcast_to or if they serve distinct purposes (e.g., raw stream name vs. resolved streamable).
  • Inconsistent argument order: use takes (middleware, args, block), while insert_before and insert_after take (existing, new_middleware, args, block). The position of args and block relative to the middleware reference changes, which is error-prone for developers.
  • Inconsistent handling of connection identification: Connection.identified_by takes a list of identifiers (likely for setting up the connection), while RemoteDisconnect.disconnect takes a single identified_by argument (likely for targeting). The naming identified_by as a method on Connection is also confusing compared to standard Rails ActionCable where identified_by is a class-level declaration.
  • Inconsistent parameter ordering in backend methods: add_task has task first, while add_dead_task has task_id first. This inconsistency makes it difficult to write generic backend wrappers or switch implementations.

Changes since last survey

  • 4 commits — 4 feature/other, 0 fixes

By area

  • lib/rage — 2 commits
  • (root) — 1 commit
  • .github/workflows — 1 commit

Notable commits

  • change: Bump version
  • change: Cap read length to the remaining buffer space (#416)
  • change: Improve error message when base64 is not available
  • change: [Cable] Support passing protocol options when using remote disconnect (#415)

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

Survey your own repository

rage-rb/rage 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 eb853ad722561c1a60307c0e2088980fcbe952df — 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.