Skip to content

ci: block unauthorized JDK and Gradle toolchain changes in agent-leftovers check - #1103

Draft
dkhawk wants to merge 1 commit into
mainfrom
ci/check-unauthorized-jdk-changes
Draft

dkhawk wants to merge 1 commit into
mainfrom
ci/check-unauthorized-jdk-changes

Conversation

@dkhawk

@dkhawk dkhawk commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

Extends .github/scripts/check_agent_leftovers.py to fail pull requests that introduce unauthorized JDK or Gradle toolchain overrides in diff lines or newly added files.

Changes

  • Added diff-only checks (DIFF_ONLY_PATTERNS, scanned via scan_text(..., include_diff_only=True) so commit messages and PR metadata remain unaffected) for:
    • JavaVersion.VERSION_* > 17
    • JvmTarget.JVM_* > 17
    • jvmToolchain(...) / jvmToolchain { ... }
    • foojay-resolver
    • org.gradle.java.home
    • CI java-version: > 21
  • Added gradle-daemon-jvm.properties to FILE_PATTERNS.
  • Added unit and temporary-repo end-to-end tests in .github/scripts/test_check_agent_leftovers.py (and added it to SKIPPED_FILES so fixture strings do not self-trigger).

Verification

  • python3 -B .github/scripts/test_check_agent_leftovers.py -v: 8/8 passed.

cc @kikoso @LoyalAbbas

…overs check

- Add diff-only patterns in .github/scripts/check_agent_leftovers.py for JavaVersion > 17, JvmTarget > 17, jvmToolchain(...)/jvmToolchain {...}, foojay-resolver, org.gradle.java.home, and CI java-version > 21.
- Flag newly added gradle-daemon-jvm.properties files in FILE_PATTERNS.
- Add unit and end-to-end tests in .github/scripts/test_check_agent_leftovers.py and skip the test fixture file from self-scanning.
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown

Coverage (unit tests)

Compared against 92ce5fe on main (#1001).

Module Line % Change Branch % Change
maps-compose 45.85% no change 15.28% no change
maps-compose-utils 26.29% no change 12.70% no change
maps-compose-widgets 72.26% no change 40.48% no change
TOTAL 42.57% no change 15.62% no change

Line and branch coverage from unit test reports. History is recorded on the coverage-history branch after each merge to main.

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