Repository navigation
CI: Generated Java Compiles — compare build inputs only, parallel generations, reuse them - #3777
Merged
Merged
Conversation
…nerations, reuse them The pull-request check (java_target_matrix.py --same-as) now: - compares only what the build reads (src/, pom.xml, the Gradle files). On #3768 every difference was a porting ticket (ai_agent_jobs/*.json), yet four corpora set up the JDKs and compiled every config twice; - runs its four generations (head/base x plain/scan) side by side; - caches the base's generation per base commit (--base-cache), so a later push to the same PR generates only the head; - and, when a build input did change, the build steps compile the projects the check already generated (--generated) instead of refactoring -- and engine-scanning -- the corpus a third time. Pushes, the weekly run and manual runs still build from scratch. dsf (the slowest check, 416s on CI): 170s -> 104s cold, 85s with the base cached, locally; the remainder is the head's own engine scan. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
Contributor
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.
Speeds up the Generated Java Compiles workflow on pull requests. On #3768 it took 5–7 minutes per corpus while the Java that gets compiled hadn't changed at all.
Where the time went (#3768)
ai_agent_jobs/*_port_ticket.json), which no build reads. Four of the six corpora still set up JDK 17/21 and Gradle and compiled every config on both paths.Changes (
tests/tools/java_target_matrix.py,java-compile.yml)build_input):src/,pom.xmland the Gradle files. Reports (tickets, worklists, audit, traceability) are listed in the summary, but don't trigger a compile.--base-cacheplus anactions/cachestep keyed on the base SHA). A second push to the same PR generates only the head.--generated). When a build input changed, the build steps compile the head projects the check already produced, instead of refactoring and scanning the corpus again.Pushes to main, the weekly run and manual runs still build from scratch, so the base always gets compiled.
Measured (dsf, locally)
The remaining time is the head's own engine scan, which is the thing a PR changes. On top of this, the build step no longer re-scans, and a PR like #3768 (tickets only) now skips the compile entirely.
Tests
test_java_matrix_gate.py: which files count as build inputs; that the base cache keeps only the projects and ignores an incomplete entry. I tested reuse end to end on zecs: a cached base on the second run, and--generatedbuilding PASS for default and gradle.🤖 Generated with Claude Code
https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g