Skip to content
CAI
Software that uses CAICheck a score

rage-rb/rage

67.1

Adequate · 19 September 2026

13.3k

lines of production code

Ruby

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

Rage is a high-performance, fiber-based Ruby web framework built on Iodine that provides a complete application stack including a CLI, router, and middleware suite. It supports real-time communication through WebSocket (with ActionCable compatibility) and Server-Sent Events, alongside an in-process deferred task queue for background processing. The system features robust integrations with ActiveRecord for database management and includes tools for generating OpenAPI specifications and scaffolding applications.

How it got here

2023 — Initial release of the Rage framework

18 changes.

This period marks the initial release of the Rage web framework, introducing a high-performance, fiber-based Ruby server with a custom router, controller API, and middleware suite. The work included establishing the core application structure, CLI tools, and comprehensive test coverage for all major components to ensure stability.

2024 — WebSocket and OpenAPI feature expansion

15 changes.

This period focused on introducing real-time communication capabilities through the new Rage::Cable module and comprehensive OpenAPI specification generation for APIs. The work included building robust underlying infrastructure, such as fiber-aware ActiveRecord connection pooling and legacy routing support, to enable these features. Extensive test coverage was added across the new Cable, OpenAPI, and core framework components to ensure stability.

2025–2026 — real-time and observability infrastructure

19 changes.

This period focused on building core infrastructure for real-time communication and system observability, introducing Server-Sent Events, WebSocket protocols, and a low-level Pub/Sub API with Redis support. It also established a robust event-driven architecture and telemetry system to monitor framework operations, alongside an in-process deferred task queue for background processing. Comprehensive test suites were added to validate these new subsystems, including integration tests for websockets and unit tests for the deferred and telemetry modules.

Features

Add ActionCable and Raw WebSocket JSON protocols

The library now includes two new cable protocols: \ActioncableV1Json\, which implements the standard ActionCable v1 JSON protocol for compatibility with Rails clients, and \RawWebSocketJson\, which allows direct WebSocket connections where each connection maps to a single channel subscription. These additions provide a base protocol class and specific implementations to handle connection lifecycle, message serialization, and streaming for these two distinct communication styles.

lib/rage/cable/protocols · high confidence

Add Server-Sent Events (SSE) support with streaming, broadcasting, and message formatting

The application now supports Server-Sent Events (SSE) for real-time updates. Users can render single-value responses, unbounded streams (Enumerators), or manual streams (Procs) via the \render sse:\ directive. The \Rage::SSE\ module provides factory methods to create formatted \Message\ objects with custom IDs, event types, and retry intervals, as well as unbounded \Stream\ objects for broadcasting. Broadcasting allows pushing messages to all clients subscribed to a specific stream name, with support for buffering messages before connections are established. A \ConnectionProxy\ ensures safe interaction with the underlying connection, preventing writes to closed streams.

lib/rage/sse · high confidence

Add low-level Pub/Sub API with Redis adapter

The \lib/rage/pubsub\ location now provides a low-level publish/subscribe API for inter-process and cross-node communication, enabling features like \Rage::Cable\ and \Rage::SSE\ to broadcast messages across multiple servers. This includes a new \Rage::PubSub\ module with \subscribe\, \unsubscribe\, and \publish\ methods, and a Redis adapter (\lib/rage/pubsub/adapters/redis.rb\) that uses Redis Streams for message delivery. The adapter requires the \redis-client\ gem, supports Redis 6+, and allows configuration via \config/pubsub.yml\ for options like \adapter\, \url\, \channel\_prefix\, \pool\_size\, and \pool\_timeout\. Messages are published to a Redis stream and polled by background workers, with error handling and backoff strategies included.

lib/rage/pubsub · high confidence

Added database configuration templates and base models for new applications

New template files have been added to the \lib/rage/templates/db-templates\ directory to support database initialization for new applications. This includes an \ApplicationRecord\ base model and seed file templates, along with environment-specific database configuration templates for MySQL (using both \mysql2\ and \trilogy\ adapters), PostgreSQL, and SQLite3. These templates allow users to scaffold applications with pre-configured database connections and connection pool settings (e.g., \DB\_MAX\_CONNECTIONS\ or \DB\_MAX\_THREADS\).

lib/rage/templates/db-templates · 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, invoking the main application logic via the 'Rage::CLI::App.start' method.

exe · high confidence

Initial release of the Rage web framework

This change introduces the Rage framework, a high-performance, fiber-based Ruby web server built on Iodine. It provides a complete application stack including a CLI for scaffolding and management, a router, middleware (CORS, request ID, reloader), and support for cookies, sessions, and custom renderers. The framework features a built-in fiber scheduler for concurrent I/O, a daemon system for background processes, and an extension API for integrating with other libraries.

lib/rage · high confidence

