Skip to content

bound worker shutdown, preload and fork, drop parallel_tests (3.0.0) - #84

Draft
ilyazub wants to merge 31 commits into
masterfrom
ilyazub-turbo-tests-deep-review-speedup
Draft

ilyazub wants to merge 31 commits into
masterfrom
ilyazub-turbo-tests-deep-review-speedup

Conversation

@ilyazub

@ilyazub ilyazub commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Fable 5.1 wrote the code, ran the checks and wrote this description (max effort through 5708d14; high for the CI fixes 1190c79–ff7ad3d and this text):

Workers that finish RSpec but never exit now fail the run after --exit-timeout (default 60 s) with a thread dump, instead of hanging it until the CI job timeout. v3 also preloads once and forks workers that pull files from a largest-first queue, and drops the parallel_tests dependency. Breaking changes are in UPGRADING.md, everything else in CHANGELOG.md.

Merging publishes: tag_and_release.yml tags v3.0.0 and pushes the gem to RubyGems on the master push that changes version.rb, so merge when 3.0.0 should ship. The fixes-only 2.2.6 comes separately from 2-x-stable.

Draft until one thing is settled: two v3-only failures on the real suite below are unexplained. The CI matrix in tests.yml had never run before this PR (the repository had no workflow run on record); its first run failed 26 of 30 jobs, and what it found and what changed for it is listed under "What the matrix found".

master 7d4064e (2.2.5) this PR ff7ad3d
worker finishes RSpec, process cannot exit¹ no exit until an external 60 s cap killed it (exit 124) exit 1 after 8.27 s with --exit-timeout 5: worker and files named, thread dump
real Rails suite, 1,645 files, 151,132 examples, 8 workers² 2.2.4: 378 s wall, 1,132 s CPU, 2.10 GB peak RSS 293 s, 1,086 s, 1.68 GB
same suite, failures³ 2 (environment), same with flatware 2.3.4 same 2, plus 1–2 extra in two of four runs (open)
uneven_64 synthetic, 4 workers, median of 5⁴ 7.27 s wall, 1.11 s CPU, 39 MB 7.77 s (7.15 s --static), 0.57 s CPU, 26 MB
runtime dependencies, Ruby floor parallel_tests, rspec; 2.7 rspec-core >= 3.10; 2.4
tests.yml matrix (30 jobs) never run 30/30 green, run 38599945945: 2.4–head Linux, 2.7–head macOS and Windows

¹ fixtures/lifecycle/stuck_at_exit_spec.rb; the default --exit-timeout is 60 s and 0 keeps the old wait. ² Single runs on a loaded laptop, every run listed below: an observation, not a controlled comparison. ³ Identical 151,132 example ids and 166,732 status-file rows in every run. ⁴ Wall sits at the worker bound; dynamic dispatch costs milliseconds per job, visible on one-example files.

Before/after on the fixture (macOS arm64, Ruby 3.4.8; --exit-timeout 5 to keep it short):

$ gtimeout 60 turbo_tests _2.2.5_ -n 1 stuck_at_exit_spec.rb
.
Finished in 59.79 seconds (files took 0.08791 seconds to load)
1 example, 0 failures
# exit 124 from the cap, real 60.01 s

$ bin/turbo_tests -n 1 --exit-timeout 5 fixtures/lifecycle/stuck_at_exit_spec.rb
1 worker (fork) for 1 spec file
.turbo_tests diagnostics: pid 15793 (worker 1 (pid 15793) still alive 2.5s after finishing RSpec)
  #<Thread:0x00000001226dfcb8 fixtures/lifecycle/stuck_at_exit_spec.rb:3 sleep> status="sleep"
    (Ruby hides the backtrace of a thread it is killing: ... an ensure block or Thread.handle_interrupt that never returns blocks the process exit)
    fixtures/lifecycle/stuck_at_exit_spec.rb:5:in 'Kernel#sleep'
Worker 1 did not exit 5s after finishing RSpec; killed. Files: fixtures/lifecycle/stuck_at_exit_spec.rb
Finished in 7.74 seconds (files took 0.20121 seconds to load)
1 example, 0 failures, 1 worker error
# exit 1, real 8.27 s

