Summary
Enable Gradle task-output caching for the x86 pull request build and coverage jobs, align PR title/reviewer handling with CONTRIBUTING.md, and remove two empty Java placeholder files.
This proposal keeps the existing actions/cache@v5 Gradle cache architecture. It does not migrate to gradle/actions/setup-gradle, add a push trigger, or introduce a cross-PR task-cache policy.
The changes affect repository automation only. They do not change node execution, consensus, storage, protocol, configuration, or API behavior.
Problem
Gradle task cache is disabled too broadly
The repository already enables Gradle Build Cache globally:
The existing workflow also caches the complete Gradle User Home caches and wrapper directories. This includes:
- the downloaded Gradle distribution;
- Maven and plugin dependencies;
- compiled build scripts and artifact transforms;
caches/build-cache-1, which stores cacheable task outputs.
However, four x86 invocations explicitly pass --no-build-cache:
- Debian
clean build;
- Debian
:framework:testWithRocksDb;
- Coverage Base
clean build;
- Coverage Base
:framework:testWithRocksDb.
--no-build-cache disables task-output cache reads and writes for the entire Gradle invocation. It therefore disables not only test reuse, but also cacheable compile, package, Checkstyle, and other upstream tasks whose inputs Gradle can validate.
PR title and reviewer handling are inconsistent
- The title validator recommends
type(scope): description, but should tolerate the common typo where the single space after the colon is omitted. It should not accept multiple spaces, tabs, or an empty description.
CONTRIBUTING.md permits bare titles such as ci: description. Because ci is also an existing reviewer scope, a bare ci title should select the CI reviewer group. Other bare types should continue using default reviewers until an explicit type-to-scope mapping exists.
Empty tracked files add noise
The following Java files are tracked but contain no declarations:
chainbase/src/main/java/org/tron/common/utils/ForkUtils.java
chainbase/src/main/java/org/tron/core/config/args/Parameter.java
Proposed Solution
- Keep all six existing
actions/cache@v5 Gradle cache steps and their current OS/job-specific keys.
- Remove the four invocation-wide
--no-build-cache flags from Debian and Coverage Base.
- Continue relying on GitHub cache visibility and Gradle task input fingerprints:
- a PR-created cache is scoped to
refs/pull/<number>/merge and is reusable only by later runs of the same PR;
- OS/job-specific outer keys prevent unintended platform/job restoration;
- Gradle returns
FROM-CACHE only when a cacheable task's declared input fingerprint matches.
- Permit zero or one literal ASCII space after the PR-title colon with
: ?\S, while continuing to recommend type(scope): description in messages and examples.
- Route a bare
ci: description title to the existing ci reviewer scope; preserve explicit scopes and the default fallback for other bare types.
- Delete the two confirmed 0-byte Java files.
No setup-gradle migration is included. Measurements show that Wrapper/dependency reuse is worth approximately 20 seconds per cold platform job, but the existing actions/cache implementation already provides that reuse. The observed 10m49s Ubuntu warm-run reduction mainly came from same-PR task-output hits, which the existing cache also stores. That result does not justify attributing a minutes-level benefit to an Action migration.
Correctness and Cache Scope
clean deletes module build/ directories but does not delete $GRADLE_USER_HOME/caches/build-cache-1. After clean, Gradle may restore an eligible task's outputs back into its normal build/ paths.
Task keys are based on declared inputs such as source files, build logic, task implementation classpath, JDK/toolchain, system properties, filters, JVM arguments, and output definitions. They do not contain a PR number; GitHub's PR merge-ref visibility supplies the PR boundary.
:framework:testWithRocksDb is a Gradle Test task rather than an opaque shell task. Its RocksDB system property, test filters, JVM configuration, implementation classpath, and test inputs participate in the task fingerprint. Selected tests use temporary directories, and no persistent external RocksDB service was found. A local clean/restore experiment retained the same task key and successfully returned FROM-CACHE.
If a future test contract requires the test process to launch on every CI run, use task-specific --rerun rather than disabling Build Cache for every task in the invocation.
Validation and Acceptance Criteria
- Parse all modified workflow YAML files successfully.
- Verify the four x86 Gradle commands no longer contain
--no-build-cache.
- Verify all existing Gradle cache steps still use
actions/cache@v5 with their previous paths and keys.
- Validate positive and negative PR-title regex cases.
- Validate reviewer routing for explicit scopes, bare
ci, and other bare types.
- Run the origin PR matrix on macOS ARM, Linux ARM, Rocky x86_64, and Debian x86_64.
- Run the same PR jobs twice and confirm eligible tasks return
FROM-CACHE on the warm run.
- Change a task-relevant input and confirm that task executes instead of incorrectly returning
FROM-CACHE.
Expected Impact
- Performance: enable same-PR task-output reuse in the four x86 invocations without changing dependency-cache architecture.
- Correctness: retain Gradle's per-task input validation and GitHub's existing PR/OS/job cache isolation.
- Maintenance: keep this PR focused; evaluate any future
setup-gradle migration separately using storage, immutable archive, reliability, and maintenance evidence.
- Runner usage: add no new workflow trigger or platform matrix.
- Compatibility: no node-facing, protocol, database, configuration, or API changes.
References
Additional Notes
- Do you have ideas regarding implementation? Yes
- Are you willing to implement this feature? Yes
- Estimated complexity: Low
Summary
Enable Gradle task-output caching for the x86 pull request build and coverage jobs, align PR title/reviewer handling with
CONTRIBUTING.md, and remove two empty Java placeholder files.This proposal keeps the existing
actions/cache@v5Gradle cache architecture. It does not migrate togradle/actions/setup-gradle, add apushtrigger, or introduce a cross-PR task-cache policy.The changes affect repository automation only. They do not change node execution, consensus, storage, protocol, configuration, or API behavior.
Problem
Gradle task cache is disabled too broadly
The repository already enables Gradle Build Cache globally:
org.gradle.caching=trueThe existing workflow also caches the complete Gradle User Home
cachesandwrapperdirectories. This includes:caches/build-cache-1, which stores cacheable task outputs.However, four x86 invocations explicitly pass
--no-build-cache:clean build;:framework:testWithRocksDb;clean build;:framework:testWithRocksDb.--no-build-cachedisables task-output cache reads and writes for the entire Gradle invocation. It therefore disables not only test reuse, but also cacheable compile, package, Checkstyle, and other upstream tasks whose inputs Gradle can validate.PR title and reviewer handling are inconsistent
type(scope): description, but should tolerate the common typo where the single space after the colon is omitted. It should not accept multiple spaces, tabs, or an empty description.CONTRIBUTING.mdpermits bare titles such asci: description. Becauseciis also an existing reviewer scope, a barecititle should select the CI reviewer group. Other bare types should continue using default reviewers until an explicit type-to-scope mapping exists.Empty tracked files add noise
The following Java files are tracked but contain no declarations:
chainbase/src/main/java/org/tron/common/utils/ForkUtils.javachainbase/src/main/java/org/tron/core/config/args/Parameter.javaProposed Solution
actions/cache@v5Gradle cache steps and their current OS/job-specific keys.--no-build-cacheflags from Debian and Coverage Base.refs/pull/<number>/mergeand is reusable only by later runs of the same PR;FROM-CACHEonly when a cacheable task's declared input fingerprint matches.: ?\S, while continuing to recommendtype(scope): descriptionin messages and examples.ci: descriptiontitle to the existingcireviewer scope; preserve explicit scopes and the default fallback for other bare types.No
setup-gradlemigration is included. Measurements show that Wrapper/dependency reuse is worth approximately 20 seconds per cold platform job, but the existingactions/cacheimplementation already provides that reuse. The observed 10m49s Ubuntu warm-run reduction mainly came from same-PR task-output hits, which the existing cache also stores. That result does not justify attributing a minutes-level benefit to an Action migration.Correctness and Cache Scope
cleandeletes modulebuild/directories but does not delete$GRADLE_USER_HOME/caches/build-cache-1. Afterclean, Gradle may restore an eligible task's outputs back into its normalbuild/paths.Task keys are based on declared inputs such as source files, build logic, task implementation classpath, JDK/toolchain, system properties, filters, JVM arguments, and output definitions. They do not contain a PR number; GitHub's PR merge-ref visibility supplies the PR boundary.
:framework:testWithRocksDbis a GradleTesttask rather than an opaque shell task. Its RocksDB system property, test filters, JVM configuration, implementation classpath, and test inputs participate in the task fingerprint. Selected tests use temporary directories, and no persistent external RocksDB service was found. A local clean/restore experiment retained the same task key and successfully returnedFROM-CACHE.If a future test contract requires the test process to launch on every CI run, use task-specific
--rerunrather than disabling Build Cache for every task in the invocation.Validation and Acceptance Criteria
--no-build-cache.actions/cache@v5with their previous paths and keys.ci, and other bare types.FROM-CACHEon the warm run.FROM-CACHE.Expected Impact
setup-gradlemigration separately using storage, immutable archive, reliability, and maintenance evidence.References
30992902604,30992949238, and31068401594Additional Notes