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. Kotlin test files are never enumerated, so a Kotlin test with no assertion, or one that can only pass, goes unreported and the hooks never fire on a Kotlin test edit. Add a Kotlin adapter for JUnit 5 used from Kotlin, kotlin.test, and Kotest.
Assertion forms to recognize:
- JUnit: static
Assertionscalls (assertEquals,assertTrue,assertNotNull,assertThrows), Kotlin top-levelassertThrows<T>,assertDoesNotThrow,assertInstanceOf<T>, andassertAll(heading, lambda...), which puts several assertions in one statement, per the JUnit docs: https://docs.junit.org/current/writing-tests/assertions.html - Kotest: infix and call-form matchers (
name shouldBe "sam",str.shouldHaveLength(10)), matchers chained on one expression ("substring".shouldContain("str").shouldBeLowerCase()), andassertSoftly { }grouping several assertions, per the Kotest docs: https://kotest.io/docs/assertions/assertions.html - kotlin.test (
assertEquals,assertTrue,assertFailsand the rest): not covered by the research behind this issue; confirm the assertion names from the kotlin.test API reference before writing the adapter.
Kotlin statements end at a newline, and ; between statements is rare, so two assertions on one line usually come through a chained matcher, assertAll, or assertSoftly, not a second ;-terminated statement.
Scope
plugins/testing/skills/audit/adapters/kotlin-*.yaml(one per framework, or one withextends:as the C# adapters do):files:globs (for example*Test.kt,*Tests.kt,*Spec.kt; confirm against each framework's conventions),test_startfor@Test funand Kotest spec styles (test("...") {,"name" {,should("...") {),test_skip(@Disabled, Kotestxtest/!prefixes,enabled = false), and the assertion, weak, inert, count, fail and mock token sets (MockKverify { }andevery { }).- Masker: reuse
mask_csinplugins/testing/skills/audit/scripts/cant-fail-scan.awk(//and/* */comments,"and'literals) if it can take Kotlin's"""raw strings and${...}templates without breaking C#; otherwise addmask_ktbeside it, register the lexer inmask_open, and routelanguage: kotlinto 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 Kotlin 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
- A JUnit, a kotlin.test and a Kotest test with no assertion each report
rule-zero-assertion. - A test with one real assertion in each framework reports nothing.
- A Kotest chained-matcher line, an
assertSoftly { }block and a JUnitassertAll(...)call are each classified per statement: a block holding a real assertion stays quiet, and one holding only inert assertions is flagged. - An assertion token inside a
"""raw string or a//comment does not count as an assertion. - A skipped test (
@Disabled, Kotestxtest) 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
Small to medium if mask_cs can be reused with raw-string and template additions; medium if Kotlin needs its own masker. The Kotest spec-style test starts and the chained-matcher classification are the larger parts.
Activity
github-actions commentedon Oct 4, 2026
Thanks for the detailed writeup. This asks for a Kotlin adapter (JUnit 5-via-Kotlin, kotlin.test, Kotest) for the cannot-fail scanner, covering test-file globs, test start/skip detection, assertion/weak/inert/mock token sets, a masker decision (reuse or extend mask_cs vs. a new mask_kt), new corpus fixtures, hook-filter regeneration, docs updates, and a version/CHANGELOG bump. The scope, acceptance criteria, and dependency ordering (after #6211, #6218, #6040, and run one-at-a-time with the sibling #6236/#6237/#6238 adapters) are already spelled out, so nothing appears missing. I didn't find any existing duplicate of this specific Kotlin adapter request.
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 Kotlin repository)
Next: nobody acts now. Pick it up when one of the triggers above appears.
This was generated by AI.
kyle-sexton commentedon Oct 19, 2026
This was generated by AI during triage.
Held by the owner decision of 2026-10-13: build the Kotlin adapter only when a repository the owner works in uses Kotlin or an outside user asks for it. Neither has happened 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.