Skip to content

chore(ci): guard against unauthorized JDK and toolchain changes in agent-leftovers - #27

Open
dkhawk wants to merge 1 commit into
mainfrom
chore/agent-leftovers-jdk-checks
Open

dkhawk wants to merge 1 commit into
mainfrom
chore/agent-leftovers-jdk-checks

Conversation

@dkhawk

@dkhawk dkhawk commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

Extends .github/scripts/check_agent_leftovers.py to catch accidental JDK and Gradle toolchain changes introduced from workstation environments with bleeding-edge default JDKs:

  • Adds DIFF_ONLY_PATTERNS (checked on added diff lines via scan_text(text, include_diff_only=True), leaving commit messages and PR titles/bodies free to reference these terms):
    • JavaVersion.VERSION_* > 17
    • JvmTarget.JVM_* > 17
    • jvmToolchain(...) additions
    • foojay-resolver references
    • org.gradle.java.home overrides
    • CI java-version: > 21
  • Adds gradle-daemon-jvm.properties to FILE_PATTERNS.
  • Updates the script docstring to document the new checks.

Lines that legitimately require one of these settings can opt out with agent-leftovers: ignore.

Verification

  • Verified all 6 DIFF_ONLY_PATTERNS and gradle-daemon-jvm.properties trigger cleanly (exit 1) on added diff lines/files in an end-to-end test repository.
  • Verified safe versions (JavaVersion.VERSION_1_8/11/17, JvmTarget.JVM_1_8/11/17, java-version: '17'/'21'), agent-leftovers: ignore opt-outs, commit/PR metadata discussing these tokens, and edits to SKIPPED_FILES all pass (exit 0).

…ent-leftovers

Adds DIFF_ONLY_PATTERNS to check_agent_leftovers.py to catch unauthorized JavaVersion/JvmTarget bumps past 17, jvmToolchain additions, foojay-resolver references, local org.gradle.java.home overrides, and CI java-version bumps past 21 on added diff lines, and adds gradle-daemon-jvm.properties to FILE_PATTERNS.
@github-actions

Copy link
Copy Markdown

Coverage (unit tests)

No unit baseline recorded in coverage/history.csv yet, so this run only reports absolute numbers.

Module Line % Change Branch % Change
golden-testing 90.42% new 58.00% new
robolectric-testing 84.25% new 51.87% new
visual-testing 63.58% new 35.16% new
TOTAL 82.28% new 47.11% new

Line and branch coverage from unit test reports. History is recorded in coverage/history.csv after each merge to main.

@dkhawk
dkhawk marked this pull request as ready for review November 19, 2026 18:46
@dkhawk
dkhawk requested a review from a team as a code owner November 19, 2026 18:46
@dkhawk
dkhawk requested a review from kikoso November 19, 2026 18:47

This branch has not been deployed

No deployments
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