Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
320 commits
Select commit Hold shift + click to select a range
f9c59b6
Optimize _add_behavior_instrumentation
codeflash-ai[bot] Feb 3, 2026
9b13db1
Merge branch 'main' into omni-java
misrasaurabh1 Feb 3, 2026
e86f21e
Merge pull request #1294 from codeflash-ai/codeflash/optimize-pr1199-…
misrasaurabh1 Feb 3, 2026
31c90f0
feat: implement Java assertion removal transformer
misrasaurabh1 Feb 3, 2026
5c61000
Merge pull request #1282 from codeflash-ai/fix/java-test-path-duplica…
HeshamHM28 Feb 3, 2026
3eb1179
Merge branch 'omni-java' into feat/java-remove-asserts-transformer
misrasaurabh1 Feb 3, 2026
9e4172e
fix: use correct variable name in JS/TS instrumentation log
misrasaurabh1 Feb 3, 2026
15585c2
fix: handle new ClassName().method() style calls in assertion removal
misrasaurabh1 Feb 3, 2026
2fd26ba
Merge pull request #1295 from codeflash-ai/feat/java-remove-asserts-t…
misrasaurabh1 Feb 3, 2026
7b72a7e
fix: prevent optimized code from one file being applied to another file
misrasaurabh1 Feb 3, 2026
5b65b27
fix: increase Java test timeout from 15s to 120s
mashraf-222 Feb 3, 2026
d69b8c5
fix: add Java patterns to instrumented test file cleanup
mashraf-222 Feb 3, 2026
1b911c0
fix: handle numbered suffixes in Java instrumented test files
mashraf-222 Feb 3, 2026
a582fa6
fix: set tests_project_rootdir to tests_root for Java projects
mashraf-222 Feb 4, 2026
65318e2
Merge pull request #1338 from codeflash-ai/fix/java-instrumented-test…
mashraf-222 Feb 4, 2026
1ee6ca8
debug: add logging to investigate empty test filter issue
mashraf-222 Feb 4, 2026
4ced2fb
feat: Add verbose logging for Java optimization debugging
HeshamHM28 Feb 4, 2026
2c48e9c
feat: Add verbose logging for existing instrumented tests
HeshamHM28 Feb 4, 2026
a23d0ca
fix: set tests_project_rootdir to tests_root for Java
mashraf-222 Feb 4, 2026
3e8dfb8
fix: prevent Maven running all tests + fix TestFile type annotation
mashraf-222 Feb 4, 2026
aa718c8
chore: remove documentation markdown files from PR
mashraf-222 Feb 4, 2026
7a7bf32
refactor: use DEBUG_MODE from console.py for verbose logging
HeshamHM28 Feb 4, 2026
2ad731d
style: fix linting and formatting issues in function_optimizer.py
github-actions[bot] Feb 4, 2026
9e81b2b
style: apply linting and formatting fixes
github-actions[bot] Feb 4, 2026
dbb26df
Merge pull request #1337 from codeflash-ai/fix/java-test-timeout-issue
misrasaurabh1 Feb 4, 2026
99b8b8e
Merge branch 'omni-java' into feature/java-verbose-logging
misrasaurabh1 Feb 4, 2026
610e63c
Merge pull request #1348 from codeflash-ai/feature/java-verbose-logging
misrasaurabh1 Feb 4, 2026
95cc603
Merge branch 'main' into omni-java
KRRT7 Feb 4, 2026
0c07949
WIP in kryo
HeshamHM28 Feb 5, 2026
4c93285
fix: show actual test file paths in failure log instead of original_f…
mashraf-222 Feb 5, 2026
e0b805d
fix: detect and log Java compilation failures explicitly
mashraf-222 Feb 5, 2026
7322078
Merge pull request #1345 from codeflash-ai/debug/java-test-filter
mashraf-222 Feb 5, 2026
e88730e
Merge pull request #1341 from codeflash-ai/fix/java-tests-project-roo…
mashraf-222 Feb 5, 2026
f681e22
refactor
HeshamHM28 Feb 5, 2026
fdb2668
fix: route Java/JavaScript/TypeScript to Optimizer instead of Python …
mashraf-222 Feb 5, 2026
a9f3e80
Merge pull request #1398 from codeflash-ai/fix/java-tracer-routing
mashraf-222 Feb 5, 2026
e1d811c
test(05-02): add concurrency-aware assertion removal tests
mashraf-222 Feb 5, 2026
2e2335c
test(05-01): extend comparator tests with edge case and error handlin…
mashraf-222 Feb 5, 2026
ef6a680
test(05-01): create decision logic tests for SQLite vs pass-fail-only…
mashraf-222 Feb 5, 2026
0ff54b5
better unit test discovery java
misrasaurabh1 Feb 6, 2026
81523f3
Merge remote-tracking branch 'origin/omni-java' into omni-java
misrasaurabh1 Feb 6, 2026
e958e4e
optimize for performance
misrasaurabh1 Feb 6, 2026
8d42ed9
test(05-02): add concurrency-aware assertion removal tests
mashraf-222 Feb 5, 2026
39c1806
test(05-01): extend comparator tests with edge case and error handlin…
mashraf-222 Feb 5, 2026
c284732
test(05-01): create decision logic tests for SQLite vs pass-fail-only…
mashraf-222 Feb 5, 2026
e95ad19
fix: add warning logging for pass_fail_only masking and overload dete…
mashraf-222 Feb 6, 2026
861bf5c
fix: wire Java formatter into detection pipeline
mashraf-222 Feb 6, 2026
f434491
feat(06-02): enhance Maven infrastructure with XML parsing, profiles,…
mashraf-222 Feb 6, 2026
1232147
test: add tests for pass_fail_only warning logging and overload disam…
mashraf-222 Feb 6, 2026
79429eb
feat(06-02): enhance build tool detection with project_root and custo…
mashraf-222 Feb 6, 2026
90876f5
fix: resolve merge conflicts in test_discovery.py - keep Phase 6 over…
mashraf-222 Feb 6, 2026
5a85fef
chore: restore timeout documentation comments
mashraf-222 Feb 6, 2026
093786e
chore: restore timeout documentation comments
mashraf-222 Feb 6, 2026
8f2b7ed
Optimize _get_test_module_target_dir
codeflash-ai[bot] Feb 6, 2026
0e566c9
Fix insturmentation Bugs
HeshamHM28 Feb 6, 2026
1943f75
Merge branch 'omni-java' into feat/kryo-serialization
HeshamHM28 Feb 6, 2026
45043f7
fix: remove duplicate _get_method_call_pattern function definition
github-actions[bot] Feb 6, 2026
2670fd2
fix: auto-format with prek
Feb 6, 2026
2725be0
Merge pull request #1390 from codeflash-ai/feat/kryo-serialization
HeshamHM28 Feb 6, 2026
098cb78
Merge pull request #1403 from codeflash-ai/codeflash/optimize-pr1401-…
misrasaurabh1 Feb 6, 2026
decb27b
fix: correct return value order in Java test_runner for coverage
aseembits93 Feb 6, 2026
9558bb6
Merge pull request #1417 from codeflash-ai/fix/java-coverage-return-o…
aseembits93 Feb 6, 2026
542a003
fix: remove pass_fail_only mode to enforce strict correctness
mashraf-222 Feb 9, 2026
1049e31
chore: merge origin/omni-java into fix/behavioral-equivalence-improve…
mashraf-222 Feb 9, 2026
c7c987f
fix: restore _extract_modules_from_pom_content and _extract_source_di…
mashraf-222 Feb 9, 2026
98a5a43
fix: use Kryo serialization and deep comparison for Java test results
HeshamHM28 Feb 10, 2026
9be6910
fix: resolve merge conflicts with omni-java base
mashraf-222 Feb 10, 2026
05f5e6e
Merge pull request #1279 from codeflash-ai/fix/java-test-discovery-wr…
mashraf-222 Feb 10, 2026
2d64b35
Merge pull request #1283 from codeflash-ai/feat/java-async-concurrent…
mashraf-222 Feb 10, 2026
bbd987b
fix: correct Java string syntax in line profiler code generation
mashraf-222 Feb 10, 2026
3d3abcf
chore: merge omni-java base into feat/java-line-profiling
mashraf-222 Feb 10, 2026
5a2f147
Merge pull request #1281 from codeflash-ai/feat/java-line-profiling
mashraf-222 Feb 10, 2026
c6703d6
chore: merge omni-java base into fix/wire-java-formatter
mashraf-222 Feb 10, 2026
410cbcd
chore: merge omni-java base into fix/detect-java-compilation-failures
mashraf-222 Feb 10, 2026
58d4b94
chore: merge omni-java base into fix/behavioral-equivalence-improvements
mashraf-222 Feb 10, 2026
f3f9e55
Optimize _extract_modules_from_pom_content
codeflash-ai[bot] Feb 10, 2026
a732a69
Merge pull request #1400 from codeflash-ai/fix/wire-java-formatter
mashraf-222 Feb 10, 2026
fd6be1e
Merge pull request #1394 from codeflash-ai/fix/detect-java-compilatio…
mashraf-222 Feb 10, 2026
b2f2583
chore: merge omni-java base into fix/behavioral-equivalence-improvements
mashraf-222 Feb 10, 2026
a9de8bb
Merge pull request #1434 from codeflash-ai/codeflash/optimize-pr1401-…
mashraf-222 Feb 10, 2026
56c2b4a
Merge pull request #1401 from codeflash-ai/fix/behavioral-equivalence…
mashraf-222 Feb 10, 2026
b749958
fix pom.xml
HeshamHM28 Feb 10, 2026
af7de3b
fix: correct Java test file path generation for Maven structure
mashraf-222 Feb 10, 2026
82f2371
Merge pull request #1435 from codeflash-ai/fix/pom.xml
HeshamHM28 Feb 10, 2026
df5b6a2
Merge pull request #1436 from codeflash-ai/fix/java-test-path-generation
mashraf-222 Feb 10, 2026
e207b83
fix: handle assertThrows variable assignment in Java instrumentation
mashraf-222 Feb 10, 2026
7d243b5
Optimize JavaAssertTransformer._detect_variable_assignment
codeflash-ai[bot] Feb 10, 2026
ea4747d
Optimize JavaAssertTransformer._generate_exception_replacement
codeflash-ai[bot] Feb 10, 2026
0d10dbb
Fix line profiler
HeshamHM28 Feb 10, 2026
4740725
fix asserts
HeshamHM28 Feb 10, 2026
f215bd3
Merge pull request #1450 from codeflash-ai/fix/java-assertion-transfo…
HeshamHM28 Feb 11, 2026
6ba6a28
Merge pull request #1449 from codeflash-ai/fix/java-line-profiler-attrs
HeshamHM28 Feb 11, 2026
b9d1306
Merge pull request #1445 from codeflash-ai/codeflash/optimize-pr1443-…
mashraf-222 Feb 11, 2026
5c302bf
Merge pull request #1444 from codeflash-ai/codeflash/optimize-pr1443-…
mashraf-222 Feb 11, 2026
abf2c98
chore: merge omni-java into fix/java-exception-assignment-instrumenta…
mashraf-222 Feb 11, 2026
b836321
Merge pull request #1443 from codeflash-ai/fix/java-exception-assignm…
mashraf-222 Feb 11, 2026
fc26b4b
fix: update failing unit tests to match current behavior
mashraf-222 Feb 11, 2026
7f66a17
fix: update large number comparison test for float precision limits
mashraf-222 Feb 11, 2026
afe79a0
Merge pull request #1455 from codeflash-ai/fix/update-formatter-test-…
mashraf-222 Feb 12, 2026
f70045a
fix(java): fix JS import injection and JPMS split-package errors
HeshamHM28 Feb 12, 2026
309ab16
fix(java): fix missing import and incorrect parent path in JPMS remap…
HeshamHM28 Feb 12, 2026
504eb43
fix(java): fix instrumentation syntax errors from @TestOnly and neste…
HeshamHM28 Feb 12, 2026
566ce1b
fix: Java line profiler timeout and test categorization issues
mashraf-222 Feb 12, 2026
b775930
fix(java): fix class rename scope and variable scoping in instrumenta…
HeshamHM28 Feb 12, 2026
8102971
fix(java): detect parameterized lambdas in instrumentation
HeshamHM28 Feb 12, 2026
292edae
Merge pull request #1470 from codeflash-ai/fix/java-line-profiler-tim…
mashraf-222 Feb 12, 2026
0c847bb
fix(java): apply JAVA_TESTCASE_TIMEOUT for all Java test frameworks
HeshamHM28 Feb 12, 2026
c8ef670
fix(java): fix line profiler class detection for modified class decla…
HeshamHM28 Feb 12, 2026
8b5abf9
fix(java): fix line profiler class detection and timeout for Java tests
HeshamHM28 Feb 12, 2026
8a0ce4a
fix(java): fix benchmarking fallback timeout using same or-vs-max pat…
HeshamHM28 Feb 12, 2026
5751d3b
merge: resolve conflict with omni-java, keep upstream line profiler t…
HeshamHM28 Feb 12, 2026
7cf7bcd
Merge pull request #1472 from codeflash-ai/fix/java-jpms-and-js-impor…
HeshamHM28 Feb 12, 2026
ae4eb7c
do instrument generated regression tests
misrasaurabh1 Feb 13, 2026
f85935b
fix: add debug logging and fix Java behavior test instrumentation bugs
mashraf-222 Feb 13, 2026
3fdf944
fix: improve Java sources root detection for non-standard Maven struc…
mashraf-222 Feb 13, 2026
4bb7e59
Function discovery and other fixes
Saga4 Feb 13, 2026
2042271
Merge pull request #1480 from codeflash-ai/fix/java-behavior-test-bas…
mashraf-222 Feb 13, 2026
17c8cf8
fix comparator crash for behavorial tests
Saga4 Feb 13, 2026
4c97641
Replace Regex with tree-sitter
HeshamHM28 Feb 16, 2026
ca4f01f
Add Java end to end tests
HeshamHM28 Feb 16, 2026
2df9f02
Refactor FunctionInfo parameters in Java tests for clarity
HeshamHM28 Feb 16, 2026
4303ffc
Fix Bytes test
HeshamHM28 Feb 16, 2026
cbc48a1
add bytes Kryo-serialized for unit test
HeshamHM28 Feb 16, 2026
99f77da
Fix falling tests
HeshamHM28 Feb 16, 2026
83f335e
fix asserts
HeshamHM28 Feb 17, 2026
fb6de47
fix nested targeted function got removed
HeshamHM28 Feb 17, 2026
09374c1
fix: use tree-sitter name-based lookup for Java function extraction
mashraf-222 Feb 17, 2026
22541e0
Replace the substring with the entire codebase.
HeshamHM28 Feb 17, 2026
60a28c0
prek
HeshamHM28 Feb 17, 2026
6d36536
Merge pull request #1501 from codeflash-ai/fix/java/asserts
HeshamHM28 Feb 17, 2026
7a2a48b
Merge pull request #1511 from codeflash-ai/fix/java-stale-line-number…
mashraf-222 Feb 17, 2026
6ee61fd
fix tests
HeshamHM28 Feb 18, 2026
ce442e3
Merge branch 'omni-java' into fix/java/e2e/test
HeshamHM28 Feb 18, 2026
a8dafe1
Fix CLI Type
HeshamHM28 Feb 18, 2026
e33a8f9
Fix testing path
HeshamHM28 Feb 18, 2026
dc1083b
add java jdk
HeshamHM28 Feb 18, 2026
3359c9a
add JDK for windows
HeshamHM28 Feb 18, 2026
dbecfec
fix: prevent ANSI escape codes from causing Rich console hangs during…
mashraf-222 Feb 18, 2026
c75ac75
fix: skip correctness verification for non-Python candidates when all…
mashraf-222 Feb 18, 2026
4ee5fc8
fix: include imported type skeletons in Java testgen context to preve…
mashraf-222 Feb 18, 2026
e534c6c
Attempt at fixing performance instrumentation
misrasaurabh1 Feb 18, 2026
68d8bf7
refine some behavioral instrumentation
misrasaurabh1 Feb 18, 2026
c4da93c
fix windows tests
HeshamHM28 Feb 18, 2026
7229169
Optimize _format_skeleton_for_context
codeflash-ai[bot] Feb 18, 2026
de3f71c
line profile do process
misrasaurabh1 Feb 18, 2026
b20e1bf
Line profile parsing for java
misrasaurabh1 Feb 18, 2026
f3ecd22
Merge pull request #1496 from codeflash-ai/fix/java/e2e/test
HeshamHM28 Feb 18, 2026
8df8076
fix the line profiler implementation
misrasaurabh1 Feb 18, 2026
c9813c0
Merge branch 'omni-java' into instrumentation-fixes
misrasaurabh1 Feb 18, 2026
a98d4ce
test fix
misrasaurabh1 Feb 18, 2026
ff08c15
Merge pull request #1517 from codeflash-ai/instrumentation-fixes
misrasaurabh1 Feb 18, 2026
f52a0b7
multiple function calls in the same test case
misrasaurabh1 Feb 18, 2026
22d6559
Merge pull request #1515 from codeflash-ai/codeflash/optimize-pr1514-…
mashraf-222 Feb 18, 2026
d236d5d
test: add tests for imported type skeleton extraction
mashraf-222 Feb 18, 2026
1e31453
fix some data integrity issues
misrasaurabh1 Feb 18, 2026
ed767da
test: add Bug 4 early exit tests and strengthen Bug 3 edge case coverage
mashraf-222 Feb 18, 2026
0b8284f
Merge pull request #1514 from codeflash-ai/fix/java-e2e-critical-bugs
mashraf-222 Feb 18, 2026
f2d1dce
test fix
misrasaurabh1 Feb 18, 2026
be7f6fc
Merge pull request #1521 from codeflash-ai/java-fixes-instrumentation
misrasaurabh1 Feb 18, 2026
0e753e1
fix: improve Java type context sent to AI for test generation
mashraf-222 Feb 18, 2026
543617a
fix: prevent existing test instrumentation from overwriting generated…
mashraf-222 Feb 18, 2026
4224453
fix: add safety-net cleanup of leftover instrumented test files
mashraf-222 Feb 18, 2026
c54affe
fix: correct byte-offset/char-offset mismatch and variable scoping in…
mashraf-222 Feb 18, 2026
39c000c
Merge pull request #1530 from codeflash-ai/fix/java-testgen-context-e…
mashraf-222 Feb 18, 2026
72afada
fix: correct field ordering, helper placement, indentation, and blank…
misrasaurabh1 Feb 20, 2026
a851ec6
Merge pull request #1555 from codeflash-ai/fix/java-code-replacer-inj…
misrasaurabh1 Feb 20, 2026
7d7a2a2
Merge commit '3dd19c62' into sync-main-batch-1
KRRT7 Feb 20, 2026
30fa101
chore: fix ruff check and format issues
KRRT7 Feb 20, 2026
f4254fe
Merge pull request #1556 from codeflash-ai/sync-main-batch-1
KRRT7 Feb 20, 2026
c66953d
Merge commit 'd578d996' into sync-main-batch-2
KRRT7 Feb 20, 2026
8632da0
chore: fix ruff format issue in code_context_extractor
KRRT7 Feb 20, 2026
85d1d4f
Merge commit '6020c4fa' into sync-main-batch-3
KRRT7 Feb 20, 2026
c39313b
Merge pull request #1557 from codeflash-ai/sync-main-batch-2
KRRT7 Feb 20, 2026
7c7eeb5
fix: update test import for moved code_context_extractor module
KRRT7 Feb 20, 2026
ea48939
style: auto-fix linting and formatting issues
github-actions[bot] Feb 20, 2026
4a45ac5
Merge pull request #1558 from codeflash-ai/sync-main-batch-3
KRRT7 Feb 20, 2026
c747827
Merge commit '6346c740' into sync-main-batch-4
KRRT7 Feb 20, 2026
5060179
fix: remove leftover codeflash_capture instrumentation from test fixture
KRRT7 Feb 20, 2026
d578353
style: auto-fix formatting issues
github-actions[bot] Feb 20, 2026
f740531
Merge remote-tracking branch 'origin/omni-java' into sync-main-batch-4
KRRT7 Feb 20, 2026
da75fdb
Merge pull request #1560 from codeflash-ai/sync-main-batch-4
KRRT7 Feb 20, 2026
df67ec3
better coverage numbers
misrasaurabh1 Feb 20, 2026
4730f34
style: auto-fix formatting and mypy type annotations
github-actions[bot] Feb 20, 2026
f321f83
fix: add `from __future__ import annotations` for Python 3.9 compat
github-actions[bot] Feb 20, 2026
bdf8f84
Merge pull request #1564 from codeflash-ai/dependent-coverage-numbers
misrasaurabh1 Feb 20, 2026
abded3b
Optimize _find_java_executable
codeflash-ai[bot] Feb 20, 2026
d1ac5c2
Merge pull request #1576 from codeflash-ai/codeflash/optimize-pr1199-…
misrasaurabh1 Feb 20, 2026
8c1a3a4
style: auto-fix linting issues
github-actions[bot] Feb 20, 2026
2353fb2
test: add comprehensive Java run-and-parse integration tests
misrasaurabh1 Feb 20, 2026
0c70c44
Update codeflash/verification/test_runner.py
misrasaurabh1 Feb 20, 2026
c9cb60a
test: relax Java timing tolerances to account for JIT warmup
misrasaurabh1 Feb 20, 2026
6e854a3
Optimize _find_java_executable
codeflash-ai[bot] Feb 20, 2026
4c45ea5
Optimize _extract_type_names_from_code
codeflash-ai[bot] Feb 20, 2026
08ac779
style: remove duplicate parser property added by optimization
github-actions[bot] Feb 20, 2026
5d585d9
Optimize _should_include_method
codeflash-ai[bot] Feb 20, 2026
94a773a
style: auto-fix linting issues
github-actions[bot] Feb 20, 2026
a55068c
Optimize _infer_array_cast_type
codeflash-ai[bot] Feb 20, 2026
732a557
style: auto-fix linting issues
github-actions[bot] Feb 20, 2026
049d2ee
Optimize JavaLineProfiler._find_executable_lines
codeflash-ai[bot] Feb 20, 2026
a9a27f6
style: auto-fix linting issues
github-actions[bot] Feb 20, 2026
eb7c1f0
more lenient testing
misrasaurabh1 Feb 20, 2026
adcc9b8
Merge pull request #1577 from codeflash-ai/java-run-and-parse-tests
misrasaurabh1 Feb 20, 2026
e3211bb
Optimize JavaAssertTransformer._build_target_call
codeflash-ai[bot] Feb 20, 2026
7f570be
style: auto-fix linting issues
github-actions[bot] Feb 20, 2026
8d74b26
fix: resolve mypy type errors
github-actions[bot] Feb 20, 2026
a979c45
Merge pull request #1597 from codeflash-ai/codeflash/optimize-pr1199-…
misrasaurabh1 Feb 20, 2026
ba0c937
Optimize wrap_target_calls_with_treesitter
codeflash-ai[bot] Feb 20, 2026
9200978
style: auto-fix linting issues
github-actions[bot] Feb 20, 2026
a7c9fbd
Optimize JavaAssertTransformer._find_balanced_parens
codeflash-ai[bot] Feb 20, 2026
f7c07e0
Merge pull request #1602 from codeflash-ai/codeflash/optimize-pr1199-…
claude[bot] Feb 20, 2026
31a39e0
Merge pull request #1601 from codeflash-ai/codeflash/optimize-pr1199-…
claude[bot] Feb 20, 2026
ff8f463
Merge pull request #1591 from codeflash-ai/codeflash/optimize-pr1199-…
claude[bot] Feb 20, 2026
14961b0
Merge pull request #1590 from codeflash-ai/codeflash/optimize-pr1199-…
claude[bot] Feb 20, 2026
020ae70
Merge pull request #1587 from codeflash-ai/codeflash/optimize-pr1199-…
claude[bot] Feb 20, 2026
5759921
Merge pull request #1583 from codeflash-ai/codeflash/optimize-pr1199-…
claude[bot] Feb 20, 2026
4ac49ee
Merge pull request #1579 from codeflash-ai/codeflash/optimize-pr1199-…
claude[bot] Feb 20, 2026
a7f88a6
Optimize _extract_type_names_from_code
codeflash-ai[bot] Feb 20, 2026
097c1a1
fix: remove duplicate parser property that breaks Java language support
github-actions[bot] Feb 20, 2026
7710769
Merge pull request #1609 from codeflash-ai/codeflash/optimize-pr1199-…
claude[bot] Feb 20, 2026
cdc2a4b
fix: JUnit version detection for multi-module Maven projects
mashraf-222 Feb 19, 2026
06382ea
fix: Add path caching for test file resolution in benchmarks
mashraf-222 Feb 19, 2026
c7b4534
fix: Handle complex expressions in Java test instrumentation
mashraf-222 Feb 19, 2026
90afeda
fix: Direct JVM execution for multi-module Maven projects
mashraf-222 Feb 19, 2026
54e0b38
fix: set perf_stdout for Java performance tests to fix throughput cal…
mashraf-222 Feb 19, 2026
0001fb5
fix: store actual test method name in SQLite for Java behavior tests
mashraf-222 Feb 20, 2026
6220ace
chore: auto-format lint fixes from pre-commit
mashraf-222 Feb 20, 2026
6113bac
fix: add JUnit Console Standalone to classpath for direct JVM execution
mashraf-222 Feb 20, 2026
a3f5943
fix: cache TestConfig.test_framework to avoid repeated pom.xml parsing
mashraf-222 Feb 20, 2026
bb6f38f
fix: detect JUnit version from classpath strings instead of subproces…
mashraf-222 Feb 20, 2026
d860857
fix: JUnit version detection for multi-module Maven projects
mashraf-222 Feb 19, 2026
b6564e6
style: auto-fix linting issues
github-actions[bot] Feb 20, 2026
cfcbd92
fix: correct JUnit version logging for projects using ConsoleLauncher…
mashraf-222 Feb 20, 2026
d54aa68
Apply suggestion from @claude[bot]
misrasaurabh1 Feb 20, 2026
53528a2
style: auto-fix linting issues
github-actions[bot] Feb 20, 2026
b8ec235
fix: resolve mypy type errors in Java config and instrumentation
github-actions[bot] Feb 20, 2026
58561c8
coverage reported correctly
misrasaurabh1 Feb 20, 2026
8a1ab8e
fix pr creation bug
misrasaurabh1 Feb 20, 2026
96d94cd
Optimize _add_behavior_instrumentation
codeflash-ai[bot] Feb 20, 2026
864f87f
style: merge multiple comparisons per PLR1714
github-actions[bot] Feb 20, 2026
648a613
Optimize _add_timing_instrumentation
codeflash-ai[bot] Feb 20, 2026
a523c9a
style: auto-fix linting issues
github-actions[bot] Feb 20, 2026
75762bd
Optimize _is_inside_lambda
codeflash-ai[bot] Feb 20, 2026
2c0e1d9
Optimize _byte_to_line_index
codeflash-ai[bot] Feb 20, 2026
4294601
style: auto-fix linting issues
github-actions[bot] Feb 20, 2026
06dfb96
fix: implement Java process_review methods to prevent crash after opt…
mashraf-222 Feb 20, 2026
f06acba
fix: add test method name to Java stdout markers for unique identific…
mashraf-222 Feb 20, 2026
d4add61
fix: clear test file path cache between optimization iterations in --…
mashraf-222 Feb 20, 2026
38d6309
chore: log debug message when JUnitCore ignores reports_dir parameter
mashraf-222 Feb 20, 2026
5346cab
style: auto-fix linting issues
github-actions[bot] Feb 20, 2026
e2c3e98
Merge pull request #1580 from codeflash-ai/fix/java-direct-jvm-and-bugs
mashraf-222 Feb 20, 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
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 and install 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