feat: add Java and JS/TS subprojects for mixed-language testing#305
Open
mashraf-222 wants to merge 6 commits intomainfrom
Open
feat: add Java and JS/TS subprojects for mixed-language testing#305mashraf-222 wants to merge 6 commits intomainfrom
mashraf-222 wants to merge 6 commits intomainfrom
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Maven project with JUnit 4, Java 11 target - CollectionUtils with generics (mergeSorted) and inner class (FrequencyCounter) - StringProcessor with string manipulation methods - 7 unit tests all passing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- package.json with no codeflash config (configs created dynamically by tests) - asyncUtils.js with async functions (fetchAndTransform, debounce, memoize) - dataTransform.ts with TypeScript generics (pipeline, groupBy, chunk) - Basic test files for both JS and TS Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
uv.lock was intentionally removed from the test fixture repo. Main modified it; we keep it deleted. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The lockfile was removed by mistake in a prior commit. Restored from main. 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
Extends the optimize-me repository from a Python-only project into a mixed-language test fixture with Java and JavaScript/TypeScript subprojects. Each subproject has real-world code patterns, tests, and codeflash configuration.
This PR is part of a 3-repo change set:
codeflash --subagentcallThis fixture validates that the CLI correctly discovers configs, runs per-language passes, and handles real code patterns across all supported languages.
What Changed
Java Subproject (
java/)codeflash.tomlCollectionUtils.java— Generic methods with inner class (Pair<A,B>),mergeSorted(),removeDuplicates(),groupBy()StringProcessor.java— String manipulation:isPalindrome(),compress(),findLongestCommonPrefix()JavaScript/TypeScript Subproject (
js/)package.json(codeflash config) andtsconfig.jsonasyncUtils.js— Async functions:retryWithBackoff(),batchProcess()dataTransform.ts— TypeScript with generics:pivot(),flatten(),groupByKey()Python Subproject (extended)
src/algorithms/text_analysis.pyandsrc/algorithms/helpers.pywith cross-module dependenciestests/test_text_analysis.pyE2E Validation
All subprojects compile, tests pass, and Codeflash optimization runs successfully against them:
mvn testpasses, Codeflash finds optimization forisPalindromenpm testpasses, Codeflash processesretryWithBackoffRelated PRs
codeflash — Multi-language orchestration loop
The codeflash CLI PR adds
find_all_config_files()which walks the project tree and discovers config files per language. This optimize-me fixture is specifically structured to exercise that discovery:java/codeflash.tomltriggers a Java pass,js/package.jsontriggers a JS/TS pass, and the rootpyproject.tomltriggers a Python pass. The code patterns in each subproject (generics, async/await, cross-module imports) were chosen to exercise real optimization scenarios, not just compile-and-pass trivial functions.codeflash-cc-plugin — Unified multi-language hook
The cc-plugin hook is how Codeflash gets triggered from Claude Code. This fixture validates the full end-to-end path: the hook detects a config in the optimize-me project → fires
codeflash --subagent→ the CLI discovers all three language configs → runs optimization passes against the Java, JS/TS, and Python code in this repo. Without a real mixed-language project like this one, the hook and CLI changes could only be validated with mocked configs.Generated with Claude Code