Every full run of the real suite, in order (2026-10-04 UTC, same checkout and command shape as its CI: 8 workers, --exclude-pattern "**/*real_search_path_spec.rb", Ruby 2.7.8, Mongoid + Redis on private ports, 16-CPU laptop shared with other work). The first run is what sent me to the status-file fix; the two 2.2.4-vs-v3 runs closest in load are the ones in the table above.

start runner wall CPU user+sys peak RSS 1-min load start→end failures
20:39 v3 9a93cd2, before fff3985 1,720 s 2,125 s 2.44 GB not recorded 2
21:11 v3 fff3985 523 s 964 s 1.76 GB 48 → not recorded 2 + 2
~21:20 v3 fff3985, accidental immediate re-run 418 s not recorded not recorded → 171 2
21:27 flatware 2.3.4 936 s 1,046 s 2.03 GB 125 → 110 2
21:43 turbo_tests 2.2.4 378 s 1,132 s 2.10 GB 90 → 40 2
21:50 v3 fff3985 293 s 1,086 s 1.68 GB 31 → 49 2 + 1

Legend: wall and CPU from /usr/bin/time -l; failures 2 = spec/lib/mongodb_server_probe_spec.rb:165 and spec/search/google_reverse_image/validator_spec.rb:95, which fail under every runner here (environment); +2 at 21:11 = one Redis-backed spec, whose output the accidental re-run overwrote, so only my notes remain; +1 at 21:50 = spec/search/google_light/validator_spec.rb[1:4], an rspec-mocks double from another spec file, which did not reproduce serially alone or with both files in order. Reading: v3's own runs span 293–523 s as load moved, so the 378 s → 293 s against 2.2.4 is inside one run's noise band; CPU is within noise; flatware's 936 s was at the highest load of the evening.

The 1,720 s run: with example_status_persistence_file_path set, every worker rewrote the whole status file after every spec file under flock (24 MB, 166,732 rows, 1.1 s per rewrite). The parent now writes it once per run with rspec's own merger (fff3985), covered by spec/lifecycle/only_failures_spec.rb.

What the matrix found, one bullet per cause: the run that exposed it, the jobs, the cause, the commit that answered it. The three marked lib are user-visible and in the CHANGELOG.

  • Run 1 on 5708d14, Ruby 2.4, 2.5, head ×3: the committed Gemfile.lock (BUNDLED WITH 2.4.22) installs a Bundler that needs Ruby ≥ 2.6 and crashes on ruby-head; it also pinned the suite to rspec-core 3.12. 1190c79 untracks it; a fresh resolution runs rspec-core 3.13.6, 265/265 on 3.4.8 and 2.7.8.
  • Run 1, Ruby 3.1 ×3 (lib): error_highlight appends a code snippet to NameError#message, so the "formatter could not be found" error spanned lines. 81013c7 quotes the first line only.
  • Run 1, command-pool (lib): the job's RSPEC_EXECUTABLE leaked into every nested run the specs start, and a job that stops at load time printed a trailing seed line serial rspec does not. 81013c7: spec_helper drops the variable; the worker orders groups only when it runs them.
  • Run 1, macOS 3.3, 3.4, head: profile fixture sleeps 50 ms apart inverted under load. 81013c7 and b510f65: gaps ≥ 120 ms, group totals 1.03 s vs 0.57 s.
  • Run 1, Windows ×7: spec helpers used pgroup:, -pid, ps and fd 3. 81013c7: new_pgroup, rows on prefixed stdout (the transport the spawn pool uses on Windows), :posix and :fork tags, pool lists derived from the platform.
  • Runs 2 and 5, Ruby 2.4: ensure directly inside do/end and Hash#slice in specs (both 2.5+). ec74a97 and 2bfed7b; bin/check_ruby24_syntax now parses spec/ and fixtures/ as well (27 → 500+ files).
  • Run 3, Windows ×7 (lib): --pool command never started a worker: Bundler's bundle entry point is a Ruby script and Windows cannot exec it (ENOEXEC); worker output was relayed as \r\r\n. 5eeec21 runs it with the current Ruby and collapses \r\n before relaying.
  • Run 3, perf and JRuby: a bare ruby could not see vendor/bundle; the 2.2.5 baseline needs its own rspec on PATH; JRuby 10 needs JDK 21, and the full suite (hundreds of nested Rubies) does not fit a JVM job. 81013c7, 3282425, dbd6618: everything under the bundle, a 20-example spawn-pool smoke for JRuby and TruffleRuby.
  • Run 5, Windows ×7: two processes appending to one fixture log lost lines ("a" is not atomic there); CRLF in backtick output. 2bfed7b: flock and seek per append; \r\n normalised in the specs.
  • Runs 8 and 9, Windows ×7: rspec prints the failing line without CodeRay highlighting on Windows. b510f65, ff7ad3d.

