Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
602 commits
Select commit Hold shift + click to select a range
644acce
Merge pull request #1627 from codeflash-ai/codeflash/optimize-pr1199-…
claude[bot] Feb 21, 2026
ca30a51
Merge pull request #1629 from codeflash-ai/codeflash/optimize-pr1199-…
claude[bot] Feb 21, 2026
b855725
Merge pull request #1630 from codeflash-ai/codeflash/optimize-pr1199-…
claude[bot] Feb 21, 2026
7fb8281
Merge pull request #1632 from codeflash-ai/codeflash/optimize-pr1199-…
claude[bot] Feb 21, 2026
6da20f1
Merge pull request #1622 from codeflash-ai/codeflash/optimize-pr1199-…
claude[bot] Feb 21, 2026
8b6b42e
Merge pull request #1621 from codeflash-ai/codeflash/optimize-pr1199-…
claude[bot] Feb 21, 2026
22caad5
Merge pull request #1603 from codeflash-ai/codeflash/optimize-pr1199-…
claude[bot] Feb 21, 2026
bf388b3
Merge pull request #1624 from codeflash-ai/codeflash/optimize-pr1199-…
claude[bot] Feb 21, 2026
ff60f3a
Merge pull request #1635 from codeflash-ai/codeflash/optimize-pr1543-…
claude[bot] Feb 21, 2026
d4653e6
Merge pull request #1636 from codeflash-ai/codeflash/optimize-pr1543-…
claude[bot] Feb 21, 2026
7fa7eea
instrumentation bugs with multiple function calls
misrasaurabh1 Feb 21, 2026
7261a7f
Merge remote-tracking branch 'origin/omni-java' into omni-java
misrasaurabh1 Feb 21, 2026
67c4d34
fix: Java loop ID calculation and assertion transformer bug
misrasaurabh1 Feb 23, 2026
76e00f0
style: auto-fix linting issues
github-actions[bot] Feb 23, 2026
0d8d233
fix: add +1 to Java loop count display for 0-indexed composite loopIds
misrasaurabh1 Feb 23, 2026
83fa097
Merge remote-tracking branch 'origin/loop-id-calculation-fix-bug' int…
misrasaurabh1 Feb 23, 2026
fcdb406
style: auto-fix linting issues
github-actions[bot] Feb 23, 2026
62db236
fix: use correct iteration_id format for Java performance mode
misrasaurabh1 Feb 23, 2026
3ba1ac4
Merge remote-tracking branch 'origin/loop-id-calculation-fix-bug' int…
misrasaurabh1 Feb 23, 2026
00d02c1
style: fix mypy type errors in Java formatter and comparator
github-actions[bot] Feb 23, 2026
82a8c41
Merge pull request #1638 from codeflash-ai/loop-id-calculation-fix-bug
misrasaurabh1 Feb 23, 2026
51028a6
updating workflows to mains
aseembits93 Feb 24, 2026
bdd22af
chore: sync workflow files from main
aseembits93 Feb 24, 2026
efb5cd9
reverting workflows to original state
aseembits93 Feb 24, 2026
aaee7aa
feat: direct JVM execution for behavioral and line-profile tests
mashraf-222 Feb 24, 2026
2e078f7
revert: restore Maven-based execution for line-profile tests
mashraf-222 Feb 25, 2026
24d38b6
Merge branch 'omni-java' into fix/java/line-profiler
HeshamHM28 Feb 25, 2026
9b6d645
fix: update profiling logic and improve loop index handling in tests
HeshamHM28 Feb 25, 2026
96e231e
Merge branch 'fix/java/line-profiler' of github.com:codeflash-ai/code…
HeshamHM28 Feb 25, 2026
b69f4d5
Optimize JavaLineProfiler.instrument_function
codeflash-ai[bot] Feb 25, 2026
bde5185
fix: optimize hit method to reduce profiler overhead and improve timi…
HeshamHM28 Feb 25, 2026
5447c83
Merge pull request #1659 from codeflash-ai/codeflash/optimize-pr1543-…
HeshamHM28 Feb 25, 2026
a3dd3be
Merge pull request #1543 from codeflash-ai/fix/java/line-profiler
HeshamHM28 Feb 25, 2026
380e55b
Merge pull request #1654 from codeflash-ai/feat/direct-jvm-behavioral…
mashraf-222 Feb 25, 2026
23db0d7
fix: add Java support for test module path resolution in existing_tes…
HeshamHM28 Feb 26, 2026
04b0dbd
Merge pull request #1674 from codeflash-ai/fix/java/pr-test-path-reso…
HeshamHM28 Feb 26, 2026
e1fb4b8
fix runtime calculation for java
misrasaurabh1 Mar 1, 2026
00a5dc7
remove logging statements
misrasaurabh1 Mar 1, 2026
4ecb626
fix: Java comparator key collision and add A/A baseline test
misrasaurabh1 Mar 1, 2026
1bcca07
revert
misrasaurabh1 Mar 1, 2026
d9de2cf
add the jar back again
misrasaurabh1 Mar 1, 2026
24e26c3
Merge pull request #1698 from codeflash-ai/fix-runtime-calculation
misrasaurabh1 Mar 1, 2026
2371540
fix: guard Java replacement against wrong-method-name candidates and …
misrasaurabh1 Mar 2, 2026
7dd25a0
style: auto-fix ruff formatting issues
github-actions[bot] Mar 2, 2026
ade70d6
feat: sketch JavaFunctionOptimizer subclass
KRRT7 Mar 2, 2026
a538722
chore: sync docs, CI, config, and rules from main
KRRT7 Mar 2, 2026
65288d1
feat: sync JS/TS language improvements from main
KRRT7 Mar 2, 2026
c37fb44
feat: sync language infrastructure from main with Java additions
KRRT7 Mar 2, 2026
8046fcf
feat: sync Python language changes from main with Java additions
KRRT7 Mar 2, 2026
e222e24
feat: sync code utilities and discovery from main with Java additions
KRRT7 Mar 2, 2026
d518ad2
feat: sync core pipeline from main with Java protocol additions
KRRT7 Mar 2, 2026
2299d26
feat: sync CLI from main with Java additions
KRRT7 Mar 2, 2026
19bd6e4
test: sync test files from main (safe, main-only changes)
KRRT7 Mar 2, 2026
bd3ec8f
test: sync dual-changed test files from main with omni-java fixes
KRRT7 Mar 2, 2026
2dfa74d
chore: sync pyproject.toml from main and add tree-sitter-java dependency
KRRT7 Mar 2, 2026
f37b372
fix: update Java test_replacement import for moved code_replacer module
KRRT7 Mar 2, 2026
a14bd09
fix: update Java tests for protocol-dispatch refactoring
KRRT7 Mar 2, 2026
e7687f2
fix: rename min/max_outer_loops to pytest_min/max_loops and add Java …
KRRT7 Mar 2, 2026
f7fd593
fix: resolve remaining test failures after main sync
KRRT7 Mar 2, 2026
db447d6
fix: pass test_string to instrument_existing_test in function_optimizer
KRRT7 Mar 2, 2026
d5c744a
style: auto-fix ruff formatting in java test_runner
github-actions[bot] Mar 2, 2026
83831ac
fix: resolve e2e test path and pass_fail_only issues
KRRT7 Mar 2, 2026
61bcc37
Update test_java_e2e.py
KRRT7 Mar 2, 2026
754727c
fix: resolve e2e failures (path, pass_fail_only, Java context, codefl…
KRRT7 Mar 2, 2026
5b17da8
Update support.py
KRRT7 Mar 2, 2026
67b422f
fix: add @property to JavaSupport.function_optimizer_class, prek form…
KRRT7 Mar 2, 2026
2a2b421
fix: resolve remaining Java test failures
KRRT7 Mar 2, 2026
130953a
one more
KRRT7 Mar 2, 2026
399441e
one more
KRRT7 Mar 2, 2026
66f1633
fix: respect CODEFLASH_INNER_ITERATIONS env var in Java test runner
KRRT7 Mar 2, 2026
e67cdb9
fix paths
KRRT7 Mar 2, 2026
253ced9
refactor: remove all is_java() guards from shared code
KRRT7 Mar 2, 2026
ea82e2c
refactor: delete dead concolic_testing.py from shared code
KRRT7 Mar 2, 2026
e1f8e07
refactor: make parse_test_xml a protocol method on LanguageSupport
KRRT7 Mar 2, 2026
cd02dec
test: use full string equality in anonymous iterator test
misrasaurabh1 Mar 2, 2026
1c0fe48
Merge pull request #1704 from codeflash-ai/fix/java/wrong-method-name…
misrasaurabh1 Mar 2, 2026
d38a0b5
temp
KRRT7 Mar 2, 2026
22b5f02
format
KRRT7 Mar 2, 2026
a880ffc
fix: skip outer-class methods when target is in a static inner class …
misrasaurabh1 Mar 2, 2026
626be4d
use the class parser directly
KRRT7 Mar 3, 2026
05a9b61
fix: replace modified constructors when LLM adds new final fields (Java)
misrasaurabh1 Mar 3, 2026
d455afb
Merge pull request #1727 from codeflash-ai/fix/java/constructor-repla…
misrasaurabh1 Mar 3, 2026
f79cd93
release
KRRT7 Mar 3, 2026
fe3e2f6
11 as per workflow
KRRT7 Mar 3, 2026
7b7c4fb
Update parse_line_profile_test_output.py
KRRT7 Mar 3, 2026
dc25d12
one more
KRRT7 Mar 3, 2026
aae13a8
feat: skip inner-class methods in Java discovery; revert replacement-…
misrasaurabh1 Mar 3, 2026
881b4e9
fix: resolve merge conflicts and fix test failures
KRRT7 Mar 3, 2026
400cf06
Merge pull request #1726 from codeflash-ai/fix/java/inner-class-helpe…
misrasaurabh1 Mar 3, 2026
1fdbd2c
fix(java): resolve SQLite 'database is locked' errors across the pipe…
misrasaurabh1 Mar 3, 2026
de0fb91
fix(java): kill entire process group on Maven timeout to prevent orph…
misrasaurabh1 Mar 3, 2026
16d314b
revert: remove WAL/busy_timeout defense-in-depth SQLite changes
misrasaurabh1 Mar 3, 2026
cc2e5fb
Merge pull request #1728 from codeflash-ai/fix/java/sqlite-locked-error
misrasaurabh1 Mar 3, 2026
f34dd7b
fix(java): add Windows guard for process-group kill and remove slow t…
misrasaurabh1 Mar 3, 2026
7d45efe
fix(java): exclude apidocs and javadoc directories from file discovery
misrasaurabh1 Mar 3, 2026
1573506
fix(java): fix lint error and broken mock in test_filter_validation
misrasaurabh1 Mar 3, 2026
814ce53
fix(java): add Windows guard for process-group kill and remove slow t…
misrasaurabh1 Mar 3, 2026
c111635
fix(java): fix lint error and broken mock in test_filter_validation
misrasaurabh1 Mar 3, 2026
8b0f1ea
Merge pull request #1731 from codeflash-ai/fix/java/sqlite-process-gr…
misrasaurabh1 Mar 3, 2026
96b99ea
Merge pull request #1732 from codeflash-ai/fix/java/exclude-apidocs-f…
misrasaurabh1 Mar 3, 2026
d73daba
feat: add foundation for language optimizer extraction from main
KRRT7 Mar 3, 2026
e8e1e2b
feat: bring safe incremental changes from main
KRRT7 Mar 3, 2026
08dad4e
chore: sync docs, rules, and workflows from main
KRRT7 Mar 3, 2026
919551e
Merge pull request #1733 from codeflash-ai/feat/java-runtime-and-samples
KRRT7 Mar 3, 2026
5b7a6f5
fix: skip Maven validation plugins that reject generated test files
mashraf-222 Feb 25, 2026
0903060
fix: add surefire.failIfNoSpecifiedTests for multi-module Maven builds
mashraf-222 Feb 25, 2026
39bea14
fix: auto-add missing standard library imports in AI-generated Java t…
mashraf-222 Feb 25, 2026
9e5880f
fix: infer Java return types in assertion transformer instead of usin…
mashraf-222 Feb 25, 2026
137d1f4
fix: increase Maven verify timeout from 120s to 300s for coverage runs
mashraf-222 Feb 25, 2026
44fa2f8
test: update instrumentation test for assertion type inference
mashraf-222 Feb 25, 2026
ed6c500
Optimize JavaAssertTransformer._generate_replacement
codeflash-ai[bot] Feb 25, 2026
23b6d6d
Optimize JavaAssertTransformer._infer_return_type
codeflash-ai[bot] Feb 25, 2026
2ca9469
Optimize JavaAssertTransformer._infer_type_from_assertion_args
codeflash-ai[bot] Feb 25, 2026
d9a6177
refactor: remove CLI-side Java import band-aid
mashraf-222 Feb 25, 2026
2e3ddbe
fix: handle non-standard JUnit parameterized test name patterns in lo…
mashraf-222 Feb 26, 2026
ecd9267
fix: update assertion removal tests for type inference and fix ruff lint
mashraf-222 Mar 3, 2026
77b545c
style: auto-format with ruff
mashraf-222 Mar 3, 2026
cda56d1
fix: handle JUnit 4 message-first assertEquals type inference
mashraf-222 Mar 3, 2026
9bb7722
fix: reject vacuous equivalence and deserialization error false match…
mashraf-222 Feb 24, 2026
e6ca15c
test: update empty-table test to expect not-equivalent after vacuous …
mashraf-222 Feb 24, 2026
056cec7
Merge pull request #1663 from codeflash-ai/fix/java-maven-test-execut…
mashraf-222 Mar 3, 2026
2cd1f2b
chore: update bundled runtime JAR with vacuous equivalence guard
mashraf-222 Mar 3, 2026
50ba89c
ci: build codeflash-runtime JAR in unit-tests workflow
mashraf-222 Mar 3, 2026
dc7caa3
Merge pull request #1651 from codeflash-ai/fix/java-comparator-vacuou…
mashraf-222 Mar 3, 2026
2261e98
fix: suppress Error Prone CheckReturnValue in instrumented tests and …
mashraf-222 Mar 3, 2026
6ad0d8b
fix how tests looks like when PR is created
misrasaurabh1 Mar 3, 2026
b9135c5
fix: address PR review feedback for Error Prone and build_tools
mashraf-222 Mar 4, 2026
62aaab8
fix: pre-install multi-module Maven deps to avoid recompilation failures
mashraf-222 Mar 4, 2026
1b3fa91
feat: Java testgen class name fix, remove per-test @Timeout, and wire…
Mar 4, 2026
292b6a6
style: auto-fix linting issues (RET504 in function_optimizer, D413 in…
github-actions[bot] Mar 4, 2026
e4ceaff
fix: prevent system-scope dependency regex from replacing all pom dep…
mashraf-222 Mar 4, 2026
074cce8
chore: add pre-commit rule from main
KRRT7 Mar 4, 2026
3041b05
fix: handle itertools.count in comparator
aseembits93 Feb 27, 2026
b13d2e1
fix: handle itertools.repeat and itertools.cycle in comparator
aseembits93 Feb 27, 2026
d7f24ad
fix: handle all remaining itertools types in comparator
aseembits93 Feb 27, 2026
706e33e
fix: support Python 3.10-3.14 in comparator itertools tests
aseembits93 Feb 27, 2026
ed76012
fix: add types.UnionType support to comparator
aseembits93 Feb 20, 2026
d2454a2
fix: handle __slots__-only objects in comparator
KRRT7 Feb 23, 2026
04c4dd9
perf: cache path resolution and validity checks in tracer hot path
KRRT7 Feb 27, 2026
ac5d070
perf: use string-based path ops in tracer hot path, defer Path constr…
KRRT7 Feb 27, 2026
e898434
fix: skip pytest-internal JUnit XML entries and optimize pytest plugin
KRRT7 Feb 22, 2026
7fe9506
perf: pre-compile regex and use generator in pytest plugin hot loop
KRRT7 Feb 22, 2026
4cf8d31
perf: cache module scan in _clear_lru_caches and expand test coverage
KRRT7 Feb 22, 2026
e82e4cf
fix: skip identical and duplicate candidates early before processing
KRRT7 Feb 23, 2026
b5fab57
fix: preserve comment position by passing CST module directly to impo…
KRRT7 Feb 23, 2026
a89dc4b
test: add regression tests for comment position preservation
KRRT7 Feb 23, 2026
2606f48
fix: re-export jest patterns for backward compatibility
github-actions[bot] Feb 4, 2026
b3d4e22
feat: discover const arrow functions exported via named export clauses
Saga4 Mar 2, 2026
800ebed
feat: discover object methods exported via CJS module.exports = variable
Saga4 Mar 2, 2026
ade8558
Update codeflash/languages/java/support.py
HeshamHM28 Mar 4, 2026
a14ef40
fix: raise clear error for unsupported JS test frameworks instead of …
Saga4 Mar 2, 2026
095b8b7
feat: add skip_confirm and skip_api_key params to JS init for non-int…
Saga4 Mar 2, 2026
a429f47
fix: show actionable error when JS/TS function exists but is not expo…
Saga4 Mar 2, 2026
cb1ea5a
fix: use pattern matching for collocated tests in monorepos
Saga4 Mar 3, 2026
92a6460
refactor: consolidate Python function discovery to CST path only
KRRT7 Feb 27, 2026
8f0ff84
fix: update tests for consolidated CST discovery behavior
KRRT7 Feb 27, 2026
894803c
style: fix ruff formatting issues from cherry-picked commits
KRRT7 Mar 4, 2026
e6b2f79
feat: bundle JUnit XML reporter for Jest, replacing external jest-jun…
Saga4 Mar 2, 2026
15fcf47
add mocha support
Saga4 Mar 2, 2026
b39f2a2
fix: support Mocha CJS projects and sanitize incorrect framework imports
Saga4 Mar 3, 2026
74150c2
fix: resolve Vitest benchmarking showing wall-clock time instead of p…
Saga4 Mar 3, 2026
4f2c65d
fix: strip CJS require('vitest') and require('@jest/globals') in Moch…
Saga4 Mar 3, 2026
6e34dcc
fix: regenerate stale vitest config and add .js extension for ESM imp…
Saga4 Mar 3, 2026
f5d4884
fix mocha test runner
Saga4 Mar 3, 2026
c6a1b9a
style: add missing TYPE_CHECKING imports for ValidCode and TestConfig
KRRT7 Mar 4, 2026
fb6a4ab
fix: update test expectations for extra blank line after imports
KRRT7 Mar 4, 2026
b2b8201
fix: update test_get_helper_code expectation for blank line after imp…
KRRT7 Mar 4, 2026
ec73c2c
revert: undo Vitest benchmarking and capture.js changes
KRRT7 Mar 4, 2026
7c4ae58
Merge pull request #1751 from codeflash-ai/merge/language-refactoring…
KRRT7 Mar 4, 2026
26f2c50
feat: add inline runtime comments and unique _cf_mod/_cf_cls markers …
misrasaurabh1 Mar 4, 2026
82e4627
Merge pull request #1740 from codeflash-ai/fix/java-comparator-and-er…
mashraf-222 Mar 4, 2026
84ac714
fix: use pattern matching for collocated tests in monorepos
Saga4 Mar 3, 2026
6256fd7
refactor: deduplicate format_code and validate_syntax between JS and …
KRRT7 Mar 2, 2026
c7854fb
chore: remove simplify step from Claude PR review and add prek rule
KRRT7 Mar 4, 2026
412d131
fix: resolve ruff errors in code_context_extractor
github-actions[bot] Feb 21, 2026
c11f523
fix: correct pre-existing test failures in test_code_context_extractor
KRRT7 Feb 18, 2026
2112d62
refactor: remove is_python() guards from code-restore sites in run_op…
KRRT7 Mar 2, 2026
01bada9
chore: add TODO for get_code_optimization_context extraction, update …
KRRT7 Mar 2, 2026
a0249af
fix: use PythonFunctionOptimizer in tests that depend on Python-speci…
KRRT7 Mar 2, 2026
efa4a00
fix: handle non-UTF-8 subprocess output with errors='replace'
KRRT7 Mar 4, 2026
c550bf1
fix: restore QName test to match omni-java's enrich_testgen_context b…
KRRT7 Mar 4, 2026
62010ec
fix: add missing languages/code_replacer.py for JS function optimizer
KRRT7 Mar 4, 2026
6da2319
style: fix unused loop variable in function_optimizer.py
KRRT7 Mar 4, 2026
8a44562
revert: undo unused loop variable fix — tests_in_file_list is used on…
KRRT7 Mar 4, 2026
ef83035
Optimize _generate_sqlite_write_code
codeflash-ai[bot] Mar 4, 2026
5a3f8cd
Optimize add_runtime_comments
codeflash-ai[bot] Mar 4, 2026
bccc02a
merge: incorporate omni-main-java sync work
KRRT7 Mar 4, 2026
af7ce7f
fix: cherry-pick main improvements into omni-java branch
KRRT7 Mar 4, 2026
92ab600
fix: resolve remaining test failures from main sync
KRRT7 Mar 4, 2026
ca149fa
fix: use relpath for main.py in E2E test utilities
KRRT7 Mar 4, 2026
8cc86ec
fix: port collocated tests pattern matching from main
KRRT7 Mar 4, 2026
3a0a45e
Merge pull request #1762 from codeflash-ai/codeflash/optimize-add_run…
claude[bot] Mar 4, 2026
4b8ef21
Merge pull request #1760 from codeflash-ai/codeflash/optimize-_genera…
claude[bot] Mar 4, 2026
da03816
refactor: remove brittle _fix_java_test_class_name workaround
Mar 4, 2026
b43b37b
fix: update nested class replacement test to match PR #1726 design
KRRT7 Mar 4, 2026
e6b9640
fix: remove stale test_string kwarg from JS instrument_existing_test
KRRT7 Mar 4, 2026
b067030
fix: update python_version handling for backward compatibility with l…
HeshamHM28 Mar 4, 2026
22ad3a2
fix: restore fixup_generated_tests hook for Java test path resolution
KRRT7 Mar 4, 2026
8287f96
Merge pull request #1680 from codeflash-ai/feat/java/wire-language-ve…
HeshamHM28 Mar 4, 2026
ec732ad
fix: port missed main fixes into omni-java branch
KRRT7 Mar 4, 2026
2fb0145
Merge remote-tracking branch 'origin/omni-java' into merge/misc-fixes…
KRRT7 Mar 4, 2026
b542339
fix: restore coverage and run_result guards in parse_test_results
KRRT7 Mar 4, 2026
dbc04df
Update test_support_dispatch.py
KRRT7 Mar 4, 2026
1218a1c
Merge pull request #1759 from codeflash-ai/merge/misc-fixes-into-omni…
KRRT7 Mar 4, 2026
eceac13
Merge remote-tracking branch 'origin/main' into omni-java
KRRT7 Mar 4, 2026
0fb5e36
fix: display source rename in collision path uses original class name
misrasaurabh1 Mar 4, 2026
6ec4db4
Merge remote-tracking branch 'origin/omni-java' into generated-tests-…
misrasaurabh1 Mar 4, 2026
426db65
fix: add missing is_java import and used_behavior_paths init
github-actions[bot] Mar 4, 2026
9367a86
fix: remove dead Java path-fixing code from base FunctionOptimizer
misrasaurabh1 Mar 4, 2026
df57235
test: use full string equality in Java runtime comments tests
misrasaurabh1 Mar 4, 2026
aa5bb72
delete files
misrasaurabh1 Mar 4, 2026
ad6db2a
Merge pull request #1746 from codeflash-ai/generated-tests-in-pr
misrasaurabh1 Mar 4, 2026
5095739
feat: centralize JAR version, cache runtime setup, add pom.xml backup…
mashraf-222 Mar 5, 2026
5763f19
feat: bundle JaCoCo JARs and use standalone agent for coverage
mashraf-222 Mar 5, 2026
12477ef
chore: add Maven Central metadata and release profile to runtime pom.xml
mashraf-222 Mar 5, 2026
349ff39
fix: only restore pom.xml backup on modification failure, not uncondi…
mashraf-222 Mar 5, 2026
236da84
feat: add download-on-first-run for runtime JAR and commented Maven C…
mashraf-222 Mar 6, 2026
b6acd6b
chore: clean up premature download logic, add MVN_CENTRAL_TODO markers
mashraf-222 Mar 6, 2026
24ad61a
feat: shade JaCoCo into codeflash-runtime as one fat JAR
mashraf-222 Mar 7, 2026
193307b
style: remove extra blank line in build_tools.py
github-actions[bot] Mar 7, 2026
dcf9edb
chore: remove redundant pom.xml backup/restore logic
mashraf-222 Mar 7, 2026
9870785
fix: address PR review feedback
mashraf-222 Mar 7, 2026
2a00f27
fix: guard against None message in JUnit XML failure elements
mashraf-222 Mar 7, 2026
8bd170c
fix: apply 300s timeout for standalone JaCoCo coverage path
mashraf-222 Mar 11, 2026
10a0e14
Merge pull request #1775 from codeflash-ai/feat/java-infra-improvements
mashraf-222 Mar 11, 2026
5150b4f
feat: add Maven Central publishing configuration
mashraf-222 Mar 11, 2026
e2f2d94
fix: align ComparatorCorrectnessTest schema with Comparator and fix j…
mashraf-222 Mar 11, 2026
f3e36fe
Merge pull request #1816 from codeflash-ai/feat/maven-central-publish…
mashraf-222 Mar 11, 2026
6e8cf41
feat: resolve codeflash-runtime from Maven Central
mashraf-222 Mar 11, 2026
7f7ce7d
feat: add GitHub Releases fallback for codeflash-runtime JAR
mashraf-222 Mar 11, 2026
66e8060
refactor: remove dev build fallback from runtime resolution chain
mashraf-222 Mar 12, 2026
d75ccd0
Merge pull request #1817 from codeflash-ai/feat/mvn-central-runtime-r…
mashraf-222 Mar 12, 2026
8f8d434
fix: add JAVA member to ProjectLanguage enum
mashraf-222 Mar 12, 2026
21142a5
fix: add Java project detection to detect_project_language
mashraf-222 Mar 12, 2026
cc5b562
fix: write language field to codeflash.toml for Java projects
mashraf-222 Mar 12, 2026
068c1a7
test: add unit tests for detect_project_language
mashraf-222 Mar 12, 2026
d7ab5a9
Merge pull request #1818 from codeflash-ai/fix/java-init-flow
mashraf-222 Mar 12, 2026
fa9d32f
Merge branch 'main' into omni-java
mashraf-222 Mar 13, 2026
9022f9e
fix: set original_pass=False when Java comparator scope is exception
github-actions[bot] Mar 13, 2026
588a3a9
Optimize OptimizeRequest.to_payload
codeflash-ai[bot] Mar 13, 2026
900de50
Optimize TestGenRequest.to_payload
codeflash-ai[bot] Mar 13, 2026
ee6749f
style: auto-fix ruff formatting in schemas.py
github-actions[bot] Mar 13, 2026
10a6ecb
Optimize _prompt_custom_directory
codeflash-ai[bot] Mar 13, 2026
e1081d4
Merge pull request #1825 from codeflash-ai/codeflash/optimize-pr1199-…
claude[bot] Mar 13, 2026
13fcb04
Merge pull request #1826 from codeflash-ai/codeflash/optimize-pr1199-…
claude[bot] Mar 13, 2026
d22d74e
fix: include codeflash.toml in config resolution depth comparison
mashraf-222 Mar 13, 2026
6da33f8
Merge pull request #1829 from codeflash-ai/fix/config-resolution-code…
mashraf-222 Mar 13, 2026
079dee0
fix: resolve mypy errors and None concatenation bug in JavaSupport
github-actions[bot] Mar 13, 2026
6ffff93
Merge pull request #1827 from codeflash-ai/codeflash/optimize-pr1199-…
claude[bot] Mar 13, 2026
188b09f
Merge pull request #1830 from codeflash-ai/fix/java-support-mypy-fixes
claude[bot] Mar 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/rules/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Core protocol in `languages/base.py`. Each language (`PythonSupport`, `JavaScrip
|----------|----------------|---------|
| Identity | `language`, `file_extensions`, `default_file_extension` | Language identification |
| Identity | `comment_prefix`, `dir_excludes` | Language conventions |
| AI service | `default_language_version` | Language version for API payloads (`None` for Python, `"ES2022"` for JS) |
| AI service | `language_version` | Detected language version for API payloads (e.g., `"3.11.0"` for Python, `"17"` for Java) |
| AI service | `valid_test_frameworks` | Allowed test frameworks for validation |
| Discovery | `discover_functions`, `discover_tests` | Find optimizable functions and their tests |
| Discovery | `adjust_test_config_for_discovery` | Pre-discovery config adjustment (no-op default) |
Expand Down
105 changes: 105 additions & 0 deletions .github/workflows/e2e-java-fibonacci-nogit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: E2E - Java Fibonacci (No Git)

on:
pull_request:
paths:
- 'codeflash/languages/java/**'
- 'codeflash/languages/base.py'
- 'codeflash/languages/registry.py'
- 'codeflash/optimization/**'
- 'codeflash/verification/**'
- 'code_to_optimize/java/**'
- 'codeflash-java-runtime/**'
- 'tests/scripts/end_to_end_test_java_fibonacci.py'
- '.github/workflows/e2e-java-fibonacci-nogit.yaml'

workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

jobs:
java-fibonacci-optimization-no-git:
environment: ${{ (github.event_name == 'workflow_dispatch' || (contains(toJSON(github.event.pull_request.files.*.filename), '.github/workflows/') && github.event.pull_request.user.login != 'misrasaurabh1' && github.event.pull_request.user.login != 'KRRT7')) && 'external-trusted-contributors' || '' }}

runs-on: ubuntu-latest
env:
CODEFLASH_AIS_SERVER: prod
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
CODEFLASH_API_KEY: ${{ secrets.CODEFLASH_API_KEY }}
COLUMNS: 110
MAX_RETRIES: 3
RETRY_DELAY: 5
EXPECTED_IMPROVEMENT_PCT: 70
CODEFLASH_END_TO_END: 1
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Validate PR
env:
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
PR_STATE: ${{ github.event.pull_request.state }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
if git diff --name-only "$BASE_SHA" "$HEAD_SHA" | grep -q "^.github/workflows/"; then
echo "⚠️ Workflow changes detected."
echo "PR Author: $PR_AUTHOR"
if [[ "$PR_AUTHOR" == "misrasaurabh1" || "$PR_AUTHOR" == "KRRT7" ]]; then
echo "✅ Authorized user ($PR_AUTHOR). Proceeding."
elif [[ "$PR_STATE" == "open" ]]; then
echo "✅ PR is open. Proceeding."
else
echo "⛔ Unauthorized user ($PR_AUTHOR) attempting to modify workflows. Exiting."
exit 1
fi
else
echo "✅ No workflow file changes detected. Proceeding."
fi

- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
cache: maven

- name: Set up Python 3.11 for CLI
uses: astral-sh/setup-uv@v6
with:
python-version: 3.11.6

- name: Install dependencies (CLI)
run: uv sync

- name: Build codeflash-runtime JAR
run: |
cd codeflash-java-runtime
mvn clean package -q -DskipTests
mvn install -q -DskipTests

- name: Verify Java installation
run: |
java -version
mvn --version

- name: Remove .git
run: |
if [ -d ".git" ]; then
sudo rm -rf .git
echo ".git directory removed."
else
echo ".git directory does not exist."
exit 1
fi

- name: Run Codeflash to optimize Fibonacci
run: |
uv run python tests/scripts/end_to_end_test_java_fibonacci.py
76 changes: 76 additions & 0 deletions .github/workflows/java-e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Java E2E Tests

on:
push:
branches:
- main
- omni-java
paths:
- 'codeflash/languages/java/**'
- 'tests/test_languages/test_java*.py'
- 'code_to_optimize/java/**'
- '.github/workflows/java-e2e-tests.yml'
pull_request:
paths:
- 'codeflash/languages/java/**'
- 'tests/test_languages/test_java*.py'
- 'code_to_optimize/java/**'
- '.github/workflows/java-e2e-tests.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

jobs:
java-e2e:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
cache: maven

- name: Install uv
uses: astral-sh/setup-uv@v6

- name: Set up Python environment
run: |
uv venv --seed
uv sync

- name: Verify Java installation
run: |
java -version
mvn --version

- name: Build codeflash-runtime JAR
run: |
cd codeflash-java-runtime
mvn clean package -q -DskipTests
mvn install -q -DskipTests

- name: Build Java sample project
run: |
cd code_to_optimize/java
mvn compile -q

- name: Run Java sample project tests
run: |
cd code_to_optimize/java
mvn test -q

- name: Run Java E2E tests
run: |
uv run pytest tests/test_languages/test_java_e2e.py -v --tb=short

- name: Run Java unit tests
run: |
uv run pytest tests/test_languages/test_java/ -v --tb=short -x
13 changes: 13 additions & 0 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,19 @@ jobs:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
cache: maven

- name: Build codeflash-runtime JAR
run: |
cd codeflash-java-runtime
mvn clean package -q -DskipTests
mvn install -q -DskipTests

- name: Install uv
uses: astral-sh/setup-uv@v6
with:
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,12 @@ cython_debug/
.aider*
/js/common/node_modules/
*.xml
# Allow pom.xml in test fixtures for Maven project detection
!tests/test_languages/fixtures/**/pom.xml
# Allow pom.xml in Java sample project
!code_to_optimize/java/pom.xml
# Allow pom.xml in codeflash-java-runtime
!codeflash-java-runtime/pom.xml
*.pem

# Ruff cache
Expand Down
6 changes: 6 additions & 0 deletions code_to_optimize/java/codeflash.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Codeflash configuration for Java project

[tool.codeflash]
module-root = "src/main/java"
tests-root = "src/test/java"
formatter-cmds = []
100 changes: 100 additions & 0 deletions code_to_optimize/java/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.example</groupId>
<artifactId>codeflash-java-sample</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>

<name>Codeflash Java Sample Project</name>
<description>Sample Java project for testing Codeflash optimization</description>

<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junit.jupiter.version>5.10.0</junit.jupiter.version>
</properties>

<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<!-- SQLite JDBC for Codeflash instrumentation -->
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.42.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.codeflash</groupId>
<artifactId>codeflash-runtime</artifactId>
<version>1.0.0</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<includes>
<include>**/*Test.java</include>
</includes>
</configuration>
</plugin>

<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.11</version>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>verify</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<!-- For multi-module projects, include dependency classes -->
<includes>
<include>**/*.class</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading
Loading