CodeVetter
← All unpacks
CodeVetter · Repo Unpack evidence

rails/rails

Scanned commit be63fd9b44 dated 2026-09-21 — last upstream commit. Generated by codevetter 1.12.0 on 2026-09-22.

github.com/rails/rails ↗ · 4000 files · 23.0 MB · scan capped

Welcome to Rails What's Rails? Rails is a web application framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern.

Deep analysis by cli:grok via the grok CLI on 2026-09-22 (443s) — every claim below links to its cited source files.

Overview

Ruby on Rails 8.2.0.alpha is a monorepo of loosely coupled gems that together implement a Model-View-Controller web framework. The meta-gem rails pins Active Support, Active Model, Active Record, Action View, Action Pack, Action Mailer, Active Job, Action Cable, Active Storage, Action Mailbox, Action Text, and Railties to one version and requires Ruby >= 3.3.1. Applications are created and driven by the rails CLI in Railties; boot is a Railtie initializer pipeline, HTTP is a Rack middleware stack plus the Journey router, and persistence is Active Record over sqlite3, mysql2/trilogy, or postgresql. This tree is distinctive for versioned load_defaults through 8.2 (header-only CSRF, YJIT, enqueue-after-commit), encrypted credentials, multi-database connections, and first-party engines for jobs, WebSockets, file storage, inbound email, and rich text.

System map

The repository root is a Bundler workspace plus an npm workspace, not a single application. railties/exe/rails is the user-facing executable; rails/all.rb is the full framework require list; Rails::Application#initialize! is the runtime boot boundary. Persistence and file storage sit behind adapter registries. The in-repo test entry points are Rake and each component's bin/test. Gem and npm publishing is tools/releaser, triggered by the GitHub Actions release workflow; the full suite gate documented for releases is Buildkite, whose pipeline YAML is not in this checkout.

All 14 system map claims →

Feature catalog

User-facing surface area is the rails CLI, the generators that stamp a new app, the Rack endpoints mounted by the framework itself, and the adapter-backed subsystems for jobs, cable, storage, mail, and passwords. Generated apps load framework defaults for the version they were created with and, unless skipped, depend on Solid Cache, Solid Queue, Solid Cable, Thruster, and Kamal. Guides and bug-report templates are part of the product, not side docs.

All 15 feature catalog claims →

Data flow

Three boundaries dominate. HTTP enters as a Rack env, passes DefaultMiddlewareStack, and is recognized by Journey into a controller action whose callbacks and render produce a Rack triple. Records enter through Active Record attribute hashes, are validated and callback-wrapped, then inserted or updated on a leased connection. Secrets enter as ENV or a key file, are decrypted with AES-128-GCM, and feed secret_key_base, which signs and encrypts cookies and messages. Jobs, uploads, and filtered logs are side channels off those paths.

All 13 data flow claims →

Behavior traces

Four flows are fully ordered in source: process start for an existing app, one HTTP request after boot, an Active Record insert, and editing encrypted credentials. Action Cable's socket open and Active Job's perform_later are shorter traces on the same boot. Names below are the methods actually called, not a conceptual MVC sketch.

Testing signals

The framework tests itself with Minitest, one test/ tree per component, and a shared runner in tools/test.rb. Active Record and Active Job are matrixed by adapter at the Rake layer. Browser-level coverage uses Capybara and Selenium and is declared for the framework tests, not for a sample app. GitHub Actions in this repo does not run that matrix; release docs point at Buildkite. JavaScript for Action Cable is a separate QUnit suite.

Risk map

The dangerous paths are the ones that eval, shell out, decrypt secrets, or accept network input before an app's own auth. CSRF and host authorization changed meaning across load_defaults versions, so an edit that looks local can change every newly generated app. Several public framework routes (health, storage, mailbox ingress) are safe only when the app understands their actual guarantees. The release webhook and the local .Gemfile hook are smaller but real trust boundaries.

All 15 risk map claims →

Extension points

Rails is extended by subclassing Railtie or Engine, by dropping files that match command and generator globs, and by registering adapters. The frameworks that ship in this repo are themselves just those plugins. New queue adapters are explicitly not an accepted extension; password algorithms, storage services, database protocol names, and middleware are.

All 13 extension points claims →

Contributor handoff

Edit one component at a time and treat Railties configuration and the generator templates as a second component whenever a default changes. The safe test loop is that component's bin/test, plus an adapter rake task if the change touches SQL or jobs. Read the load_defaults comment before adding a flag. Do not add Active Support core extensions or new Active Job adapters. Assume GitHub Actions will not prove the change is green.

Languages

LanguageFilesShare of source
Ruby346498%
YAML211docs/config
Markdown129docs/config
JavaScript612%
HTML45docs/config
CSS12docs/config
JSON9docs/config
Sass90%

Start reading here

Probable source entrypoint: actionview/ — inferred from the directory tree and manifest, not the upstream docs.

Source roots

actionview/ (529 files) activerecord/ (529 files) activesupport/ (529 files)

Repository structure

Top-level pathFiles
actionview/529
activerecord/529
activesupport/529
railties/528
actionpack/509
activestorage/225
actiontext/176
activemodel/164

Docs found: AGENTS.mdCONTRIBUTING.mdREADME.md

Package

Gemfile — , 0 declared dependencies.

CI & config entrypoints

Structural health signals

Average score 8.7/10 across 96 analyzed source files; 2 hotspots surfaced.

These are deterministic review leads — size, churn, and structural signals — not proof of a bug in this project.

Recent history