lib/ changed in 5 places (16 lines) since the real-suite runs at fff3985: the three above, Diagnostics.capture accepting an executable path, and nothing in scheduling or the status-file path; the real suite was not re-run after them.

README front page: a verbatim run and an in-repo 518-byte mark instead of the externally hosted illustration (assets/logo.svg, dark variant via <picture>). The Tests badge is broken on master today as well: tests.yml was pull_request-only and never ran, so GitHub has not registered the workflow; this PR's first run registers it.

master 7d4064e this PR (unchanged since 82deae2) this PR, dark
README on master: TurboTests heading and hosted rocket illustration README on this PR: in-repo mark, one-line purpose, badges, verbatim run README on this PR in dark mode: same layout with the dark mark

Fable 5.1 checks (macOS arm64 unless stated):

tests.yml on ff7ad3d, run 38599945945              30/30 jobs green: Ruby 2.4–3.4 + head on Linux, 2.7–3.4 + head on macOS and Windows (rspec + `turbo_tests -n 4 spec` dogfood each), syntax-2-4, simplecov, command-pool, perf, JRuby and TruffleRuby smoke; 265 examples per POSIX job, 237 on Windows (28 `:posix` excluded), 20 on the JVM smoke
bin/turbo_tests -n 8, Ruby 3.4.8, ff7ad3d          265 examples, 0 failures (fork); 265/265 under --pool spawn and --pool command with RSPEC_EXECUTABLE set, ff7ad3d
bin/turbo_tests -n 8, Ruby 2.7.8, 2bfed7b          265 examples, 0 failures
bin/check_ruby24_syntax, ff7ad3d                   lib/, bin/, spec/, fixtures/ parse with the Ruby 2.4 grammar
gem build, 5708d14                                 38 files, 80 KB, no fixtures/assets/.github
hang fixture before/after above, c342f85           2.2.5 capped at 60 s; v3 exit 1 in 8.27 s
real Rails suite, Ruby 2.7.8, 8 workers, fff3985   6 runs in the table above, 151,132 examples each, no hung or crashed worker
bin/leak_check, before fff3985, not re-run since   RSS +0.6 % fork, +0.3 % spawn over the last third of 300 files

Closes #2, closes #11, closes #12, closes #13, closes #14, closes #18, closes #23, closes #24, closes #27, closes #39, closes #43, closes #58, closes #60, closes #65, closes #77, closes #83. Adopts #34, #41, #44, #45, #46, #51, #78, #82 (credited in CHANGELOG); #59, #79, #80 superseded; #19 (DRb) and #21 (--create) declined, reasons in CHANGELOG and in README "Alternatives considered" (DRb, Marshal frames and Ractors, measured with bin/ipc_bench). Nothing has been posted to those threads yet.

Not verified: JRuby and TruffleRuby beyond the 20-example spawn-pool smoke (continue-on-error); on Windows the 28 specs tagged :posix (signals, process groups, ps/pgrep, fork pool) do not run; the real suite on Linux or after fff3985; the TEST_ENV_NUMBER probe on a real ActiveRecord app (the real suite is Mongoid). Not in this PR: 2.2.6 (2-x-stable), posting the issue dispositions.

