Repository navigation
Conversation
…ckfiles CI ran only packages/ruflet, ruflet_core and ruflet_server plus tools/mruby_patches_test.rb. The ruflet_rails, ruflet_record, ruby_runtime and other tools suites never ran, a tools/** change started no workflow, five cross-checks skipped on every run, and the core suites only loaded on a Ruby that bundles minitest 5. - tools/run_ruby_tests.rb runs each suite as CI does and, with --strict, fails on any skip not on its (empty) allow-list. - .github/workflows/ruby-tests.yml runs every suite strictly on macOS with a template and engine checkout and the pinned mruby, on packages/**, tools/**, ruby_runtime/** and .ruby-version, plus a bundler-audit job over all five packages. - Development-only Gemfiles for ruflet_core, ruflet_server and ruflet (minitest 5 or 6 with minitest-mock, and the cross-check gems); sqlite3 for ruflet_rails' executor scenarios. - ruflet_rails: rails 8.1.4.1, rack 3.2.9, nokogiri 1.19.7, loofah 2.25.3, crass 1.0.8, json 2.21.2, rails-html-sanitizer 1.7.2. ruflet_record: sqlite3 2.10.2, Linux/Intel platforms. 61 advisories -> 0. - A booted-Rails test for TemplateSource#fetch, the production erb_to_native fetcher. - tools tests pin the contract: every test file is in a suite, the workflow runs every suite strictly, and its paths cover them. - Dependabot (lockfile-only bundler and pub, github-actions). - release.md and CONTRIBUTING_RUFLET.md test commands now work. No gemspec, lib/ or other shipped file changes. Fixes #148
…tests - ruby-tests.yml checks out ruflet-engine at a pinned commit, so an engine merge that adds a service no longer fails later ruflet runs; the comment says how to move it. ruflet-template stays unpinned on purpose. - Only pull request runs share a concurrency group, so a merge to main no longer cancels the run of the merge before it. - ruby_tests_workflow_test watches every file in each suite's folder (lib/, Gemfile, Gemfile.lock) and all of tools/, applies !patterns the way GitHub does, and checks the engine ref is a commit. - run_ruby_tests_test covers an erroring file, a file that exits non-zero after a clean summary, and failure/error counts on exit 0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #148
CI only ran
packages/ruflet,ruflet_coreandruflet_server, plustools/mruby_patches_test.rb. This PR runs every Ruby suite in CI and fails the run when a cross-check silently skips. It also declares the test toolchain the packages need and moves the two committed dev lockfiles off versions with published advisories (61 to 0).Only CI, dev tooling, dev lockfiles, tests and contributor docs change. No gemspec, no file under
lib/and nothing else that ships is touched. Apps on published gems are unaffected.What changed
New:
tools/run_ruby_tests.rbruflet_railsandruflet_recordrun throughbundle exec rake test;ruby_runtime/testandtools/*_test.rbrun per file.-rbundler/setup, orbundle execfor rake).--show-skips).--strict, any skip not inALLOWED_SKIPSfails the run. That allow-list starts empty.New:
.github/workflows/ruby-tests.ymlpackages/**,tools/**,ruby_runtime/**,.ruby-versionand the workflow file itself.core(macOS) runsruflet_core,ruflet_serverandrufletstrictly. It checks out:mainasRUFLET_TEMPLATE_ROOT. This is not pinned, because published gems fetch templatemainat build time;RUFLET_ENGINE_ROOT, pinned tof96aeee6(thecodex/engine-initializationhead that ruflet_core'sENGINE_SERVICE_TYPESmatches). Without the pin, an engine merge that adds a service would faildsl_presented_controls_teston every later ruflet PR, while main stayed green. To move the pin, runtools/sync_engine_service_types.rbagainst the new engine commit and updateref:in the same PR. The workflow comment says this.packages-and-tools(macOS) runsruflet_rails,ruflet_record,ruby_runtimeandtoolsstrictly.bundle installruns frozen, because these two packages commit their locks.ruby_runtime/third_party/mrubygitlink pins, asRUFLET_MRUBY. The gitlink has no.gitmodulesentry, so checkout cannot fetch it as a submodule.audit(ubuntu-24.04) runsbundle-auditagainst all five packages. For the core packages, which commit no lock, it resolves a lock first.build-ruflet-client.ymlis unchanged. It still runs the core suites with plainrubyon the default gems (minitest 5) before building releases, so that path stays covered too.Development-only Gemfiles
ruflet_core,ruflet_serverandruflet. Each declares:gemspec;minitest >= 5.25, < 7plusminitest-mock, so the suites load on minitest 5 and 6;Gemfile.lockis gitignored and resolved fresh, the way a user's app resolves these gems. The gemspecs'fileslists don't include the Gemfiles.ruflet_railsgainssqlite3in its test group. Tworails_executor_testscenarios used to skip without it.ruflet_recordpinsminitestto the same range as the others.Lockfiles
ruflet_rails(bundle update --conservative --minor --strict):ruflet_record:ruflet_rails; it used to listarm64-darwinonly.bundle-audit check --no-update(advisory database of 2026-11-20) finds 0 advisories in all five packages. On main it finds 59 (ruflet_rails) + 2 (ruflet_record).New tests
packages/ruflet_rails/test/template_source_test.rb(plustest/support/template_source_app.rb):TemplateSource#fetch, the fetchererb_to_nativeuses in production.redirect_toand redirect loops;render :other;tools/run_ruby_tests_test.rbchecks how the runner treats:--strict, and an allowed skip.tools/ruby_tests_workflow_test.rbpins the CI contract:tools/embedded_vm_harness/tests, which run inside an mruby VM build;ruby-tests.ymlruns every suite exactly once with--strict;pull_requestandpushpaths cover every file in each suite's folder (lib/, Gemfile, Gemfile.lock, tests) and everything undertools/.!patterns are applied the way GitHub applies them;bundle installed;Other
.github/dependabot.ymlsets up weekly grouped updates:ruflet_railsandruflet_record;ruby_runtime;bundler and pub use
versioning-strategy: lockfile-only, so Dependabot never edits a Gemfile, gemspec orpubspec.yaml.release.md's "Run the package tests" command printedCould not locate Gemfile. It now runsbundle installand thentools/run_ruby_tests.rb --strict <suite>, and lists the environment variables CI sets.CONTRIBUTING_RUFLET.mdhad the same broken all-in-one-process command, and two example test files that no longer exist. Both are fixed.How verified
All runs were on head
9c0a6dad(main57d07019merged in), with Ruby 4.0.5 / Bundler 4.0.11 unless noted, against:Gems were installed into a scratch
BUNDLE_PATH.ruby tools/run_ruby_tests.rb --strictgives 268 processes, 4054 runs, 0 failed, 0 skips. CI's Ruby tests run on the same head (Ruby 3.4.5) agrees:core260 processes and 3598 runs,packages-and-tools8 processes and 456 runs, 0 skips, and a clean audit. On main, CI reported 5 skips (railties, bootsnap,RUFLET_ENGINE_ROOT, nokogiri, pinned mruby), andruflet_railsskipped 2 more locally (sqlite3).ruflet_recordsql.rb: an open range>= ?changed to> ?.ruflet_railsexecution.rb:return yield if executor.nil?changed toreturn yield.ruflet_railsrake test has 4 failures, the fourrails_executor_testscenarios.ruflet_recordrake test has 5, all inopen_range_test.build-ruflet-client.ymlwith the same commands on Ruby 3.4.5: plainruby -Ilib -Itest, a gem environment holding only minitest 5.25.5 and msgpack, andBUNDLE_PATHpointing at an empty directory. All 260 files exit 0 (with the 5 skips main's CI shows),tools/mruby_patches_test.rbexits 0, and nothing activated the new Gemfiles: the directory stayed empty.TemplateSourcebugs are now caught. With redirects ignored and the screen's own action not re-run,template_source_test.rbhas 3 failures: the re-run, the redirect and the redirect-loop tests. Every otherruflet_railstest file stays green with the same bugs (315 runs, 0 failures).ruby_tests_workflow_test.rbfails in each of these cases:build-ruflet-client.ymlsubstituted for the new workflow (4 failures);tools/**dropped from thepull_requestpaths;packages/**narrowed topackages/*/test/**, so alib/change would no longer start it;'!packages/*/lib/**'added afterpackages/**;ruflet_railsdropped from the run, or frombundle install;ref:removed, or set to a branch name.run_ruby_tests_test.rbfails for each of these mutations ofRun#failed?:RUFLET_MRUBYpointing nowhere,--strict toolsexits 1 and namesMrubyPatchesTest#test_fits_the_pinned_mruby.cd packages/ruflet && ruby test/compat/compat.rb --jobs 4checked 359 goldens.ruby -Ilib -Itest test/compat_goldens_test.rb: 367 runs, 0 failures.bundle-audit check --no-updateis clean in all five packages, andBUNDLE_FROZEN=true bundle installsucceeds inruflet_railsandruflet_record.git diff --name-only origin/mainlists no gemspec and no file underlib/.Gem::Specification.loadfor each gemspec gives the samefilesand runtime dependencies as on main.Behavior changes
None for anyone writing or running Ruflet apps. The gems, their dependency ranges and their contents are unchanged. For contributors and CI:
packages/**,tools/**,ruby_runtime/**or.ruby-versionnow also runs Ruby tests. That workflow fails on a skipped test or on a known advisory in a package lockfile.packages/ruflet_core,ruflet_serverandrufletnow have a Gemfile, sobundle installworks there.ruflet runuses the Gemfile nearest to the directory it starts in. Apps live outside these package folders, so nothing changes for them.packages/ruflet/test/compat/fixtures/(for exampleservices_appandicons_app). Started in place withruflet run, they now findpackages/ruflet/Gemfile, soruflet runrunsbundle check(andbundle installif needed) and starts them with-rbundler/setupinstead of plainruby. This only affects contributors running those fixtures by hand. The compat goldens copy each fixture into a temporary directory before running it, so they are unaffected.Not covered here
helper_methodraisesundefined method '…' for nil.TemplateSource#renderbuilds the view with anilcontroller. Passing the controller would change what other helpers do, such asprotect_against_forgery?in forms. That needs its own fix and its own behavior-change note, so the new test leaveshelper_methodout. It leavesform_without too; ruflet_rails: hand Action View-shaped text_field, textarea and checkbox calls back to Action View (form_with works again) #120 (now on main) covers the form helpers inrails_form_helpers_test.rb.bundle installin CI printsCannot write a changed lockfile while frozen.and still exits 0. A real Gemfile/lock mismatch still fails with exit 16. Bundler on Ruby 3.4.5 wants to add abundler (4.0.11)checksum line to CHECKSUMS. Bundler on Homebrew's Ruby 4.0.5, where bundler is a default gem, removes that line again on a plainbundle install. Committing the line would only move the message and the lock churn to contributors on that Ruby, so the locks keep main's form.packages/ruflet_record/test/mruby_smoke.rb,tools/embedded_vm_harness/testsand the Dart tests inruby_runtime/testneed an mruby VM build or Flutter, so they are still not run.