Skip to content

Name what enforces the test, comment, extension and return value rules in the rule table - #954

Merged
oryan-block merged 1 commit into
agent-friendlyfrom
agent-friendly-rule-table-rows
Nov 6, 2026
Merged

oryan-block merged 1 commit into
agent-friendlyfrom
agent-friendly-rule-table-rows

Conversation

@oryan-block

Copy link
Copy Markdown
Collaborator

Why

Agents working in graphql-java-tools keep repeating the same mistakes, and the repo should change so a change that looks right from one file is right for the whole repo. The rule table in AGENTS.md is how an agent tells which rules a check enforces and which ones depend on reading. Four PRs merged into agent-friendly before the table existed, so their rows either say "docs only" for a rule a check now enforces or aren't there at all. That's the wrong signal.

Description

Docs only, AGENTS.md:

  • the comment rule now names CommentConventionsTest: what it fails on (issue numbers outside the TODO form, its history phrases, @since and "since 1.2.0"), the lint-allow escape and its 90 day cap. History in other words and comments that repeat the code stay docs only. The matching bullet under "Rules that need judgment" says the same, since it claimed no check covers it
  • new row for tests that don't run or don't assert: surefire's **/* include, failIfNoTests, and -Xassertions=always-enable on the Kotlin test compile. It also says what gets past: -DfailIfNoTests=false, and a test that asserts nothing
  • the "neighbouring shapes" row now names the bounded check for return values (every nesting of up to 3 containers, for methods, properties and Map fields) and stays docs only for anything else
  • the merged-extensions row adds TypeExtensionTest, whose every-kind schema fails when a built type is missing anything from an extension, however the code read it. That covers the reflection hole the boundary test has, for the types it builds

I left the resolver rows alone since the resolver plan PR rewrites them. ReturnValueUnwrappingTest already has its row from the unwrapping PRs, so the bounded check only shows up here for the neighbouring shapes rule.

No release note, nothing changes for library users.

Checklist

  • Pull requests follows the contribution guide
  • New or modified functionality is covered by tests

Docs only. I checked each row against pom.xml, CommentConventionsTest, Check.java and TypeExtensionTest on agent-friendly. mvn clean verify passes on JDK 17.

@sonarqubecloud

sonarqubecloud Bot commented Nov 6, 2026

Copy link
Copy Markdown

@oryan-block
oryan-block merged commit d5a0bc2 into agent-friendly Nov 6, 2026
5 checks passed
@oryan-block
oryan-block deleted the agent-friendly-rule-table-rows branch November 6, 2026 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant