docs(core): tighten Ruby group rationale to reflect measured shape
The initial comment was speculative ("individual files sometimes leak
elsewhere"). Measurement across 10 major Ruby repos showed the picture
is much stronger and closer to C++ than to Rust:
Weighted total reduction across the sample: 51% (−11.80M tokens on
92 MB of Ruby source), the highest of any language group so far.
spec/ dir rule alone drives 46 pp; file globs add the remaining 5 pp
by catching *_spec.rb in gem lib/ trees, Minitest files leaking
outside test/ in Rails engines, and helper bootstraps referenced
via require_relative.
Hero projects:
rubocop/rubocop 67% (−1.75M tok) highest percent
discourse/discourse 60% (−5.53M tok) highest absolute
ruby/ruby 59% (−3.66M tok)
rspec/rspec-rails 61% (−0.07M tok)
fastlane/fastlane 42% (−0.73M tok)
Update the block comment so a future reader lands on the right mental
model — Ruby is a big win precisely because the ecosystem clusters
tests but under a directory (`spec/`) that the starter had previously
missed entirely.
This commit is contained in:
@@ -135,12 +135,17 @@ const TEST_PATTERN_GROUPS: Array<{ label: string; patterns: string[] }> = [
|
||||
],
|
||||
},
|
||||
{
|
||||
// Ruby ecosystems split between two test frameworks with distinct
|
||||
// file-naming conventions: RSpec (`*_spec.rb` under spec/) and
|
||||
// Minitest (`*_test.rb` or `test_*.rb` under test/). The dir rules
|
||||
// catch each convention's top-level home, but individual files
|
||||
// sometimes leak elsewhere (lib/**/*_spec.rb in gem repos, engine
|
||||
// test files under app/**/*_test.rb in Rails engines).
|
||||
// Ruby clusters tests aggressively, matching the C++ shape rather
|
||||
// than Rust's inline convention. Measurement across 10 major Ruby
|
||||
// repos (rails, discourse, homebrew, jekyll, fastlane, rubocop,
|
||||
// ruby, liquid, kamal, rspec-rails) showed a 51% weighted-total
|
||||
// reduction — the highest of any language group. Almost all of
|
||||
// that comes from the newly-added `spec/` dir rule (RSpec's home);
|
||||
// the file globs below add another 5 pp on top by catching
|
||||
// `*_spec.rb` in gem-repo `lib/` trees, Minitest files that leak
|
||||
// outside `test/` in Rails engines, and the ubiquitous
|
||||
// `spec_helper.rb` / `test_helper.rb` / `rails_helper.rb` bootstrap
|
||||
// trio. Hero projects: rubocop (67%), discourse (60%, −5.53M tok).
|
||||
label: "Ruby",
|
||||
patterns: [
|
||||
"**/*_spec.rb",
|
||||
|
||||
Reference in New Issue
Block a user