Repository navigation
Workflow: Java toolchain setup script + one preflight command (#3654) - #3668
Merged
Merged
Conversation
scripts/setup_java_toolchain.sh installs Temurin JDK 17 and 21 and Gradle 8.10.2 into .tools/ (gitignored): - idempotent: an install counts only when bin/javac or bin/gradle exists; - each download goes to a temp dir and is moved into place when complete, and `curl -f` fails on HTTP errors; - --jdk17-from reuses a full JDK (rejects a JRE); unknown arguments are an error; - --dry-run; --print-env for `eval`. tests/tools/preflight.py runs the local PR gates and prints one PASS / FAIL / SKIP table, then the output tail of each failure: - ruff format on the changed .py files; the ruff, mypy and dead-key audits; field_testing check; refraction_snapshot check; - with --java, java_target_matrix --scan on CardDemo (3 configs) and GENAPP; - works from any directory (git runs at the repo root); - the Java gates SKIP with the reason when no JDK or corpus is found. The modernization skill names both, in "Done means" and in the audits gotcha. Drafted by an agy (Gemini 3.1 Pro) agent. Review fixed: - its changed-files test, which failed (a set order, and files that do not exist); - changed-file discovery that depended on the caller's cwd (from /tmp it saw no changes); - a partial download counting as installed; - `curl` without -f; - silently ignored arguments. Run from /tmp, `preflight.py --java`: all 8 gates PASS. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
…(X-Ray entropy) (#3654) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
X-Ray failed #3668 in CI on a dense literal that no local gate ran. The gate runs binary_anomaly_detector on the repo. It fails the pre-fix script (1 anomaly, exit 1) and passes the fixed one. 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.
Closes #3654.
scripts/setup_java_toolchain.sh.tools/(gitignored).bin/javac/bin/gradleexists. Downloads land in a temp dir and are moved into place only when complete, andcurl -ffails on HTTP errors.--jdk17-from <dir>reuses an existing full JDK and rejects a JRE.--dry-run.eval "$(scripts/setup_java_toolchain.sh --print-env)"setsJDK_17/JDK_21/JAVA_HOME/PATH. Unknown arguments are an error.tests/tools/preflight.py [--java] [--only NAME …] [--fail-fast]One command for the local gates, with one table at the end and the output tail of each failure:
That run was from
/tmp, warm caches.ruff formatruns only on the .py files changed vsorigin/main, and git always runs at the repo root. The Java gates SKIP, with the reason, when no JDK or corpus is found.The modernization skill references both, in "Done means" and in the audits gotcha.
Provenance
Drafted by an agy (Gemini 3.1 Pro) agent from a scoped brief, then reviewed and fixed:
set's order, on files that did not exist);/tmpit found "no changes";curllacked-f;Also: messy multi-line table cells, and a hard-coded corpora path. The tests now cover cwd-independence, missing-JDK and missing-corpus skips, and the table.
🤖 Generated with Claude Code
https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g