Commit graph

3 commits

Author SHA1 Message Date
Kevin Turcios
eceac13fc3 Merge remote-tracking branch 'origin/main' into omni-java
# Conflicts:
#	.claude/rules/architecture.md
#	.claude/rules/code-style.md
#	.github/workflows/claude.yml
#	.github/workflows/duplicate-code-detector.yml
#	codeflash/api/aiservice.py
#	codeflash/cli_cmds/console.py
#	codeflash/cli_cmds/logging_config.py
#	codeflash/code_utils/deduplicate_code.py
#	codeflash/discovery/discover_unit_tests.py
#	codeflash/languages/base.py
#	codeflash/languages/code_replacer.py
#	codeflash/languages/javascript/mocha_runner.py
#	codeflash/languages/javascript/support.py
#	codeflash/languages/python/support.py
#	codeflash/optimization/function_optimizer.py
#	codeflash/verification/parse_test_output.py
#	codeflash/verification/verification_utils.py
#	codeflash/verification/verifier.py
#	packages/codeflash/package-lock.json
#	packages/codeflash/package.json
#	tests/languages/javascript/test_support_dispatch.py
#	tests/test_codeflash_capture.py
#	tests/test_languages/test_javascript_test_runner.py
#	tests/test_multi_file_code_replacement.py
2026-03-04 01:52:32 -05:00
Mohamed Ashraf
1b911c0dbf fix: handle numbered suffixes in Java instrumented test files
Some instrumented test files have numeric suffixes like _2, _3:
- FibonacciSeriesTest__perfinstrumented_2.java
- KnapsackTest__perfonlyinstrumented_3.java

Updated regex to match optional numeric suffix: (?:_\d+)?
Updated test to verify files with suffixes are detected.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-03 23:44:17 +00:00
Mohamed Ashraf
d69b8c5aa0 fix: add Java patterns to instrumented test file cleanup
Java instrumented test files (*Test__perfinstrumented.java and
*Test__perfonlyinstrumented.java) were not being cleaned up after
optimization, causing subsequent optimizations to fail.

The find_leftover_instrumented_test_files() method had regex patterns
for Python and JavaScript but was missing Java patterns.

Changes:
- Add Java patterns to cleanup regex in optimizer.py
- Add comprehensive test coverage for Java, Python, JS, and mixed scenarios
- All 4 new tests pass

Testing: Verified regex matches Java instrumented files correctly and
cleanup prevents stale files from blocking optimizations.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-03 23:42:44 +00:00