Rollback: users pin ~> 2.2; a bad 3.0.0 gets yanked and followed by 3.0.1, not re-tagged.

Review order: commits are self-contained, [CI] → [Core] → [Protocol] → [Tooling] → [Runtime] → [Spec] → [Docs]; start with lib/turbo_tests/supervisor.rb and lib/turbo_tests/preloader.rb.

ilyazub and others added 30 commits October 4, 2026 04:43
runs-on was hardcoded to ubuntu-latest, so the windows-latest matrix
entries never ran on Windows. fail-fast off so one Ruby/OS failure does
not hide the others.

This is by Fable 5.1

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Protocol::Writer/Reader own the JSON-lines wire format (binary-safe,
rows validated as JSON with a type, optional per-run prefix for the
mixed stdout transport, dedicated-fd transport via TURBO_TESTS_ROWS_FD).
Reporter#handle(row) takes over the row dispatch that lived in
Runner#handle_messages. Fake* structs move to fake_example.rb.
No behaviour change; prepares the v3 split into worker/pool/supervisor.

This is by Fable 5.1

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…e dedicated channel

A fresh IO.for_fd per formatter instance would close the shared fd when
garbage collected between jobs. Non-JSON lines on a dedicated rows fd
are protocol errors, not passthrough output.

This is by Fable 5.1

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…CI matrix

bin/benchmark generates synthetic suites (uneven_8, uneven_64, slow_boot)
and compares serial rspec, the released turbo_tests 2.2.5 and the local
checkout's pools (median of N, CPU, max RSS). bin/leak_check runs 300
generated spec files through one long-lived worker and fails if RSS keeps
growing. bin/check_ruby24_syntax parses lib/ and bin/ with the parser
gem's Ruby 2.4 grammar and flags newer core methods. CI: MRI 2.4-head on
ubuntu/macos/windows, JRuby/TruffleRuby (spawn pool, non-gating),
syntax gate, SimpleCov, RSPEC_EXECUTABLE command pool and a perf job
uploading artifacts.

This is by Fable 5.1

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…pervisor

Workers are long-lived processes that run one file-sized job after
another instead of one rspec process per static group:
- Pool::Fork (MRI on Unix, default): a preloader spawned by the parent
  loads what .rspec requires once, probes the TEST_ENV_NUMBER convention,
  runs before_fork hooks and forks N workers; it reaps them by pid,
  reports their exit statuses over a control pipe and terminates them
  if the parent disappears. Pool::Spawn (Windows, JRuby, --pool spawn):
  N long-lived ruby processes booting concurrently. Pool::Command: the
  2.x model, one rspec per static group, kept for RSPEC_EXECUTABLE.
- Scheduler: per-file jobs, largest recorded runtime first, tiny files
  packed into ~1s jobs; static LPT groups for --static, --only-group
  and --groups. RuntimeLog: parallel_tests-compatible, always used when
  present and recorded after every run.
- Supervisor: one IO.select loop, a state machine per worker, separate
  tracking of protocol completion, process exit and pipe EOF. A worker
  that finished RSpec but does not exit gets --exit-timeout, a thread
  dump (USR1 trap + at_exit snapshot), parent-side diagnostics, TERM,
  KILL, and fails the run; pipes a grandchild keeps open are drained on
  a deadline. INT stops after the current example and exits 130; a
  second INT kills. --fail-fast interrupts workers, not reader threads.
- Worker: RSpec configured once, RSpec.clear_examples between jobs,
  suite hooks once per worker, late before(:suite) hooks detected, one
  shared seed applied without forcing random order, deprecations and
  profiles forwarded as rows, class-keyed shared example groups pruned
  so memory stays flat across hundreds of jobs.
- EnvNumber: --first-is-1 / --first-is-blank / PARALLEL_TEST_FIRST_IS_1,
  else an ActiveRecord probe for an existing "…1" database; ambiguous
  probes abort with the two overrides.
- CLI: turbo_tests, parallel_rspec and flatware flags, a leading rspec
  token, -- passthrough, .rspec_parallel, rake turbo_tests:setup/cleanup
  hooks, --nice, --preload, --pool, --diagnose, --print-failed-group.
