Repository navigation
Description
Summary
The testing plugin's cannot-fail scanner (/testing:audit, and the test-scan and test-weaken hooks that run the same engine) covers JS/TS, Python, C#, Bash, PowerShell and Go. Ruby test files are never enumerated, so an RSpec or minitest test with no assertion, or one that can only pass, goes unreported and the hooks never fire on a Ruby test edit. Add a Ruby adapter for RSpec and minitest.
Assertion forms to recognize:
- RSpec:
expect(actual).to matcher(expected)andexpect(actual).not_to(aliasto_not) insideitblocks underRSpec.describe, per the RSpec docs: https://rspec.info/features/3-13/rspec-expectations/ (the legacyshouldsyntax was not covered by that page; confirm before deciding whether to recognize it). - minitest: unit style,
assert_equal expected, actualandrefute_*insidetest_*methods of aMinitest::Testsubclass, and spec style,_(value).must_equalandwont_matchinsidedescribe/itblocks, per the minitest docs: https://docs.seattlerb.org/minitest/
Ruby assertions often have no call parenthesis (assert_equal a, b, expect(a).to eq b), so a parenthesis-anchored token match misses them, and statements end at a newline, so two assertions on one line need a ;.
Scope
plugins/testing/skills/audit/adapters/ruby-rspec.yamlandruby-minitest.yaml:files:globs (for example*_spec.rb,*_test.rb,test_*.rb; confirm against each framework's conventions),test_startforit/specify/exampleblocks anddef test_*,test_skip(skip,xit,pending), and the assertion, weak, inert (expect(true).to be true,assert true), count, fail (flunk,fail) and mock (receive,have_received,Minitest::Mock#verify) token sets, written for paren-less calls.- Block model: Ruby tests are
do ... endanddef ... endblocks, which neither thebracenor theindentmodel incant-fail-scan.awktracks. Add a keyword block model (openersdo,def,class,module,begin,if/unless/while/caseat statement start, closerend) or show the existing models suffice. - Masker: add
mask_rbtoplugins/testing/skills/audit/scripts/cant-fail-scan.awk:#comments,=begin/=endblock comments,'and"strings with#{...}interpolation (code inside, with its own quotes), heredocs (<<~TAG,<<-TAG,<<TAG, quoted tags) masked to their terminator line, and percent literals (%w(),%i[],%q{},%Q<>and other delimiters). Register it inmask_openand routelanguage: rubyto it. - Corpus fixtures under
plugins/testing/skills/audit/evals/fixtures/corpus/<adapter-id>/{bad,good}/(stored as.fixture), each listed incorpus_filesincant-fail-scan.test.sh. - Regenerate
plugins/testing/hooks/hooks.jsonwithplugins/testing/scripts/gen-hook-filters.shso the hooks'ifrows include the new globs. - Add Ruby to the language lists in
plugins/testing/skills/audit/SKILL.md(description and ecosystems paragraph) andplugins/testing/README.md. - Version bump and CHANGELOG entry for testing.
Acceptance criteria
- An RSpec
it ... do ... endblock and a minitestdef test_*method with no assertion each reportrule-zero-assertion. - A test with one real assertion in each framework, including a paren-less
assert_equal a, bandexpect(a).to eq b, reports nothing. - Two assertions on one line separated by
;are classified per statement: an inert second statement is reported. - An assertion token inside a
#comment, a heredoc, a%w()literal or a string reports nothing, while an assertion inside#{...}interpolation is still code. - A test's
endcloses the right block when the body holds nesteddo ... endandif ... endblocks, shown by a fixture with an assertion only in a nested block. - A skipped test (
xit,skip) is not reported as zero-assertion. - Every new fixture is in
corpus_files, andcant-fail-scan.test.shandcheck-corpus-grid.shpass. -
gen-hook-filters.sh --checkpasses after regeneration, andgen-hook-filters.test.shpasses.
Dependencies
Land after the in-flight scanner PR for #6211, #6218 and #6040, since all of them edit cant-fail-scan.awk, the corpus list and hooks.json. Run the four language adapters (Kotlin, C++, PHP, Ruby) one at a time for the same reason.
Rough size
Largest of the four: a new masker with heredoc, percent-literal and interpolation state, a keyword block model the engine does not have yet, and token sets for paren-less assertions.
Activity
github-actions commentedon Oct 4, 2026
Thanks for the detailed writeup. Understood: add a Ruby adapter (RSpec + minitest) to the cannot-fail scanner, including paren-less assertion token sets, a new
do...end/def...endkeyword block model forcant-fail-scan.awk, amask_rbmasker (comments, heredocs, percent literals, string interpolation), corpus fixtures, hook filter regeneration, and docs/CHANGELOG updates.The scope, acceptance criteria, and dependencies (sequencing after #6211, #6218, #6040, and after the other in-flight language adapters #6235 Kotlin, #6236 C++, #6237 PHP since they all touch the same shared files) are already clearly laid out, so nothing appears missing here.
No duplicates found — #6235, #6236, and #6237 are the related sibling adapter issues this one explicitly sequences after, not overlapping reports.
Automated triage. A maintainer reviews it.
kyle-sexton commentedon Oct 13, 2026
Owner decision (2026-10-13): approved the recommendation.
Basis: git ls-tree origin/main plugins/testing/skills/audit/adapters/ (bash, cs, go, js, pwsh, py only); gh api orgs/melodic-software/repos (no Ruby, PHP, Kotlin or C++ repository)
Next: nobody acts now. Pick it up when a repository with Ruby tests appears or an outside user asks.
This was generated by AI.
kyle-sexton commentedon Oct 19, 2026
This was generated by AI during triage.
Held for a person: Parked by owner decision (2026-10-13) until a repository the owner works in has Ruby tests or an outside user asks; no such repository exists yet.
kyle-sexton commentedon Oct 24, 2026
Decision recorded. Owner, Backlog HITL session, 2026-10-24. Q99: "Should the six issues parked until demand appears close as not planned, each with a reopen note?" Answer: "yes, go w/ recomended". To reopen: reopen this issue when a repo uses this or a user asks for it; the body and decisions above stay as the spec.