feat: resolve codeflash-runtime from Maven Central - #1817
Merged
Merged
Conversation
Maven Central is now the primary resolution path for the codeflash-runtime JAR. Falls back to local dev build install for development workflows. Excludes the bundled JAR from the PyPI wheel to save ~15MB. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a download_from_github_releases() fallback between Maven Central and the dev-build-only local path. This gives pip users a working fallback when Maven Central is unreachable. Downloads to ~/.cache/codeflash/ and caches for subsequent runs. Resolution chain is now: 1. ~/.m2 cache (instant) 2. Maven Central (primary) 3. GitHub Releases download (production fallback) 4. Dev build directory (development only) The GitHub Releases fallback will activate once a release tagged 'runtime-v1.0.0' is published with the JAR as an asset. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The dev build fallback (codeflash-java-runtime/target/) in _ensure_codeflash_runtime() was dead code for production users since that directory only exists in source checkouts. The resolution chain is now: 1. ~/.m2 cache (instant) 2. Maven Central (primary) 3. GitHub Releases download (production fallback) _find_runtime_jar() is kept for build_jacoco_agent_arg() and generate_jacoco_report() which need to locate the JAR by path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
mashraf-222
pushed a commit
that referenced
this pull request
Apr 6, 2026
…tion Gradle projects and the tracer flow could not resolve codeflash-runtime when no local JAR was cached — the bundled JAR was removed in PR #1817 but the download fallback was only added to MavenStrategy. This adds a direct HTTP download from Maven Central (no mvn binary required) as a fallback in GradleStrategy.ensure_runtime() and find_agent_jar(). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
codeflash-runtimeJARProblems fixed
The
codeflash-runtimeJAR was bundled inside the Python package and installed to the local Maven repo viainstall:install-file. This added ~15MB to the PyPI wheel and required a manual install step. Now that the JAR is published to Maven Central, Maven can resolve it automatically.The previous fallback (looking for the JAR in
codeflash-java-runtime/target/) only worked from a source checkout — it was dead code for production pip users.Resolution chain
mvn dependency:resolvedownloads to~/.m2~/.cache/codeflash/then installs to~/.m2. Activates once a release taggedruntime-v1.0.0is published with the JAR as an asset.Changes
codeflash/languages/java/build_tools.pydownload_from_github_releases()— downloads the JAR from GitHub Releases to~/.cache/codeflash/, caches it for subsequent runs, returnsNonegracefully if no release exists yetresolve_from_maven_central()— callsmvn dependency:resolveto download the JAR from Maven Centralcodeflash/languages/java/test_runner.py_find_runtime_jar(): removed bundledresources/JAR lookup (no longer shipped with wheel), kept m2 cache and dev build paths (still used bybuild_jacoco_agent_arg()andgenerate_jacoco_report())_ensure_codeflash_runtime(): restructured to Maven Central then GitHub Releases fallback. Removed dead dev-build fallback.pyproject.tomlcodeflash/languages/java/resources/codeflash-runtime-*.jarTesting
E2E validation with empty
~/.m2cache to exercise the full resolution chain:--no-pr): Maven Central resolution succeeded (Resolved codeflash-runtime 1.0.0 from Maven Central). Optimization found (memoization), 29 correctness tests passed.