Skip to content

@blazetrails/trailties ​

MeasureValue
Rails counterpartrailties v8.0.5.2
API methods matched100% (1764 of 1764)
Rails tests matched91% (825 of 906) (20 permanent)
Ruby files ported145
Ruby files unported0
Measured atfe89b44726

Gaps by file ​

Ported files with Rails methods or tests still missing, largest gap first.

Ruby fileTypeScript fileMethods missingTests matched
application/configuration.rbapplication/configuration.ts0339 / 400 (6 permanent)
commands/runner/runner_command.rbcommands/runner.ts00 / 7
engine/lazy_route_set.rbengine/lazy-route-set.ts06 / 12
commands/middleware/middleware_command.rbcommands/middleware.ts033 / 38
engine.rbengine.ts00 / 2

Missing methods ​

None recorded for this package.

Unported Ruby files ​

Every compared Ruby file has a TypeScript file.

Deviation receipts ​

JSDoc receipt tags in the package's source, by the receipt each carries.

TagPERMANENTCONVERGEABLEnone
@noRailsEquivalent5130
@missingRailsCall1240
@missingRailsArgs3900
@missingRailsName100
@inventedArm6030
@perf100
@inlinedFrom0018
@internal00577

Permanently skipped tests ​

Config files are TypeScript modules (config_for, ActiveSupport::ConfigurationFile) (3)
importmap-rails and propshaft are out of scope; JavaScript is served by Vite (vite_rails) (7)
Runtime facts Node does not expose (3)
Method visibility is compile-time only (Module#private, basic_obj_respond_to's pub) (1)
Core extensions are not installed on native prototypes (config.active_support.bare) (3)
The application loader is Zeitwerk (Rails.autoloaders) (4)
The application loader is Zeitwerk (Rails.autoloaders) (1)
A sqlite db:drop in a read-only directory fails upstream too (dbs_test.rb's bad permissions) (1)
A module's initialize is inlined into the constructor (@inlinedFrom) (1)
Templates are precompiled (Template#compile's module_eval) (1)
A Gemfile is a package.json (GemfileEntry, bundle install, gemspec) (45)
Trilogy is out of scope (trilogy_adapter.rb, adapters/trilogy/) (5)
TestUnitReporter has no Minitest::StatisticsReporter superclass (test_unit/reporter.rb:7) (4)

Ratified deviations ​

Each rule below is ratified in the repository's CLAUDE.md files. The first paragraph is quoted; the link opens the full section at this build's commit.

A module's initialize is inlined into the constructor (@inlinedFrom) ​

Ruby lets a module define initialize and reach the next one up the ancestor chain through super. A JS constructor has no such chain through a mixin. trails has no initialize methods: Ruby's new / initialize chain is written as JS constructors, by two rules.

CLAUDE.md →

Method visibility is compile-time only (Module#private, basic_obj_respond_to's pub) ​

Ruby's basic_obj_respond_to (vendor/ruby/v3.3.11/vm_method.c:2864-2879) takes a pub flag and hands it to method_boundp (:1788-1818), so respond_to?(:m) and respond_to?(:m, true) can answer differently for the same receiver, and Kernel#public_send (vm_eval.c:1350) raises NoMethodError "private method '…' called for …" where send dispatches. Visibility is a property of the method entry, readable at run time.

CLAUDE.md →

Runtime facts Node does not expose ​

Each of these is a Ruby or C-library fact with no Node source. They are ratified here so no port re-derives them.

CLAUDE.md →

Core extensions are not installed on native prototypes (config.active_support.bare) ​

Rails' active_support/railtie.rb requires active_support/all unless config.active_support.bare, which reopens Array, String and the other core classes ([1, 2, 3].sample, "hello".exclude?). trails installs nothing on Array.prototype, String.prototype or any other native prototype: a core extension is a free function the caller imports. So active_support.bare has no observable arm, and a Rails test that asserts a core-ext method is present or absent on a native value (vendor/rails/v8.0.5.2/railties/test/application/initializers/frameworks_test.rb:186-201) is parked as it.skip under a PERMANENT-SKIP: line citing this section.

CLAUDE.md →

importmap-rails and propshaft are out of scope; JavaScript is served by Vite (vite_rails) ​

A Rails 8 app serves JavaScript through importmap-rails and assets through propshaft (railties/lib/rails/generators/app_base.rb's javascript default of importmap), and an older one through Sprockets (sprockets-rails). trails ports none of the three. Sprockets was ruled out of scope by the operator on 2026-11-19; the heading keeps its original wording so citations resolve. Vite fills both roles, through ports of the vite_ruby and vite_rails gems (vendor/vite_ruby/v3.11.1/): ViteRuby::Config reads config/vite.json, ViteRuby::Manifest resolves entries, ViteRuby::DevServerProxy proxies to the Vite dev server, and ViteTrails::TagHelpers renders the tags. The npm vite, vite-plugin-ruby, @hotwired/turbo-rails and @hotwired/stimulus are dependencies, not ports.

CLAUDE.md →

Templates are precompiled (Template#compile's module_eval) ​

Rails compiles a template at its first render: compiled_source (vendor/rails/v8.0.5.2/actionview/lib/action_view/template.rb:449-492) wraps the handler's Ruby in a def, and compile (:500-539) hands it to mod.module_eval(compiled_source, identifier, offset). JS can only evaluate source text through eval, new Function or vm, each of which runs code that was never type-checked, and a with scope chain is sloppy-mode only, so it cannot appear in an ES module. By operator ruling (2026-10-19, 2026-10-20), file-backed .tse templates are precompiled in every environment, and shipped code has no eval pipeline. The split is:

packages/actionview/CLAUDE.md →

Trilogy is out of scope (trilogy_adapter.rb, adapters/trilogy/) ​

Rails ships a second MySQL adapter over Trilogy, a C client library with Ruby bindings. Trilogy has no Node client and trails will not port it: a TrilogyAdapter built on the mysql2 npm driver would be a second Mysql2Adapter under a Rails name that means "not mysql2". MySQL goes through Mysql2Adapter.

packages/activerecord/CLAUDE.md →

Thor commands register through an explicit methodAdded ​

Thor registers a command whenever the VM fires method_added for a public def (vendor/thor/v1.4.0/lib/thor/base.rb:729-745). Thor.create_command (vendor/thor/v1.4.0/lib/thor.rb:560-583) consumes the pending @usage / @desc / @method_options the preceding desc / method_option calls set, and clears them. inherited (base.rb:721-725) registers every subclass in Thor::Base.subclasses the moment it is defined.

packages/trailties/CLAUDE.md →

Thor dispatch is async ​

Thor runs synchronously end to end: Thor::Base.start (vendor/thor/v1.4.0/lib/thor/base.rb:582-594) → dispatch → invoke_command (vendor/thor/v1.4.0/lib/thor/invocation.rb:122-129) → Command#run (vendor/thor/v1.4.0/lib/thor/command.rb:21-38) → the command method, each returning its value in line.

packages/trailties/CLAUDE.md →

Server blocks are awaited ​

Rails runs server blocks synchronously: config.ru calls Rails.application.load_server (railties/lib/rails/engine.rb:485-488), which calls run_server_blocks. Rails::Railtie#run_server_blocks (railtie.rb:288-290) yields each registered block in turn, and Rails::Application#run_server_blocks (application.rb:586-589) runs every railtie's before its own. A block's I/O blocks the thread, so the server binds only after every block has returned.

packages/trailties/CLAUDE.md →

The application loader is Zeitwerk (Rails.autoloaders) ​

RFC 0213 reversed the "no autoloader" ruling: Zeitwerk is vendored and ported, and Trails.autoloaders holds main and once (railties/lib/rails/autoloaders.rb). The directory scan is gone.

packages/trailties/CLAUDE.md →

A package-shipped engine's root is its package root (Engine.find_root) ​

Rails' Engine.find_root (vendor/rails/v8.0.5.2/railties/lib/rails/engine.rb:375-377) is find_root_with_flag "lib", from: it walks up from called_from to the first directory holding lib/, which for a gem is the gem's root. An npm package has src/ and dist/, never lib/, so the walk from an engine's dist/ either finds nothing and raises, or, under node_modules, climbs into the host application and takes the application's lib/ for the engine's root.

packages/trailties/CLAUDE.md →

Rails::Command::Base.inherited runs at a subclass's first methodAdded ​

Base.inherited adds a named subclass not ending in Base to Rails::Command.subclasses (vendor/rails/v8.0.5.2/railties/lib/rails/command/base.rb:59-65). JS has no hook at extends (CLAUDE.md § "inherited is deferred to own-property memo guards"), so Base.methodAdded seats the class the first time it adds a command, and Base.namespace(name) seats it when it names its namespace, both with inherited's guard. That second seat registers a class that defines no command of its own (RakeCommand calls namespace "rake", vendor/rails/v8.0.5.2/railties/lib/rails/commands/rake/rake_command.rb) and answers through printing_commands / perform. A subclass that does neither is never seated, which loses nothing: find_by_namespace has nothing to dispatch.

packages/trailties/CLAUDE.md →

TestUnitReporter has no Minitest::StatisticsReporter superclass (test_unit/reporter.rb:7) ​

trails test hands off to Vitest (RFC 0212 open question 1, trails#9567), so Rails::TestUnitReporter < Minitest::StatisticsReporter (vendor/rails/v8.0.5.2/railties/lib/rails/test_unit/reporter.rb:7) has no superclass here, and its super calls have nothing to reach. test-unit/vitest-reporter.ts is the sole reporter of a trails test run. Its VitestReporter stands in for Minitest's reporter calls, and carries the @noRailsEquivalent PERMANENT receipt against this section.

packages/trailties/CLAUDE.md →

SourceAnnotationExtractor.enumerate is async (begin require "prism") ​

source_annotation_extractor.rb:3-9 requires Prism at load, rescuing LoadError. ESM has no synchronous require for an optional peer, and a top-level await is barred from a package's root import graph (scripts/test-deps/yaml-optional-dependency.test.ts), so enumerate awaits the typescript import, the shape of § "An adapter file is loaded by an awaited step" in the root CLAUDE.md.

packages/trailties/CLAUDE.md →

TestParser reads TypeScript, so its Ripper fallback is not ported ​

test_unit/test_parser.rb has two arms: the Prism arm (:10-44) and, for a Ruby without Prism, class TestParser < Ripper (:52-133), which parses Ruby through Ripper's event callbacks. A trails test file is TypeScript, read through the compiler API in the Prism arm's ranges, so no Ripper event exists to handle. The fallback's nineteen members are a scoped skip in scripts/parity/conventions.ts, permanent and receipted against this section.

packages/trailties/CLAUDE.md →

runner evaluates its code argument (RunnerCommand#perform's eval) ​

RunnerCommand#perform evals a code string or stdin at TOPLEVEL_BINDING (vendor/rails/v8.0.5.2/railties/lib/rails/commands/runner/runner_command.rb:37,48). JS has no such binding, so evalToplevel in commands/runner.ts builds a sloppy-mode async function with with (TopLevel), where constants resolve. Root § "Templates are precompiled" keeps eval out of what serves production; a CLI command evaluating the string its own operator passed is not that. Ruled by the operator on 2026-11-02 (trails#9630).

packages/trailties/CLAUDE.md →

A require in the Application class body runs after the class (add_to_config) ​

Ruby's class body is ordinary code, so add_to_config (vendor/rails/v8.0.5.2/railties/test/isolation/abstract_unit.rb) can put a require "foo" there (test/application/initializers/load_path_test.rb:27-43), and it resolves because Application.inherited has already run add_lib_to_load_path! (railties/lib/rails/application.rb). The generated config/application.ts holds its configuration in a static {} block, which cannot await, and Kernel.require is an awaited step (root § "An adapter file is loaded by an awaited step"). So addToConfig inserts a string that awaits at module top level directly after the class, before autoloadLib (the template's first top-level await): the same point in load order, after Application.register has put lib on LOAD_PATH. Such a string has no this and imports what it names with await import(...). A string that does not await goes into the static {} block, as before.

packages/trailties/CLAUDE.md →

method_missing definers in this package ​

Class-specific rules under root § "Ruby protocol methods with a different JS mechanism"; its cross-table rules and docs/method-missing-definers.md apply too.

packages/trailties/CLAUDE.md →

A Gemfile is a package.json (GemfileEntry, bundle install, gemspec) ​

A trails app ships through npm and pnpm, so Rails' Gemfile, Bundler and gemspec surface (vendor/rails/v8.0.5.2/railties/lib/rails/generators/app_base.rb's GemfileEntry, gemfile_entries, the *_gemfile_entry builders, exec_bundle_command, add_bundler_platforms; plugin_generator.rb's gemspec; benchmark_generator.rb's add_ips_to_gemfile) is ported onto this mapping. Ruled by the operator on 2026-11-19.

packages/trailties/CLAUDE.md →

Config files are TypeScript modules (config_for, ActiveSupport::ConfigurationFile) ​

Rails' Application#config_for (vendor/rails/v8.0.5.2/railties/lib/rails/application.rb:292-316) reads config/<name>.yml through ActiveSupport::ConfigurationFile.parse, which runs ERB and rescues Psych::SyntaxError. A trails app's config files are TypeScript modules: configFor loads config/<name>.ts / .js and reads its default export, and never reads YAML. Its miss arm names the .ts path (Could not load configuration. No such file - <path>.ts), where Rails' application.rb:315 names the .yml one. The YAML-only arms (ERB evaluation, the "YAML syntax error occurred while parsing" message, a patched YAML.load dropping symbolize_names) have no counterpart, so a Rails test asserting one (railties/test/application/configuration_test.rb:2687, :2698, :2723) is parked as it.skip under a PERMANENT-SKIP: line citing this section. Ruled by the operator on 2026-11-25.

packages/trailties/CLAUDE.md →

A sqlite db:drop in a read-only directory fails upstream too (dbs_test.rb's bad permissions) ​

test "db:drop failure because bad permissions" (vendor/rails/v8.0.5.2/railties/test/application/rake/dbs_test.rb:251-259) expects Couldn't drop, but SQLite opens the database in WAL mode, which needs to write -wal / -shm beside it, so connecting in a chmod 0555 directory raises SQLite3::ReadOnlyException before drop runs. Rails 8.0.5.1 fails the test the same way as a non-root user, and its Process.uid == 0 guard skips it only as root. The test is parked as it.skip under a PERMANENT-SKIP: line citing this section. Ruled by the operator on 2026-11-25.

packages/trailties/CLAUDE.md →

Source ​

packages/trailties on GitHub →