- Reporter: replays rows into real RSpec formatters; merged profile,
  deduplicated deprecations, one filtered-out message, seed printed iff
  used, worker hang/crash summaries, custom formatters resolved only to
  loaded formatter classes, JUnit/Fuubar supported through richer rows.
- Protocol: JSON lines over a dedicated fd (non-owning IO wrapper) or
  a prefixed stdout; malformed rows on the dedicated channel are errors.

rspec-core is the only runtime dependency (parallel_tests removed);
required_ruby_version >= 2.4 with a parser-gem syntax gate.

This is by Fable 5.1

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… real subprocesses

Lifecycle fixtures: a worker that never exits, crashes, orphans after
fail-fast, interrupts, pipe holders (worker and preloader side), preloader
death, suite hooks, filters across jobs, non-UTF-8 output, --only-failures,
path:line selectors, GC between jobs, config.fail_fast inside the suite,
slow boot. Reporter: unit specs feeding rows to the Reporter, formatter
rows from real rspec runs, end-to-end output compared with serial rspec
(random/defined order, profile, deprecations, filtered out, JUnit,
Fuubar). Unit specs for CLI, files, runtime log, scheduler, protocol,
TEST_ENV_NUMBER probe (doubles), diagnostics (fake /proc tree), worker
registry pruning. Specs are quote-agnostic across Ruby 3.4 and do not
leak ENV between files (SPEC_OPTS).

This is by Fable 5.1

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…harding, hangs

README rewritten for v3 with an upgrade guide and a hand-curated
changelog crediting the community PRs and forks whose ideas were
adopted.

This is by Fable 5.1

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This is by Fable 5.1

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This is by Fable 5.1

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This is by Fable 5.1

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Under `bundle exec bin/benchmark` the children inherited
RUBYOPT=-rbundler/setup, so the 2.2.5 binstub activated the bundled
turbo_tests 3.0.0 and the "v2" column measured v3 against itself, while
the local pools paid Bundler's load in CPU and RSS. Children now get
Bundler.unbundled_env with unsetenv_others, and the v2 config aborts
unless it resolves TurboTests::VERSION 2.2.5.

This is by Fable 5.1

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ording

The benchmark table now comes from a run whose raw samples were kept,
with the spread for the one row where it matters (dynamic fork on
uneven_64 is slower than 2.2.5 in all five runs, static faster in all
five). The RSS column is labelled for what time -l reports: the largest
process in the run, not the parent. The Ruby floor moves from 2.7 to
2.4, so "stay on 2.x for older Rubies" was impossible advice.

This is by Fable 5.1

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The v2 binstub ran on its shebang interpreter with an unpinned version.
It now runs under RbConfig.ruby with the `_2.2.5_` version selector, so
the measured invocation cannot drift from what verify_v2_env checked.

This is by Fable 5.1

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…perf artifacts

This is by Fable 5.1

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Workers wrote config.example_status_persistence_file_path after every job.
rspec's persister reads, merges and rewrites the whole file under an
exclusive lock, so with one file per job that is quadratic in the number
of recorded examples and serialises the workers on the lock: on a
1,645-file Rails suite with 130k examples one write took 1.1 s and workers
spent the tail of the run waiting in flock.

The parent already receives every example row; it now hands them to
RSpec::Core::ExampleStatusPersister once after the run. Workers report the
ids of loaded examples that did not run so the merge keeps their previous
status exactly as rspec does (the merger drops entries of loaded files
that are missing from the run). Dry runs and the command pool, whose
workers are plain rspec processes, are left alone.

The --only-failures lifecycle spec asserts that no worker sees the file
before shutdown and that the rows match rspec's after a full run and after
an --only-failures re-run.

