Developer toolchain and delivery
The developer toolchain turns changes in this monorepo into usable Rails and React packages. It joins Ruby gems, JavaScript workspaces, generated applications, local checks, hosted CI, performance evidence, and coordinated public releases so that the core and Pro product tiers stay compatible.
Workspace model
The workspace model keeps the Ruby and JavaScript parts of each product close while preserving their separate package boundaries. The open-source tier pairs the react_on_rails gem with react-on-rails; the Pro tier adds the Pro gem, the Pro JavaScript package, and the Node renderer. The create-react-on-rails-app package gives users a command-line starting point. The root workspace links these packages with the OSS and Pro test applications, so a change can be checked across package and application boundaries. Pro RSC checks use the React 19.3.1 line and stable react-on-rails-rsc 19.3.2, while legacy and OSS fixtures keep their own supported floors.
References: package.json• L1-17 pnpm-workspace.yaml• L1-7 react_on_rails/react_on_rails.gemspec• L8-45 react_on_rails_pro/react_on_rails_pro.gemspec• L24-60 packages/…/package.json• L1-31
Dependency boundaries
Ruby dependencies and JavaScript dependencies use separate package managers and lock files. The root bundle supplies monorepo tools such as lint, release, and benchmark support, while each gem or test application owns the dependencies needed to run it. The JavaScript workspace uses workspace:* links for local package relationships. This lets package builds and application checks use the code under review instead of a stale published package.
The Pro package and Node renderer use React 19.3.1 with stable react-on-rails-rsc 19.3.2. Their fixtures use matching React, React DOM, and RSC versions, while the root overrides apply the same selection to the Pro dummy application. This keeps the RSC soak test on one Flight line without changing the older root and OSS fixture floors.
Dependabot monitors the root workspace, dummy applications, Ruby gems, and GitHub Actions. It creates security updates rather than routine version updates, waits three days before proposing a new version, and groups the Shakapacker gem and npm updates for the standalone ExecJS dummy so their paired versions stay aligned. The resulting pull requests carry labels that route them into hosted CI.
The root manifest also forces vulnerable PostCSS resolutions to a patched version range. It allowlists the trusted package build scripts that pnpm may run. This keeps transitive workspace installs on a safe PostCSS line while allowing required native and helper packages to prepare their tools.
References: Gemfile• L3-19 Rakefile• L5-12 packages/…/package.json• L83-102 packages/…/package.json• L114-125 packages/…/package.json• L69-81 packages/…/package.json• L138-146 react_on_rails/…/shakapacker_examples.rake• L67-97 package.json• L126-191 .github/dependabot.yml• L1-131
Runtime floors
The toolchain checks both the current development runtime and the minimum supported runtime. Hosted jobs read these values through one shared action, so support checks use the same source as local and CI tooling.
References: .tool-versions• L1-2 .minimum.tool-versions• L1-2 .github/…/action.yml• L1-66
Application creation
Application creation turns the product's setup rules into a runnable Rails application. The command-line package starts a new project, while the Rails generator adds React on Rails to an existing project and the example system builds known application shapes for compatibility checks. See Application scaffolding for the user-facing creation flow and its generated application contract.
References: packages/…/package.json• L1-15 react_on_rails/…/shakapacker_examples.rake• L181-238 CONTRIBUTING.md• L54-60
Generated application checks
Generated applications act as compatibility probes rather than simple samples. The generator flow creates Rails applications, installs Shakapacker, links the local JavaScript package, applies the target React version when needed, creates component packs, and builds assets before tests run. The hosted matrix checks both current and pinned dependency lines. This verifies that the supported setup works from a clean application, not only inside the monorepo.
References: react_on_rails/…/shakapacker_examples.rake• L181-238 react_on_rails/…/run_rspec.rake• L78-139 .github/…/examples.yml• L106-257
Build and validation flow
The validation flow moves from cheap checks to wider application checks. Local tooling first classifies the change, then runs only the useful checks by default; hosted CI repeats that decision on trusted events and expands it for release or broad-matrix work. A force-full mode remains available when a change crosses many boundaries or when a maintainer needs broad proof.
References: bin/ci-local• L1-20 bin/ci-local• L165-269 .github/…/action.yml• L263-309
The following diagram shows how a change moves from the workspace to package, application, and hosted validation.
flowchart LR
Change[Code change] --> Detect[Change classification]
Detect --> Local[Local checks]
Local --> Build[Build workspace packages]
Build --> Package[Package tests and type checks]
Build --> App[Dummy app and generated app checks]
Detect --> Hosted[Hosted CI selection]
Hosted --> Required[Required PR gate]
Hosted --> Selected[Path-selected hosted suites]
Required --> Result[Merge or release evidence]
Selected --> Result
Package --> Result
App --> Result
Package builds
Package builds compile TypeScript into the JavaScript artifacts that applications and published packages use. The root build covers the core package, both Pro packages, and the application creator. Package lifecycle hooks also build when a package is packed or published, which keeps a clean checkout usable as a Git or registry dependency. The Pro package build is validated against its RSC package line, and the Node renderer build carries the matching renderer-side development setup.
References: package.json• L86-106 packages/…/package.json• L7-15 packages/…/package.json• L7-22 packages/…/package.json• L117-125 packages/…/package.json• L138-146 packages/…/package.json• L9-15
Local validation
bin/setup prepares the root, OSS gem, OSS dummy app, and optional Pro applications, then builds the core JavaScript package. bin/ci-local uses the change classifier to select lint, type, package, gem, dummy application, generator, and Pro checks. The broad mode is useful before a release or after a cross-cutting change; the fast mode favors quick feedback and omits slow application checks.
References: bin/setup• L43-61 bin/setup• L296-373 bin/ci-local• L330-440
Hosted validation
Hosted CI has a required gate for every pull request and optional hosted suites for deeper proof. Each suite uses the shared hosted selector and the verified diff-base helper, so path-based selection uses the same base and head rules across package, gem, application, example, browser, precompile, and Pro checks. Main, merge queue, release targets, or an explicit force-full request use the wider version and dependency matrix. Maintainers can request or stop hosted runs with +ci-* pull request commands. Those commands bind dispatches to the current head and record exact workflow coverage so a later decision does not rely on an old run.
The hosted-CI safety suite protects these delivery rules as workflow contracts. It checks authorization for label and command dispatch, exact-head and diff-base handling, selector matrix behavior, dependency matrix coverage, service readiness, concurrency, and benchmark workflow wiring. It also checks that generator shards keep shared setup together, that renderer jobs wait for the correct service, and that the Pro ExecJS-compatible fixture really uses Rspack when that path is selected. This keeps changes to workflow text from silently weakening the gate.
References: .github/…/ci-required.yml• L49-121 .github/…/action.yml• L263-309 .github/…/ci-commands.yml• L795-887 .github/…/ci-commands.yml• L1211-1289 .github/…/hosted-ci-safety.test.cjs• L151-219 .github/…/hosted-ci-safety.test.cjs• L393-496 .github/…/hosted-ci-safety.test.cjs• L500-704
Automated review
Automated review adds an assisted review path to the hosted toolchain. Pull request events can start a Claude Code review that looks for code, security, bug, and performance risks, while an authorized maintainer can request Claude through an issue, pull request comment, or review comment for on-demand help. The workflows keep these paths separate from the required validation gate and restrict on-demand use to repository actors and requesters with write or admin access.
The review workflow treats a successful action with an error result as a failed review. This prevents an expired or invalid OAuth token from appearing as a green review that never produced feedback. A workflow-level skip remains a pass when Claude did not claim to run.
References: .github/…/claude-code-review.yml• L3-14 .github/…/claude-code-review.yml• L23-45 .github/…/claude-code-review.yml• L50-94 .github/…/claude.yml• L3-16 .github/…/claude.yml• L23-100 .github/…/claude.yml• L101-128
Validation surfaces
The hosted suites cover the product as a set of related surfaces. The core package has JavaScript tests and Ruby tests. Dummy applications check Rails, bundler, and asset delivery paths. Generated examples check clean application setup. Browser suites check end-to-end behavior. Pro checks add the Pro gem, Pro packages, Node renderer, RSC runtime, and the licensed dummy applications.
The normal pull request path favors current runtimes for fast feedback. Main, merge queue, release targets, and force-full runs add minimum supported versions where the suite has that coverage. Gem generator specs use setup-safe shards, while integration tests keep Webpack latest, Webpack minimum, and Rspack build-to-test chains independent. Pro coverage also compiles the ExecJS-compatible dummy with Rspack and verifies the emitted bundles, so a bundler fallback cannot appear as a passing test.
References: .github/…/lint-js-and-ruby.yml• L107-253 .github/…/package-js-tests.yml• L108-165 .github/…/gem-tests.yml• L102-173 .github/…/gem-tests.yml• L232-361 .github/…/integration-tests.yml• L106-237 .github/…/examples.yml• L106-257 .github/…/playwright.yml• L96-170 .github/…/precompile-check.yml• L99-191 .github/…/pro-integration-tests.yml• L600-918 .github/…/pro-test-package-and-gem.yml• L130-490
Performance evidence
Performance checks compare the product before and after a change rather than treating a noisy runner result as a release truth. The benchmark system builds the comparison base and the changed version on the same runner, uses the same measurement harness, repeats sampled routes where applicable, and sends the comparison to Bencher. Dedicated local hardware supplies the trusted trend; hosted runs are explicit diagnostics. See Performance benchmarks for the benchmark operating model.
References: benchmarks/README.md• L1-21 .github/…/benchmark.yml• L17-21 .github/…/benchmark-suite.yml• L1-24
Benchmark selection
Change classification separates runtime source changes from test and CI changes. Runtime changes select the affected core, Pro, or Node renderer benchmark. Documentation, workflow, and other CI-only changes do not create a performance signal. The hosted benchmark suites run only through an explicit manual dispatch, while automatic workflow runs provide benchmark script and Rails DX checks for benchmark-related changes. This keeps shared-runner results as diagnostics instead of treating them as the trusted trend.
Manual runs resolve one concrete comparison base, build both base and head on the same runner, and can select routes, request settings, and application scope. This makes an on-demand hosted run useful for investigation without changing the source of release-grade performance evidence.
References: script/ci-changes-detector• L84-94 script/ci-changes-detector• L448-457 script/ci-changes-detector• L993-1001 .github/…/benchmark.yml• L3-75 .github/…/benchmark.yml• L77-96 .github/…/benchmark.yml• L128-219
Bundle size checks
Bundle checks protect the size and load cost of the published JavaScript surface. CI builds a matching base and pull request version, measures the tracked package outputs, and applies a small increase limit against that base. A deliberate increase can be recorded for one branch, but it must remain an explicit product choice.
References: .github/…/bundle-size.yml• L40-49 .github/…/bundle-size.yml• L62-99 .github/…/bundle-size.yml• L117-180 CONTRIBUTING.md• L371-423
Release delivery
Release delivery keeps the public Ruby gems and JavaScript packages on one product version. The release task validates the checkout, branch, version, registry state, and required CI before it changes version metadata. It then creates a version commit, pushes that commit, proves the release candidate, creates the tag, publishes the four npm packages and two Ruby gems, and creates or updates the GitHub release from the changelog.
References: rakelib/release.rake• L9642-9717 rakelib/release.rake• L9979-10007 rakelib/release.rake• L10019-10095 rakelib/release.rake• L10160-10308
The release train uses main for ongoing work and a matching release/X.Y.Z branch for stabilization. A release candidate is tested on that branch. The final release promotes the last good candidate instead of cutting a new final build from a moving main.
References: rakelib/release.rake• L9654-9657 rakelib/release.rake• L9961-9964 rakelib/release.rake• L9914-9949
Release evidence
Release evidence ties a published version to an exact commit and to the checks that approved it. For release branches, a changelog push can start the ShakaPerf gate for the React Server Components flash of unstyled content (FOUC) path. The gate checks the candidate identity, validates the application behavior, fingerprints the runtime tree, and stores machine-readable evidence. The release task rejects stale, mismatched, failed, or uncertain evidence before it tags and publishes.
References: .github/…/shakaperf-release-prerun.yml• L8-18 .github/…/shakaperf-release-prerun.yml• L38-86 .github/…/shakaperf-release-gates.yml• L26-110 .github/…/shakaperf-release-gates.yml• L112-145 .github/…/shakaperf-release-gates.yml• L384-430 rakelib/release.rake• L614-822
Package publication
Publication sends all supported integrations through the same versioned delivery step. The npm packages use npm distribution tags that match the release kind. The Ruby gems use RubyGems. Authentication can use one-time passwords, and publish retries distinguish a confirmed publication from an uncertain network result. This makes an interrupted release recoverable without silently publishing a second or different version.
References: rakelib/release.rake• L367-401 rakelib/release.rake• L9580-9640 rakelib/release.rake• L10170-10255
Release recovery
Release recovery treats a partial release as durable evidence, not as a reason to rerun blindly. If the version commit reached the remote but a release gate failed, the branch keeps that commit while the operator preserves the failure record and follows the recovery path. The release task also supports dry-run planning and a separate GitHub release synchronization task for an already published version.
References: rakelib/release.rake• L1015-1030 rakelib/release.rake• L10326-10368 rakelib/release.rake• L10273-10291
Related pages
- Application scaffolding explains how a Rails application is created or upgraded for React on Rails.
- Build, test, and release automation explains the repository automation that runs and gates delivery.
- Performance benchmarks explains local and hosted performance measurement.
- Pro rendering platform explains the production Pro rendering system that the Pro package and Node renderer support.
Change checklist
When these files or sections are changed, remember to consider these:
- Keep
.tool-versions,.minimum.tool-versions, and the shared version-reading action aligned. A drift can make local support claims differ from hosted matrix coverage. - Keep the workspace package list, package build command, and package publication list aligned. A package can build locally yet remain absent from the public release.
- When changing Pro React or RSC support, keep the root overrides, Pro package peer range, Pro package development versions, Node renderer development versions, and Pro dummy fixture on the same intended Flight line. A partial update can make local tests exercise a different integration than consumers receive.
- When changing generator output or Shakapacker pins, update the generated-application path and the local package link together. Generator tests must exercise the code under review.
- When changing change classification or hosted-CI selectors, preserve the distinction between required checks, selected hosted suites, and the force-full matrix. A selector error can skip needed proof or spend the wrong CI budget.
- When changing hosted workflow triggers or matrix inputs, preserve the shared diff-base and exact-head contract across every suite. A single workflow can otherwise validate a different change set from the required gate.
- When changing integration matrices, keep each bundler and dependency level connected to its own build and test chain. A shared upstream job can let one build failure hide another integration result.
- When changing generator sharding, preserve setup-safe grouping and complete example coverage. A shard split can create order-dependent failures or silently omit generator specs.
- When changing Pro renderer jobs, keep service readiness, renderer logs, and the test endpoint aligned. A test can fail as an environment error or pass without exercising the renderer.
- When changing hosted benchmark triggers or dispatch inputs, preserve the split between automatic benchmark checks, manual diagnostic suites, and the dedicated local trusted trend. A trigger change can make a performance run look authoritative when it is not.
- When changing dependency update rules, keep the ExecJS dummy's paired Shakapacker gem and npm grouping aligned with its separate lock files. A split update can leave the compatibility probe on mismatched tool versions.
- When changing benchmark inputs or runtime source categories, keep benchmark suite selection separate from CI plumbing. Otherwise tooling changes can create false performance regressions.
- When changing release metadata, candidate identity, or ShakaPerf evidence, update the release task and its workflow contract together. The tag and registry publications must refer to the same tested runtime tree.
- When changing dependency overrides or trusted install scripts, keep the patched dependency floor and the pnpm build allowlist aligned. A safe resolution can fail to install or build if pnpm blocks a required package lifecycle step.
- When changing Claude review triggers or permissions, preserve the split between pull request review and maintainer-requested assistance. Keep both the actor and the
@clauderequester authorization checks aligned with the permissions needed by the action. - When changing Claude action result handling, preserve the distinction between a skipped run and a successful action that returned an error. Otherwise an expired token can create false review evidence.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| A workspace package or gem uses a different version than its paired integration | An application can test one tier while publication ships another | Unified release versioning updates the OSS and Pro versions together |
| A generated application resolves a published package instead of the local package | Generator checks can pass against stale code | Example setup pins react-on-rails to the local workspace package |
| Pro overrides, package peer ranges, and fixture versions select different React or RSC lines | Pro tests can pass on one Flight contract while a supported consumer resolves another | Root overrides, Pro manifests, and the Pro dummy pin the intended React 19.3.1 and stable react-on-rails-rsc 19.3.2 pairing |
| A workflow uses a different diff base or ignores a force-push | A hosted suite can validate the wrong files or miss the replacement head | Shared hosted selectors and script/ci-required-diff-base supply verified base and head values |
| Change classification misses a runtime path | Required or hosted validation can pass without the needed suite | The classifier fails on diff errors and uses a conservative catch-all for unknown paths |
| Hosted dispatch cannot prove the exact current head | A release or merge decision can rely on incomplete CI evidence | CI command handling records exact run IDs and stops on unknown dispatch coverage |
| A workflow change bypasses authorization, exact-head checks, or selector guards | Untrusted requests can start privileged work or produce incomplete merge evidence | hosted-ci-safety.test.cjs checks the hosted workflow contracts before they are used |
| Generator shards split shared setup or lose a scoped example | Generator results become order-dependent or incomplete | The gem workflow builds deterministic setup-safe shards and checks that all examples are assigned |
| A bundler matrix shares one build chain across dependency levels | One failed build can prevent another integration surface from running | Integration jobs keep Webpack latest, Webpack minimum, and Rspack chains independent |
| A Pro renderer starts late or uses the wrong endpoint | Integration tests fail for environment reasons or do not test the renderer | Renderer jobs use bounded readiness checks against the fixed HTTP/2 /info endpoint and retain logs |
| A hosted benchmark is treated as the trusted performance trend | Runner noise can create a false regression or hide a real one | The trusted trend runs on dedicated local hardware; hosted suites require manual dispatch |
| Base and head benchmark runs use different harnesses or runners | A measurement difference can look like a product regression | Relative benchmarking uses the same runner and stashes the head harness for both phases |
| A release gate result is stale or belongs to another candidate | The published artifact can differ from the tested candidate | Release evidence binds branch, version, commit, runtime fingerprint, run, and time |
| A publish request times out after the registry accepted it | A retry can look like a duplicate or create an unclear release state | Publication verifies registry visibility and classifies uncertain outcomes before retry |
| A dependency override sets a safe version but pnpm blocks a required build script | A package install or later build can fail even though dependency audit is clean | onlyBuiltDependencies allowlists trusted native and helper packages while the override sets the patched PostCSS floor |
An @claude request comes from an actor or requester without write access | A comment or issue could start an AI action without trusted repository control | The authorization job checks write or admin access for both the event actor and the requester before Claude runs |
| The Claude action exits successfully after an invalid or expired token | The pull request can show a green review workflow with no review output | The review workflow inspects the action result and fails when it reports an error while allowing an explicit workflow skip |
Key files
| File | Why to read it |
|---|---|
| package.json | Defines the workspace boundary and the root build, test, type-check, lint, size, publish, dependency override, and install-script trust entry points. |
| packages/…/package.json | Defines the Pro package's supported RSC peer range, build and test lifecycle, and React 19.3.1 development pairing. |
| packages/…/package.json | Defines the Node renderer's package boundary, build lifecycle, and matching React and RSC development pairing. |
| pnpm-workspace.yaml | Shows which packages and test applications share local JavaScript dependencies. |
Gemfile | Defines the small root Ruby tool bundle used for repo-level work. |
Rakefile | Shows how root tasks delegate to package-owned Rake tasks. |
| .github/dependabot.yml | Defines which package ecosystems receive security updates and how paired ExecJS dummy dependencies stay together. |
bin/setup | Shows the intended first-time setup order across Ruby, JavaScript, dummy apps, and package builds. |
bin/ci-local | Shows how local validation selects checks from the changed-file set. |
script/ci-changes-detector | Defines the shared relationship between changed areas and test or benchmark selection. |
| .github/…/action.yml | Defines when hosted CI runs and when it uses the broad matrix. |
| .github/…/ci-required.yml | Defines the always-on pull request gate and its change classification boundary. |
| .github/…/ci-commands.yml | Defines the maintainer controls and exact-head proof for hosted CI dispatch. |
| .github/…/hosted-ci-safety.test.cjs | Verifies that hosted workflow authorization, selectors, matrices, readiness checks, sharding, and benchmark wiring retain their safety contracts. |
| .github/…/lint-js-and-ruby.yml | Shows the shared lint, type, package-shape, and formatting validation surface. |
| .github/…/gem-tests.yml | Shows Ruby package coverage, release-supervisor checks, and setup-safe generator sharding. |
| .github/…/integration-tests.yml | Shows independent Webpack and Rspack dummy-application build-to-integration chains. |
| .github/…/examples.yml | Shows how generated applications provide compatibility coverage across runtime and dependency floors. |
| .github/…/playwright.yml | Shows the OSS browser path from package build to Rails assets and end-to-end tests. |
| .github/…/precompile-check.yml | Shows production-style asset compilation and output validation. |
| .github/…/pro-integration-tests.yml | Shows licensed Pro Rails, renderer, browser, RSC, and ExecJS-compatible Rspack integration paths. |
| .github/…/pro-test-package-and-gem.yml | Shows Pro package, gem, dummy-app, and runtime matrix validation. |
| .github/…/claude-code-review.yml | Defines the pull request review path and the guard against silent Claude action failures. |
| .github/…/claude.yml | Defines the authorized, on-demand Claude assistance path for issues and pull request comments. |
| .github/…/benchmark.yml | Defines automatic benchmark checks and the manual-only hosted performance suites. |
| .github/…/benchmark-suite.yml | Shows the base-versus-head performance comparison and evidence path. |
rakelib/release.rake | Defines coordinated versioning, release gates, publication, tagging, and recovery behavior. |
| .github/…/shakaperf-release-gates.yml | Defines the exact release-candidate performance gate and its stored evidence. |