Introduce OpenAPI specification generation for Rage APIs

The \lib/rage/openapi\ module now provides a complete system for generating OpenAPI 3.0.0 specifications from Rage controllers. It parses Ruby source code using the Prism library to extract documentation tags (such as \@param\, \@response\, \@request\, and \@auth\) and converts them into a structured specification. The module includes a built-in middleware that serves the generated JSON spec at \/json\ and a SwaggerUI interface at the root path. It supports various serializer integrations (Alba, Blueprinter, ActiveRecord) and allows for shared component definitions via configuration files.

lib/rage/openapi · high confidence

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

A new event-driven system is available in \Rage::Events\, allowing you to define event data structures and register subscriber classes to handle them. Subscribers can be configured to run synchronously or asynchronously (deferred) and support inheritance, multiple event subscriptions, and custom error handling via \rescue\_from\. Events can also carry optional context data passed to subscribers, and the system automatically loads subscribers in development environments.

lib/rage/events · high confidence

Introduce built-in WebSocket support via Rage::Cable

Adds a new \Rage::Cable\ module that provides real-time, WebSocket-based communication for Rage applications, similar to Action Cable. This feature allows developers to mount a separate WebSocket application, define connections and channels, subscribe clients to named streams, and broadcast messages in real time. The implementation includes a router for handling connection authentication and subscription logic, a channel class with support for hooks and rescue handlers, and integration with the existing PubSub module for cross-process broadcasting.

lib/rage/cable · high confidence

Introduce durable disk storage and 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 immediate and delayed execution, automatic recovery of tasks from crashed workers, and durable dead-letter storage for tasks that fail after exhausting retries. A \Nil\ backend is also added as a no-op implementation for environments where deferred task persistence is not required.

lib/rage/deferred/backends · high confidence

Introduce in-process deferred task queue with retry and scheduling

Adds \Rage::Deferred\, an in-process background task system that allows scheduling tasks for later execution with optional delays or specific future times. Tasks support automatic retries with a configurable maximum attempt count and a quartic backoff strategy, and can be persisted to disk for durability across restarts. The system includes a scheduler for periodic tasks, middleware chains for enqueue and perform phases, and backpressure handling to manage queue load.

lib/rage/deferred · high confidence

Introduce structured and text log formatters with request context support

The logging system now includes dedicated formatters for structured JSON and human-readable text output. The new \Rage::JSONFormatter\ and \Rage::TextFormatter\ automatically enrich log entries with HTTP request details (method, path, controller, action, status, duration) when available, alongside support for fiber-local tags and context. This allows users to configure the log output format via \Rage.configure\ and benefit from consistent, structured logging that captures both application messages and request lifecycle data.

lib/rage/logger · high confidence

Introduces a new telemetry system for monitoring framework operations

The \lib/rage/telemetry\ module now provides a structured way to observe and react to internal framework events. Users can define custom handlers by subclassing \Rage::Telemetry::Handler\ and using the \handle\ method to subscribe to specific spans (such as controller actions, WebSocket handshakes, or SSE broadcasts) with support for wildcard matching. The system includes a \Rage::Telemetry::Capacity\ module to expose runtime metrics like the number of queued connections, and a \Rage::Telemetry.every\ method to run periodic tasks in fibers without blocking the server. This allows for centralized observability, error reporting, and performance monitoring directly within the application lifecycle.

lib/rage/telemetry · 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\ (supporting models, controllers, and migrations) and create new projects with \rage new-app\, which optionally configures database gems. 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 OpenAPI parsers for ActiveRecord, Alba, and Blueprinter serializers

The OpenAPI generator now includes dedicated parsers for ActiveRecord models, Alba resources, and Blueprinter serializers. For ActiveRecord, it automatically maps column types (e.g., integer, boolean, date, json) to OpenAPI schema types while excluding common metadata fields like \id\ and \created\_at\. For Alba, it parses resource definitions, handling root keys, key transformations, associations, and nested resources with recursion guards. For Blueprinter, it supports view-based parsing, identifier fields, associations, and root key options, resolving nested blueprints via schema references.

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

New RageController::API base class 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\, enabling support for \before\_action\, \after\_action\, \around\_action\, and \rescue\_from\ callbacks with conditional execution. It also adds parameter wrapping capabilities and integrates with ActiveRecord for query caching and connection management. Additionally, a new \RageController::Renderers\ module allows registering custom renderers that override the default \render\ behavior, providing flexibility in response formatting for API controllers.

lib/rage/controller · high confidence

New application template with environment-specific configuration

The generated application now includes a structured configuration system with separate environment files for development, production, and test. Development mode defaults to a single worker process, port 3000, STDOUT logging, and a Reloader middleware for code reloading. Production mode also defaults to port 3000 but uses JSON-formatted logs at INFO level. Test mode directs logs to a file and uses a single worker. The template also provides a base ApplicationController inheriting from RageController::API, a default root route returning a success message, and a Rakefile that loads Rage tasks.

