Repository navigation
microskills: read a Maven or Gradle test run with other goals or options first - #384
Open
Lanre Shittu (Shizoqua) wants to merge 1 commit into
Open
Lanre Shittu (Shizoqua) wants to merge 1 commit into
Lanre Shittu (Shizoqua) wants to merge 1 commit into
Conversation
…ons first The observer read mvn test and ./gradlew test as test runs only when test came first, so mvn -q test, mvn clean test, ./gradlew clean test and ./gradlew --offline test read as a call to the package tool or were not observed, and ./mvnw test was not observed. The loop guard counts all of them. A test goal or task anywhere among the others, a subproject's :core:test included, is now a test run, except a Maven run told to skip the tests (-DskipTests, maven.test.skip) or a Gradle run that leaves the test task out (-x test), as the loop guard reads them.
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.
The observer read a Maven or Gradle test run only when
testwas the first word after the tool. Agents usually put options or other goals first, somvn -q testandmvn clean testread as a call to the package toolmvn,./gradlew clean testand./gradlew --offline testwere not observed at all, and./mvnw testwas not observed. The loop guard counts all of them as test runs, so their runs never showed the micro-skills that their form works. The other way round,mvn test -DskipTestsread as a test run though Maven runs none.Fix: in the generic reading, a Maven run (
mvn,mvnw) with atestgoal among its others, and a Gradle run (gradle,gradlew) with atesttask among its others, a subproject's:core:testincluded, is a test run with the formmvn test,mvnw test,gradle testorgradlew test(the base name, as./gradlew testalready was). Not a Maven run told to skip the tests (-DskipTests,-D skipTests,--define=skipTests,maven.test.skip, unless=false), which reads as a call tomvnasmvn clean test -DskipTestsalready did, and not a Gradle run whose test task-x/--exclude-taskleaves out. This is the loop guard's own reading (loopguard.turn.VERIFY_RE). Over the 5,974 strings in the test suites, only the Maven and Gradle commands in the loop guard's own tests (tests/test_loopguard_jvm_builds.py) are classified differently, each now as the loop guard reads it, and that file's docstring, which quotes./gradlew :app:test.Tests, in a new
tests/test_observe_maven_gradle_tasks.py:testgoal or task after options or other goals, through a wrapper or for a subproject, is a test run with its form (fail on main);mvn test -DskipTestsfails on main);mvn test,./gradlew test,mvn clean install,mvn verifyand./gradlew build -x testread as before, and the Python vocabulary does not read Maven;mvn -q clean testshows the tests ran and its form works (fails on main).The skips need Windows, a real agent CLI (Codex, Hermes, opencode) or aider, or a non-root user.
Fixes #383