Skip to content

Commit f577794

Browse files
committed
Merge remote-tracking branch 'origin/main' into cf-java-void-optimization
2 parents 8058197 + 9e69239 commit f577794

101 files changed

Lines changed: 5134 additions & 822 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/rules/architecture.md

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ codeflash/
2121
├── api/ # AI service communication
2222
├── code_utils/ # Code parsing, git utilities
2323
├── models/ # Pydantic models and types
24-
├── languages/ # Multi-language support (Python, JavaScript/TypeScript, Java planned)
24+
├── languages/ # Multi-language support (Python, JavaScript/TypeScript, Java)
2525
│ ├── base.py # LanguageSupport protocol and shared data types
2626
│ ├── registry.py # Language registration and lookup by extension/enum
2727
│ ├── current.py # Current language singleton (set_current_language / current_language_support)
@@ -35,11 +35,29 @@ codeflash/
3535
│ │ ├── test_runner.py # Test subprocess execution for Python
3636
│ │ ├── instrument_codeflash_capture.py # Instrument __init__ with capture decorators
3737
│ │ └── parse_line_profile_test_output.py # Parse line profiler output
38-
│ └── javascript/
39-
│ ├── support.py # JavaScriptSupport (LanguageSupport implementation)
40-
│ ├── function_optimizer.py # JavaScriptFunctionOptimizer subclass
41-
│ ├── optimizer.py # JS project root finding & module preparation
42-
│ └── normalizer.py # JS/TS code normalization for deduplication
38+
│ ├── javascript/
39+
│ │ ├── support.py # JavaScriptSupport (LanguageSupport implementation)
40+
│ │ ├── function_optimizer.py # JavaScriptFunctionOptimizer subclass
41+
│ │ ├── optimizer.py # JS project root finding & module preparation
42+
│ │ └── normalizer.py # JS/TS code normalization for deduplication
43+
│ └── java/
44+
│ ├── support.py # JavaSupport (LanguageSupport implementation)
45+
│ ├── function_optimizer.py # JavaFunctionOptimizer subclass
46+
│ ├── build_tool_strategy.py # Abstract BuildToolStrategy for Maven/Gradle
47+
│ ├── maven_strategy.py # Maven build tool strategy
48+
│ ├── gradle_strategy.py # Gradle build tool strategy
49+
│ ├── build_tools.py # Build tool detection and project info
50+
│ ├── build_config_strategy.py # Config read/write for pom.xml / gradle.properties
51+
│ ├── test_runner.py # Test execution via Maven/Gradle
52+
│ ├── instrumentation.py # Behavior capture and benchmarking instrumentation
53+
│ ├── discovery.py # Function discovery using tree-sitter
54+
│ ├── test_discovery.py # Test discovery for JUnit/TestNG
55+
│ ├── context.py # Code context extraction
56+
│ ├── comparator.py # Test result comparison
57+
│ ├── config.py # Java project detection and config
58+
│ ├── formatter.py # Code formatting and normalization
59+
│ ├── line_profiler.py # JVM bytecode agent-based line profiling
60+
│ └── tracer.py # Two-stage JFR + argument capture tracer
4361
├── setup/ # Config schema, auto-detection, first-run experience
4462
├── picklepatch/ # Serialization/deserialization utilities
4563
├── tracing/ # Function call tracing
@@ -57,7 +75,7 @@ codeflash/
5775
|------|------------|
5876
| CLI arguments & commands | `cli_cmds/cli.py` (parsing), `main.py` (subcommand dispatch) |
5977
| Optimization orchestration | `optimization/optimizer.py``run()` |
60-
| Per-function optimization | `languages/function_optimizer.py` (base), `languages/python/function_optimizer.py`, `languages/javascript/function_optimizer.py` |
78+
| Per-function optimization | `languages/function_optimizer.py` (base), `languages/python/function_optimizer.py`, `languages/javascript/function_optimizer.py`, `languages/java/function_optimizer.py` |
6179
| Function discovery | `discovery/functions_to_optimize.py` |
6280
| Context extraction | `languages/<lang>/context/code_context_extractor.py` |
6381
| Test execution | `languages/<lang>/support.py` (`run_behavioral_tests`, etc.), `verification/pytest_plugin.py` |
@@ -67,7 +85,7 @@ codeflash/
6785

6886
## LanguageSupport Protocol Methods
6987

70-
Core protocol in `languages/base.py`. Each language (`PythonSupport`, `JavaScriptSupport`) implements these.
88+
Core protocol in `languages/base.py`. Each language (`PythonSupport`, `JavaScriptSupport`, `JavaSupport`) implements these.
7189

7290
| Category | Method/Property | Purpose |
7391
|----------|----------------|---------|

.github/dependabot.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
version: 2
2+
updates:
3+
# Python (root pyproject.toml)
4+
- package-ecosystem: "pip"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
9+
# JavaScript (codeflash npm package)
10+
- package-ecosystem: "npm"
11+
directory: "/packages/codeflash"
12+
schedule:
13+
interval: "weekly"
14+
15+
# GitHub Actions
16+
- package-ecosystem: "github-actions"
17+
directory: "/"
18+
schedule:
19+
interval: "weekly"
20+
21+
# code_to_optimize/ directories are test fixtures — do NOT update them.
22+
# Dependabot PRs for these always fail (missing secrets) and waste CI.

.github/workflows/claude.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868

6969
- name: Run Claude Code
7070
id: claude
71-
uses: anthropics/claude-code-action@v1
71+
uses: anthropics/claude-code-action@v1.0.89
7272
with:
7373
use_bedrock: "true"
7474
use_sticky_comment: true
@@ -328,7 +328,7 @@ jobs:
328328

329329
- name: Run Claude Code
330330
id: claude
331-
uses: anthropics/claude-code-action@v1
331+
uses: anthropics/claude-code-action@v1.0.89
332332
with:
333333
use_bedrock: "true"
334334
claude_args: '--model us.anthropic.claude-sonnet-4-6 --allowedTools "Read,Edit,Write,Glob,Grep,Bash(git status*),Bash(git diff*),Bash(git add *),Bash(git commit *),Bash(git push*),Bash(git log*),Bash(git merge*),Bash(git fetch*),Bash(git checkout*),Bash(git branch*),Bash(uv run prek *),Bash(prek *),Bash(uv run ruff *),Bash(uv run pytest *),Bash(uv run mypy *),Bash(uv run coverage *),Bash(gh pr comment*),Bash(gh pr view*),Bash(gh pr diff*),Bash(gh pr merge*),Bash(gh pr close*)"'

.github/workflows/e2e-async.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ name: E2E - Async
33
on:
44
pull_request:
55
paths:
6-
- '**' # Trigger for all paths
6+
- 'codeflash/**'
7+
- 'tests/**'
8+
- 'pyproject.toml'
9+
- 'uv.lock'
10+
- '.github/workflows/e2e-*.yaml'
711

812
workflow_dispatch:
913

.github/workflows/e2e-bubblesort-benchmark.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ name: E2E - Bubble Sort Benchmark
33
on:
44
pull_request:
55
paths:
6-
- '**' # Trigger for all paths
6+
- 'codeflash/**'
7+
- 'tests/**'
8+
- 'pyproject.toml'
9+
- 'uv.lock'
10+
- '.github/workflows/e2e-*.yaml'
711

812
workflow_dispatch:
913

.github/workflows/e2e-bubblesort-pytest-nogit.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ name: E2E - Bubble Sort Pytest (No Git)
33
on:
44
pull_request:
55
paths:
6-
- '**' # Trigger for all paths
6+
- 'codeflash/**'
7+
- 'tests/**'
8+
- 'pyproject.toml'
9+
- 'uv.lock'
10+
- '.github/workflows/e2e-*.yaml'
711

812
workflow_dispatch:
913

.github/workflows/e2e-bubblesort-unittest.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ name: E2E - Bubble Sort Unittest
33
on:
44
pull_request:
55
paths:
6-
- '**' # Trigger for all paths
6+
- 'codeflash/**'
7+
- 'tests/**'
8+
- 'pyproject.toml'
9+
- 'uv.lock'
10+
- '.github/workflows/e2e-*.yaml'
711

812
workflow_dispatch:
913

.github/workflows/e2e-coverage-optimization.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ name: Coverage E2E
33
on:
44
pull_request:
55
paths:
6-
- '**' # Trigger for all paths
6+
- 'codeflash/**'
7+
- 'tests/**'
8+
- 'pyproject.toml'
9+
- 'uv.lock'
10+
- '.github/workflows/e2e-*.yaml'
711

812
workflow_dispatch:
913

.github/workflows/e2e-futurehouse-structure.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ name: E2E - Futurehouse Structure
33
on:
44
pull_request:
55
paths:
6-
- '**' # Trigger for all paths
6+
- 'codeflash/**'
7+
- 'tests/**'
8+
- 'pyproject.toml'
9+
- 'uv.lock'
10+
- '.github/workflows/e2e-*.yaml'
711

812
workflow_dispatch:
913

.github/workflows/e2e-init-optimization.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ name: E2E - Init Optimization
33
on:
44
pull_request:
55
paths:
6-
- '**' # Trigger for all paths
6+
- 'codeflash/**'
7+
- 'tests/**'
8+
- 'pyproject.toml'
9+
- 'uv.lock'
10+
- '.github/workflows/e2e-*.yaml'
711
workflow_dispatch:
812

913
concurrency:

0 commit comments

Comments
 (0)