lib/rage/templates · high confidence

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

This update introduces several new middleware components to the Rage framework. Developers can now enforce Cross-Origin Resource Sharing (CORS) policies via \Rage::Cors\, which supports flexible origin matching (including regex and mixed protocols) and standard CORS headers. Request tracing is enhanced with \Rage::RequestId\, which propagates the \X-Request-Id\ header for consistent logging and generates IDs if missing. For development workflows, \Rage::Reloader\ enables automatic code reloading on filesystem changes, while \Rage::OriginValidator\ provides an additional layer to reject requests from unauthorized origins. Finally, \Rage::FiberWrapper\ ensures proper fiber scheduling for async requests, and \Rage::BodyFinalizer\ handles response body cleanup.

lib/rage/middleware · high confidence

New telemetry spans for fibers, events, and streaming

The telemetry system now emits additional span types to provide deeper observability into internal framework operations. New spans track fiber lifecycle events (\core.fiber.spawn\, \core.fiber.await\, \core.fiber.dispatch\), event publishing and processing (\events.event.publish\, \events.subscriber.process\), and streaming activities including Cable broadcasts (\cable.stream.broadcast\) and SSE broadcasts (\sse.stream.broadcast\). These additions allow users to monitor the performance and behavior of background tasks, event handlers, and real-time data streams within their applications.

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

Add RuboCop configuration and update Code of Conduct

The project now includes a \.rubocop.yml\ file that enforces a consistent code style for Ruby 3.3+ and excludes template directories from linting. Additionally, the Code of Conduct has been updated to version 2.1 of the Contributor Covenant, with revised inclusivity language and an updated community leadership email address.

(repo-wide) · 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

Test coverage

Added RSpec test helpers for Cable and request testing; Added comprehensive test coverage for RageController::API; Added comprehensive test coverage for core Rage components; Added comprehensive test suite for the Rage router; Added integration test application configuration; Added integration tests for ActionCable and Raw WebSocket JSON protocols; Added integration tests for server capabilities; 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 actions, streaming, and connection handling; Added test coverage for custom renderer configuration; Added test coverage for the Rage::Deferred subsystem; 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 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 unit tests for the Server-Sent Events (SSE) implementation; Integration test application scaffolding.

Dependencies

Add Appraisal gemfiles for ActiveRecord 7.0 through 8.1

New gemfiles have been added to the gemfiles directory to support testing against ActiveRecord versions 7.0, 7.1, 7.2, 8.0, and 8.1. These files, generated by Appraisal, allow the library's test suite to run against each specific version of ActiveRecord, ensuring compatibility across this range of versions.

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 watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 67.

Lenses

  • Code Health 92
  • Architecture 91
  • Maturity 67
  • Readiness 58
  • Security 73
  • Domain Modelling 100

Changes since last survey

  • 300 commits — 271 feature/other, 29 fixes

By area

  • lib/rage — 144 commits
  • (root) — 82 commits
  • (repo) — 31 commits
  • spec/integration — 14 commits
  • .github/workflows — 10 commits
  • spec/events — 4 commits
  • spec/configuration_spec.rb — 3 commits
  • spec/deferred — 2 commits
  • spec/openapi — 2 commits
  • spec/telemetry — 2 commits
  • lib/rage-rb.rb — 1 commit
  • spec/errors_spec.rb — 1 commit
  • spec/ext — 1 commit
  • spec/log_processor_spec.rb — 1 commit
  • spec/sse — 1 commit
  • spec/support — 1 commit

Notable commits

  • fix: CLI tests and fixes
  • fix: Fix IPv6 request domain handling (#312)
  • fix: Fix Rage::Errors spec
  • fix: Fix SystemStackError in Alba parser with circular associations (#268)
  • fix: Fix Rage::UploadedFile#close (#262)
  • fix: Fix rescue_from
  • fix: Fix array cookie domain case matching (#328)
  • fix: Fix capacity tests
  • fix: Fix changelog
  • fix: Fix config docs
  • fix: Fix cookie domain matching for host ports (#309)
  • fix: Fix duplicate Rake tasks
  • fix: Fix error message when RbNaCl is not loaded (#361)
  • fix: Fix integration tests
  • fix: Fix queued_connections API to use Iodine::Perf module
  • fix: Fix reloading in dev with user-level fibers
  • fix: Fix rubocop
  • fix: Fix rubocop
  • fix: Fix tests for Ruby 3.2
  • fix: Merge pull request #177 from rage-rb/global-log-context-hotfix
  • …and 280 more

Written by watchdog.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 19 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 b8c9a6c72733cc5e1b0d161abc5e8ecddbb48fbe — 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-b51f968c9b10.