Commit graph

1545 commits

Author SHA1 Message Date
claude[bot]
d8c2b94359 style: remove redundant local import re and fix test conventions
- Remove redundant `import re` inside _is_vitest_workspace() since re is already imported at module level
- Convert tests to use pytest tmp_path fixture instead of tempfile.TemporaryDirectory()
- Add missing return type annotations and encoding= parameters
- Remove unused pytest import and docstrings

Co-authored-by: mohammed ahmed <undefined@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 07:56:07 +00:00
mohammed ahmed
08b9fe8d7f
Merge branch 'main' into fix/vitest-coverage-override 2026-04-04 09:51:41 +02:00
Sarthak Agarwal
973ebc2cf1
Merge pull request #1979 from codeflash-ai/fix/colocated-test-path-resolution
fix: handle co-located test directories with traverse_up
2026-04-04 12:04:00 +05:30
Sarthak Agarwal
0f2c50c239
Merge pull request #1982 from codeflash-ai/fix/vitest-mock-path-resolution
Fix vi.mock() path resolution in generated vitest tests
2026-04-04 12:03:45 +05:30
Sarthak Agarwal
c63defa2b2
Merge pull request #1984 from codeflash-ai/fix/js-project-root-per-function
Fix: Recalculate js_project_root per function in monorepos
2026-04-04 12:03:29 +05:30
mohammed ahmed
bf15f44f44 Fix Vitest coverage collection by overriding coverage.reporter
## Problem
When Codeflash runs Vitest tests, coverage files are not collected even
though tests run successfully. This affects 14 out of ~20 optimization
runs, resulting in 0% coverage reported.

Root cause: The generated `codeflash.vitest.config.mjs` only overrides
`include`, `pool`, and `setupFiles`, but does NOT override coverage
settings. When the project's vitest.config.ts has custom coverage
settings (e.g., `reporter: ["text", "lcov"]`), Vitest's `mergeConfig()`
doesn't properly handle the nested coverage object merge with command-line
flags like `--coverage.reporter=json`, resulting in coverage files not
being written to the expected location.

## Solution
Explicitly override `coverage.reporter` to `['json']` in the generated
codeflash.vitest.config.mjs file. This ensures consistent behavior
regardless of Vitest version or project configuration.

## Testing
Added comprehensive unit tests in test_vitest_coverage_config.py that:
1. Verify coverage overrides are present in generated config
2. Test with and without existing project coverage settings
3. Confirm generated config includes expected coverage.reporter

All tests pass ✓

## References
- Trace IDs affected: 11f707d6, 69b271f5, and 12 others
- Related to iteration 2 investigation in fix_history.log

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-03 21:39:45 +00:00
claude[bot]
9d22f43216 style: fix linting issues in vitest setupFiles PR
- Move `import re` to module-level (was inside function body)
- Add encoding="utf-8" to read_text() call
- Fix tests: use tmp_path fixture, add -> None return types, add encoding args

Co-authored-by: mohammed ahmed <undefined@users.noreply.github.com>
2026-04-03 20:11:05 +00:00
mohammed ahmed
0116a1f9e6 Fix Vitest setupFiles path resolution and workspace detection
**Problem:**

1. Vitest tests were failing with 'Cannot find module .../test/setup.ts'
   when testing functions in nested directories (e.g., extensions/discord/).

2. Root cause had two parts:
   - _is_vitest_workspace() was doing substring search for 'workspace',
     matching it even in comments, causing false positives
   - Custom vitest config wasn't overriding setupFiles, leaving relative
     paths from original config that resolved incorrectly

**Solution:**

1. Improved workspace detection (vitest_runner.py:172-191):
   - Use regex to match actual workspace config patterns
   - Match defineWorkspace( function calls
   - Match workspace: [ property assignments
   - Ignore 'workspace' in comments

2. Override setupFiles in custom config (vitest_runner.py:235-242):
   - Set setupFiles: [] to disable project setup files
   - Prevents relative path resolution issues
   - Safe since Codeflash tests are self-contained

**Testing:**

Added test_vitest_setupfiles_fix.py with 2 test cases:
- Verifies setupFiles is overridden in generated config
- Verifies configs without setupFiles still work

**Trace ID:** 161e21be-9306-4a4d-a9dc-978f65a1af7a

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-03 20:06:27 +00:00
claude[bot]
e7596b5bef style: fix naming, imports, and test conventions in js_project_root fix
- Rename `_get_js_project_root` → `get_js_project_root` (no leading underscores per convention)
- Remove redundant `from pathlib import Path` import inside method (already imported at top)
- Remove unnecessary docstring from new method
- Rewrite tests to use `tmp_path` fixture instead of `tempfile.TemporaryDirectory()`
- Add `.resolve()` calls and `encoding="utf-8"` per project conventions
- Simplify second test file to focus on the actual caching behavior

Co-authored-by: mohammed ahmed <undefined@users.noreply.github.com>
2026-04-03 14:36:12 +00:00
mohammed ahmed
46c49910cd Fix: Recalculate js_project_root per function in monorepos
**Issue:**
When optimizing multiple functions in a monorepo with nested package.json
files (e.g., extensions/discord/package.json), the js_project_root was set
once for the first function and reused for all subsequent functions. This
caused vitest to look for setupFiles in the wrong directory.

**Root Cause:**
test_cfg.js_project_root was set during initial setup and never recalculated.
When function #1 was in extensions/discord/, all subsequent functions in
src/ inherited this wrong project root.

**Fix:**
- Added _get_js_project_root() method to FunctionOptimizer
- Calculate js_project_root fresh for each function using find_node_project_root()
- Updated all test execution paths (behavior, performance, line_profile)

**Impact:**
- Vitest now runs from the correct working directory for each function
- setupFiles can be resolved correctly
- Functions in different monorepo packages can be optimized correctly

Fixes trace IDs: 12d26b00-cbae-49a8-a3cd-c36024ee06ec, 1cde1c65-ef42-4072-afbc-165b0c235688, and 18 others

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-03 14:30:24 +00:00
mohammed ahmed
cdb361b5a3 Fix vi.mock() path resolution in generated vitest tests
Extended fix_jest_mock_paths() to handle vitest mock calls (vi.mock()) in
addition to jest.mock(). Previously, only jest.mock() paths were corrected,
causing vitest tests to fail with "Cannot find module" errors.

Problem:
- Source at src/agents/workspace.ts imports ../routing/session-key
- Generated test at test/test_workspace.test.ts used vi.mock('../routing/session-key')
- This resolves to /routing/session-key (wrong - goes up from test/, not found)
- Should be vi.mock('../src/routing/session-key') (correct path from test/)

Solution:
- Updated regex pattern to match both jest.mock() and vi.mock()
- Function now fixes relative paths for both test frameworks
- Added unit tests to verify both jest and vitest paths are corrected

Trace ID: 265059d4-f518-44da-8367-d90ca424092c

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-03 13:44:27 +00:00
ali
eef9ff9edc
Merge branch 'main' of github.com:codeflash-ai/codeflash into fix/colocated-test-path-resolution 2026-04-03 15:34:29 +02:00
Sarthak Agarwal
a756701bb2
Merge pull request #1974 from codeflash-ai/fix/false-positive-test-discovery
Fix false positive test discovery from substring matching
2026-04-03 18:26:19 +05:30
Kevin Turcios
accb245486
Merge pull request #1941 from codeflash-ai/cf-compare-copy-benchmarks
feat: enhance codeflash compare with memory profiling, script mode, and auto-calibration
2026-04-03 07:13:00 -05:00
ali
d8e758800f
Merge branch 'main' of github.com:codeflash-ai/codeflash into fix/false-positive-test-discovery 2026-04-03 13:32:34 +02:00
Codeflash Bot
c57c39ae09 fix: handle co-located test directories with traverse_up
This fixes a ValueError that occurs when generated tests are placed in
co-located __tests__ directories outside the configured tests_root.

Root cause:
The CLI's _find_codeflash_test_dir() method generates tests in co-located
__tests__ directories (e.g., src/gateway/server/__tests__/) when they exist,
but verifier.py tried to compute a module path relative to the configured
tests_root (e.g., /workspace/target/test), causing:

ValueError: '/workspace/target/src/gateway/server/__tests__/codeflash-generated/test_xxx.test.ts'
is not in the subpath of '/workspace/target/test'

Fix:
- Added traverse_up=True to module_name_from_file_path() call in verifier.py
- This allows the function to find a common ancestor directory and compute
  the relative path from there, handling tests outside tests_root

Testing:
- Added comprehensive unit tests in test_module_name_from_file_path.py
- All existing tests pass 
- Linting passes 

Impact:
- Resolves crashes when optimizing functions with co-located test directories
- Enables proper handling of monorepo and __tests__ directory structures

Trace IDs affected: 7b97ddba-6ecd-42fd-b572-d40658746836

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-03 07:23:10 +00:00
ali
8e443e8f83
Merge branch 'main' of github.com:codeflash-ai/codeflash into fix/false-positive-test-discovery 2026-04-03 04:17:44 +02:00
ali
7777b24cc7
Merge branch 'main' of github.com:codeflash-ai/codeflash into fix/vitest-coverage-excluded-files 2026-04-03 03:05:36 +02:00
ali
834adc5a43
fix: update nested functions parity test to match new JS discovery behavior
PR #1968 changed JS to skip nested functions like Python, but the parity
test still expected JS to discover both outer and inner.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-02 21:02:23 +02:00
Codeflash Bot
63c475af0e Fix AttributeError: use file_path not source_file_path
Bug #5 fix: The coverage exclusion error messages used
self.function_to_optimize.source_file_path but FunctionToOptimize
only has file_path attribute, not source_file_path. This caused
AttributeError when files were excluded from coverage.

Trace ID: 5c4a75fb-d8eb-4f75-9e57-893f0c44b9c7

Changes:
- Fixed lines 2797, 2803: source_file_path -> file_path
- Added regression test to verify correct attribute used

Testing:
- New test passes
- Linting passes

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-02 18:51:38 +00:00
Codeflash Bot
29e42ae9cc Fix false positive test discovery from substring matching
Issue: Test discovery incorrectly matched test files with source functions
when the function name appeared anywhere in the test file, including in
mocks, comments, or unrelated code. This caused 'Failed to instrument test
file' errors.

Root cause: In javascript/support.py line 259, naive substring matching
(func.function_name in source) matched function names even when they were
only mentioned in mocks like:
  vi.mock('./file.js', () => ({ funcName: ... }))

Example: Function parseRestartRequestParams from restart-request.ts was
wrongly matched with update.test.ts because the test file mocked it.

Fix: Removed substring matching, now only matches explicitly imported
functions. This is more reliable and avoids false positives.

Trace ID: 0b575a96-62a8-4910-b163-1ad10e60ba79

Changes:
- Removed naive substring check in discover_tests()
- Only match functions that are explicitly imported
- Added regression tests (2 test cases)

Testing:
- All 70 JavaScript tests pass
- New tests verify fix works correctly
- Linting/type checks pass (uv run prek)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-02 18:46:48 +00:00
Codeflash Bot
e329d52c34 fix: Improve error messaging for files excluded from Vitest coverage
## Problem
When a file is excluded from coverage by vitest.config.ts (e.g., via
`coverage.exclude: ["src/agents/**"]`), Codeflash reports misleading
"Test coverage is 0.0%" messages even though tests run successfully.

This happens because:
- Vitest doesn't include excluded files in coverage-final.json
- Codeflash detects this (status = NOT_FOUND) but shows generic 0% message
- Users don't know the file is excluded from coverage collection

## Solution
Detect when coverage status is NOT_FOUND and provide a clear, actionable
error message explaining:
1. No coverage data was found for the file
2. It may be excluded by test framework configuration
3. Where to check (coverage.exclude in vitest.config.ts, etc.)

## Changes
- function_optimizer.py: Check CoverageStatus.NOT_FOUND before reporting 0%
- Added clear warning log and user-facing error message
- New test file: test_vitest_coverage_exclusions.py

## Testing
- All existing JavaScript tests pass
- New tests verify NOT_FOUND status is returned correctly
- Manual verification with openclaw logs (trace: 2a84fe6b-9871-4916-96da-bdd79bca508a)

Fixes #BUG-1 (from autoresearch:debug workflow)
Trace IDs affected: All 10 log files showing 0% coverage in /workspace/logs

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-02 17:44:46 +00:00
Kevin Turcios
6965e9871d feat: add --script mode to codeflash compare
Allows running arbitrary benchmark scripts on both git refs and
rendering a styled comparison table. Supports optional --memory
via memray wrapping. No codeflash config required for script mode.
2026-04-02 11:36:54 -05:00
Kevin Turcios
ca198ce5ab fix: update test expectations for multi-round benchmark plugin
- test_trace_multithreaded_benchmark: SELECT DISTINCT collapses all 10
  threaded sorter calls to 1 row (identical metadata), change 10 → 1
- test_trace_benchmark_decorator: accept zero timing when func_time >
  total_time triggers the overflow guard in validate_and_format
2026-04-02 11:18:33 -05:00
Kevin Turcios
699b70a02a feat: support memory-only benchmarks without changed function detection
When --memory is used and no changed top-level functions are detected,
skip trace benchmarking but still run memray profiling. This fixes the
class method limitation where codeflash compare couldn't profile memory
for changes in class methods (which are excluded from @codeflash_trace
instrumentation due to pickle overhead).
2026-04-02 11:06:15 -05:00
ali
bd7185f121
Merge branch 'main' of github.com:codeflash-ai/codeflash into fix/skip-nested-functions-js 2026-04-02 17:47:48 +02:00
Kevin Turcios
74c29b20b1 fix: update tests for multi-round benchmark plugin
The benchmark plugin now runs multiple rounds with calibrated
iterations. Tests need SELECT DISTINCT for row counts and must
extract median_ns from BenchmarkStats before validation.
2026-04-02 07:24:55 -05:00
Codeflash Bot
8f1b9f2e99 Fix: Skip nested functions in JavaScript/TypeScript discovery
Bug: Nested functions were being discovered and attempted to be optimized,
but the extraction logic only captured the nested function body without
parent scope variables, causing validation errors like:
  'Undefined variable(s): base, streamFn, record, writer'

Root cause: The discover_functions method was allowing nested functions
(functions defined inside other functions) to be marked for optimization.
These nested functions depend on closure variables from their parent scope
and cannot be optimized in isolation.

Fix: Added explicit check to skip functions with parent_function set.
Nested functions are now filtered out during discovery phase.

Impact: Resolves 140+ trace failures with undefined variable errors.
Functions like 'wrapStreamFn.wrapped' will no longer be attempted.

Test: Added test_discover_functions.py with 4 test cases:
- test_discovers_top_level_function
- test_skips_nested_functions_in_closures (main bug fix test)
- test_discovers_class_methods (ensure methods still work)
- test_skips_nested_functions_with_multiple_levels

Affects trace IDs including: 02a59310-bb18-47e4-87cb-1e5144ce2d8c
and 140+ others with nested function extraction issues.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-02 11:57:41 +00:00
Sarthak Agarwal
857673d2c0
Merge pull request #1957 from codeflash-ai/fix/esm-relative-import-extensions
fix: Add .js extensions to relative imports in ESM TypeScript projects
2026-04-02 14:09:35 +05:30
claude[bot]
52cf946ec0 fix: add missing return type annotations to test functions
Co-authored-by: mohammed ahmed <undefined@users.noreply.github.com>
2026-04-02 07:57:18 +00:00
Codeflash Bot
e3c667a0ca Fix: Prevent duplicate vitest/jest import declarations
## Problem
The inject_test_globals() function was adding duplicate framework imports,
causing parse errors like "Identifier 'describe' has already been declared".

This occurred when:
1. AI service generated tests WITH vitest imports
2. CLI called inject_test_globals() which added its own import
3. String-based duplicate check failed because identifiers had different order

Result: TWO import statements declaring the same identifiers → parse error.

## Solution
Replace string-based duplicate detection with regex-based detection that
catches ANY import from the framework, regardless of identifier order.

## Changes
- Added regex patterns for Vitest, Jest, and Mocha imports
- Modified inject_test_globals() to use regex search
- Added comprehensive tests in test_inject_test_globals_duplicate.py

## Impact
Fixes HIGH severity bug blocking test generation for all Vitest projects

## Trace IDs
- 03a5a9d9-8e56-47e8-9c5e-0160fb9a529a
- 0be70f8d-884e-45e4-8fa2-28ed40cdf068
- 29c6d314-8561-4bb4-9b77-00b3b83943f0
2026-04-02 07:51:54 +00:00
Mohamed Ashraf
325bb80a4f fix: update codeflash-runtime version in test fixture pom.xml files
The tracer e2e fixture and code_to_optimize/java pom.xml files had
hardcoded 1.0.0 dependency versions, causing compilation failures
in CI when only 1.0.1 is installed to ~/.m2.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-01 23:13:37 +00:00
HeshamHM28
823300f26e
Merge branch 'main' into java-config-redesign 2026-04-01 22:10:37 +02:00
Codeflash Bot
f0fe3dd572 fix: Add .js extensions to relative imports in ESM TypeScript projects
## Problem
Generated tests for ESM TypeScript projects were importing from relative
paths without .js extensions (e.g., `import X from './module'`), causing
ERR_MODULE_NOT_FOUND errors when tests run.

Node.js ESM requires explicit .js extensions for relative imports, even
when the source files are .ts. This is a TypeScript/ESM specification
requirement.

## Solution
Added `add_js_extensions_to_relative_imports()` function that:
- Adds .js extensions to relative imports (./x or ../x) without extensions
- Preserves imports that already have extensions (.js, .ts, etc.)
- Leaves non-relative imports (node modules) unchanged
- Only runs for ESM projects (CommonJS doesn't need extensions)

Integrated into test processing pipeline after module system conversion.

## Testing
- Added 7 unit tests covering various import patterns
- All 35 module_system tests pass
- All 315 JavaScript language tests pass
- Verified fix resolves ERR_MODULE_NOT_FOUND for trace 17751b8f-fa61-48bc-bdee-b924f0c7afc4

## References
Trace IDs with this issue: 17751b8f-fa61-48bc-bdee-b924f0c7afc4,
3b985200-a906-4c54-a685-df40361d6b2c, 91795877-3ccf-482c-86bd-748834b76f6e,
0298c59c-8980-4aed-b05d-b94940a6544f, ec2864a4-0de0-4ce9-9ec8-b545c82a4f53

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-01 18:07:45 +00:00
Sarthak Agarwal
3c38a80b53
Merge pull request #1931 from codeflash-ai/fix/js-setup-early-exit
Fix: early exit on JS setup failures
2026-04-01 20:51:18 +05:30
Sarthak Agarwal
5baccd4139
Merge pull request #1942 from codeflash-ai/fix/esm-module-path-extension
Fix ERR_MODULE_NOT_FOUND for TypeScript/ESM imports
2026-04-01 20:50:59 +05:30
Codeflash Bot
03df3da805 Fix ERR_MODULE_NOT_FOUND for TypeScript/ESM imports
## Problem
Codeflash was generating import statements without file extensions for
TypeScript and ESM projects, causing ERR_MODULE_NOT_FOUND errors when
Node.js tried to resolve the modules.

Example error from trace 08d0e99e-10e6-4ad2-981d-b907e3c068ea:
```
Error [ERR_MODULE_NOT_FOUND]: Cannot find module
'/workspace/target/packages/microservices/server/server-factory'
imported from .../test_create__unit_test_0.test.ts
```

The generated test had:
```typescript
import ServerFactory from '../../server/server-factory'
```

But Node.js ESM requires explicit file extensions.

## Root Cause
The get_module_path method in JavaScriptSupport was unconditionally
removing file extensions with .with_suffix(""), regardless of whether
the project used ESM or CommonJS module system.

## Solution
Modified get_module_path to:
1. Detect the module system using detect_module_system()
2. For ESM or TypeScript files: add .js extension (TypeScript convention)
3. For CommonJS: keep no extension (backward compatible)

TypeScript convention is to use .js extension in imports even when the
source file is .ts, as imports reference the compiled output.

## Testing
- Added two new test cases in TestGetModulePath class
- All 73 existing JavaScript support tests pass
- All 28 module system tests pass
- Lint and type checks pass

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-01 14:12:56 +00:00
HeshamHM28
20f76a30dd fix(test): move --no-pr before optimize subcommand in e2e tracer test
--no-pr is a top-level codeflash flag, not an optimize subcommand flag.
Placing it after optimize caused it to be passed to the JVM as an
unrecognized option.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 06:56:27 +00:00
Ubuntu
c9c5f9d035 Merge branch 'main' into java-config-redesign
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 06:49:21 +00:00
HeshamHM28
aeeca5c241 fix(java): find mvnw in parent dirs and respect --no-pr in tracer path
- Walk up parent directories when looking for mvnw wrapper, fixing
  multi-module projects where mvnw is in the root but optimizer runs
  from a submodule
- Respect user's --no-pr flag in Java tracer path instead of hardcoding
  no_pr=True, allowing PR creation from tracer-based optimizations
- Add --no-pr to e2e tracer test script

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 06:46:44 +00:00
Codeflash Bot
83bd04e0a9 Fix: Exclude property getters/setters from function discovery
**Problem:**
When functions are defined as property getters/setters (e.g., inside
Object.defineProperty with `get: function getrouter() {...}`), they were
being discovered as optimizable functions. This caused test generation
to fail because:

1. Tests tried to call the getter function directly (e.g., `obj.getrouter()`)
2. But getters are not accessible by function name - only via property access
3. This resulted in "TypeError: Cannot read properties of undefined (reading 'bind')"

**Root Cause:**
The tree-sitter function discovery in `treesitter.py` was finding all
function_expression nodes, including those used as property getters/setters.
These are not standalone functions and cannot be called directly.

**Solution:**
Added a check in `_walk_tree_for_functions` to exclude function_expression
nodes that are:
- Inside a `pair` node (key-value pair in object literal)
- Where the key is "get" or "set" (property accessor pattern)

**Affected Trace IDs (from logs):**
- 11b5475c-91d9-43b1-a317-33b7f4811c52 (init.getrouter)
- 78d8f1de-541a-4208-85c7-77194c70ec72 (createETagGenerator.generateETag)
- And others with similar patterns

**Testing:**
- Added comprehensive test suite in test_property_getter_exclusion.py
- Verified fix on actual Express.js application.js (getrouter no longer discovered)
- All existing JavaScript function discovery tests pass
- Linting (prek) passes

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-01 01:58:33 +00:00
HeshamHM28
944a6a972f
Merge pull request #1913 from codeflash-ai/cf-fix-multiline-instrumentation
fix: handle multi-line function calls in behavior instrumentation
2026-03-31 09:06:29 +02:00
ali
5b84811ff1
small fixes 2026-03-31 08:24:31 +02:00
ali
e1860a5637
feat: early exit on JS setup failures and introduce SetupError type
setup_test_config now returns bool so the optimizer aborts when JS
requirements (Node, npm, test framework) are missing instead of
silently continuing. Adds SetupError dataclass, fixes warning log to
print messages, and updates tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 08:04:00 +02:00
aseembits93
ec302cc596 fix: replace remaining uv tool install refs with uv pip install
Follow-up to #1909 — the npm package now installs into a dedicated venv
instead of using uv tool, but these references were missed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-30 15:26:07 -07:00
HeshamHM28
5add169ba9
Merge branch 'main' into java-config-redesign 2026-03-27 14:10:00 +02:00
mashraf-222
928cbfbcb8
Merge pull request #1906 from codeflash-ai/cf-java-zero-config-strategy
[Feat] Java Auto Config
2026-03-27 12:16:10 +02:00
Kevin Turcios
66f1dab2ba Remove python_version from API payloads
Use language_version exclusively — the backend now resolves
python_version from language_version for backward compatibility.
2026-03-27 02:53:22 -05:00
HeshamHM28
94d9ff9d8b test: use full string equality for multi-line instrumentation tests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 05:30:04 +00:00
HeshamHM28
e1478caaba fix: handle multi-line function calls in behavior instrumentation
wrap_target_calls_with_treesitter() operated line-by-line but tree-sitter
byte offsets span multiple lines. Multi-line calls like:
  func(arg1,
       arg2);
only had the first line replaced, leaving orphaned continuation lines
that caused compilation errors (80% of Spring AI functions skipped).

Rewrote to operate on the full body text with pre-computed character
offsets, processing calls back-to-front — same approach as
_add_timing_instrumentation which never had this bug.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 05:24:18 +00:00