This is by Fable 5.1

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
README: results of running a 1,645-file, 151k-example Rails/Mongoid suite
with 8 workers under turbo_tests 2.2.4, flatware 2.3.4 and v3 (same
examples and failures everywhere, no hung worker, v3 -23 % wall against
2.2.4 in a comparable load window), and an "Alternatives considered"
section covering DRb (#19), Marshal frames, Ractors and threads with
measurements from the new bin/ipc_bench: JSON lines over a pipe cost
2-5 us per result row, Marshal frames 7-16 us, per-call DRb 160-400 us.
On Ruby 3.4.8 a Ractor cannot run RSpec at all (un-shareable Proc,
Ractor::IsolationError on rspec-core's globals).

CHANGELOG: name #19 and the reasons it is declined.

This is by Fable 5.1

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Real suite: timings are observations, CPU time is within run-to-run
noise, and two of four v3 runs had failures the baselines did not that
did not reproduce serially; say so instead of calling them flaky.

bin/ipc_bench: neutral payload names; numbers re-measured with the
committed payload (539-byte rows): JSON lines over a pipe 1.8-3.8 us per
row, Marshal frames 7.1-7.6 us, socketpair 7.1-11.0 us, per-call DRb
115-152 us, batched DRb 3.5-4.9 us. The suite-level IPC cost is labelled
as an extrapolation and the Ractor finding is bound to the versions tested.

This is by Fable 5.1

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The preloader requires only the .rspec --require files, so lazily opened
clients are normally first opened inside a worker; a client opened at
boot, or a Mongoid client left connected, is inherited by every worker
and stalls their first query. Add Mongoid.disconnect_clients to the
before_fork example and say which clients are inherited.

This is by Fable 5.1

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This is by Fable 5.1

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1051.36 + 80.44 = 1131.80 s.

This is by Fable 5.1

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The front page now says what the gem does in one line, shows a verbatim
run, and lists the four properties that matter (zero-config swap, preload
and fork, one dependency, bounded shutdown) with links into the sections
that back them. The parallel_tests comparison walls of dots are gone; the
2.x lineage and the Discourse/RubyGems origin stay in one paragraph.

The mark replaces a 245 KB Illustrator illustration hosted on
user-images.githubusercontent.com: assets/logo.svg (518 bytes) draws four
workers under one line of output in the same teal and red, with a dark
variant selected through a picture element.

This is by Fable 5.1

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Summary and description say what the runner does instead of calling it a
parallel_tests replacement based on Discourse; changelog_uri points at
CHANGELOG.md and bug_tracker_uri is set. fixtures/, assets/ and .github/
are excluded from the gem (38 files, 80 KB).

This is by Fable 5.1

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The lockfile's BUNDLED WITH 2.4.22 made ruby/setup-ruby install a Bundler
that requires Ruby >= 2.6 on the 2.4 and 2.5 jobs and crashes on ruby-head
(Pathname::SEPARATOR_PAT), so 4 of 30 matrix jobs failed before running a
spec (PR #84, run 38589912417). It also pinned the suite to rspec-core
3.12.1; a fresh resolution gives 3.13.6, 265/265 on Ruby 3.4.8 and 2.7.8.

This is by Fable 5.1

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ol, perf

First run of tests.yml (PR #84, run 38589912417) on 5708d14: 26 of 30 jobs
failed. Per class, reproduced where a local path exists:

- Ruby 3.1: error_highlight appends a code snippet to NameError#message, so
  the "could not be found" formatter error spanned lines; only the first line
  is quoted now.
- macOS 3.3/3.4: profile fixture sleeps 50 ms apart inverted under load;
  gaps are now >= 120 ms (first 0.02/0.20/0.35 s, second 0.05/0.08/0.60 s).
- command-pool job: RSPEC_EXECUTABLE leaked into every nested run the specs
  start, flipping them to the command pool (6 failures); spec_helper drops
  it. A job that stops at load time no longer orders its groups, so, like
  rspec, it reports no seed; cli_spec expected the 2.x trailing seed line.
- Windows: the lifecycle helper used pgroup:/-pid/ps (52 failures) and
  run_worker needed fd 3 (31); the helper now uses new_pgroup on Windows and
  run_worker speaks the prefixed-stdout transport Pool::Spawn uses there.
  Signal, ps/pgrep and fork-only specs are tagged :posix and excluded on
  Windows; pool-iterating specs use LifecycleHelper::PERSISTENT_POOLS.
  Diagnostics.capture accepts an executable path, not only a PATH name.
- perf job: bin/benchmark's local configs and bin/leak_check ran a bare ruby
  that cannot see vendor/bundle; both run under the bundle, and a non-zero
  exit is labelled "failed", not "unsupported".
- JRuby 10 needs Java 21; setup-java added to alternative-rubies.

Local: 265/265 on 3.4.8 and 2.7.8 (fork), 265/265 under --pool spawn and
under --pool command with RSPEC_EXECUTABLE set, 188/188 unit+reporter with
the mixed-rows transport forced, 2.4 syntax gate 27 files.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run 38590429209 on 1190c79: Ruby 2.4 loaded 7 spec files with "unexpected
keyword_ensure" (ensure directly inside do/end parses from 2.5), so the 2.4
job ran 144 of 265 examples. Those sites use begin/ensure/end now, and
bin/check_ruby24_syntax covers spec/ and fixtures/ as well as lib/ and bin/
(27 -> 520 files locally, generated benchmark fixtures included), skipping
byte fixtures that are not UTF-8 and neutralising "\xNN" escapes the parser
gem rejects but MRI accepts.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Windows matrix, run 38593418803 on 81013c7 (14 failures, 237 examples):

- `--pool command` never started a worker: BUNDLE_BIN_PATH is bundler's
  exe/bundle Ruby script and Windows cannot exec it (ENOEXEC). It is now
  run with the current Ruby, which is what POSIX did implicitly via the
  shebang.
- Worker output reached the terminal as \r\r\n: the worker's text-mode
  stdout already wrote \r\n and the parent's text-mode stdout converted
  again. The supervisor collapses \r\n before relaying on Windows.
- Specs read CRLF output: LifecycleHelper#plain normalises line endings,
  Diagnostics.capture and the non-UTF-8 passthrough accept \r?\n.

Not reproduced locally (no Windows); verified by the next matrix run.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…off MRI

perf job, run 38593418803: the 2.2.5 baseline exited 1 in 0.2 s because it
runs `rspec` from PATH and CI has no global one; the gem's own bin dir is on
PATH for that config now. TruffleRuby job: specs that force --pool fork are
tagged :fork and excluded where TurboTests::Pool.fork_supported? is false.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…og lines

Run 38594681483: Ruby 2.4 had 45 failures, all Hash#slice (2.5+) in three
around hooks and two profile helpers; replaced with select, and the 2.4
gate now flags .slice( on a Hash. Windows had 5: the backtick subjects in
cli_spec compared \r\n output with \n expectations, and fixtures appending
to one log from two processes lost lines ("a" mode is not atomic on
Windows: boots 1 instead of 2, one before(:suite) pid missing); every
fixture append now takes flock(LOCK_EX) and seeks to the end first.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… the suite

Run 38593418803: JRuby printed the banner and nothing else for 10 minutes;
the suite starts hundreds of nested Rubies, which a JVM cannot do in the
budget, and TruffleRuby failed on watchdog and process-group details the
job is not there to prove. Both now run a 20-example fixture suite under
--pool spawn with a 5-minute cap, which answers the one question the job
asks: does a spawn-pool run complete on that runtime.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…oup gap

Run 38596769633: Windows 2.7-head failed only cli_spec's errors-outside-
of-examples cases: rspec does not CodeRay-highlight the failing line there
(SyntaxHighlighter::WindowsImplementation), so the regex accepts both.
macOS ruby-head ranked the profile fixture's groups the wrong way round
with totals 160 ms apart; the second group's long example sleeps 0.90 s
(totals 1.03 s vs 0.57 s).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run 38598387627, 23/30 green: on Windows rspec prints
"\e[31mFailure/Error: 1 / 0\e[0m" as one span, not "Failure/Error: " and
the snippet reset separately, so the alternation now covers the full line.
CHANGELOG lists the fixes the matrix surfaced (Windows command pool, CRLF
relay, Ruby 3.1 error_highlight, load-error seed parity).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment