Commit graph

6259 commits

Author SHA1 Message Date
Kevin Turcios
f5257f71f8 fix: add self-trigger paths to required workflow filters
Without these, workflow-only PRs never trigger the required checks,
leaving them stuck at "Waiting for status to be reported".
2026-02-18 23:45:39 -05:00
Kevin Turcios
b802013e02 fix: remove JS exclusion from unit test workflows
test_multi_file_code_replacer.py depends on code_to_optimize/js/
fixtures, so unit tests need to trigger on JS fixture changes.
2026-02-18 23:28:30 -05:00
Kevin Turcios
0e2d4f49a6 ci: add path-based filtering to skip irrelevant workflows on PRs
JS E2E workflows only trigger on JS-related file changes, Python E2E
and unit test workflows skip when only JS/npm files change. Push to
main and workflow_dispatch remain unfiltered.
2026-02-18 23:22:25 -05:00
Kevin Turcios
f816502585
Merge pull request #1540 from codeflash-ai/fix-testgen-context-imports
fix: include module-level variables and second-degree helpers in testgen helper FQNs
2026-02-19 02:18:37 +00:00
Kevin Turcios
ee3737a036 chore: exclude test and fixture dirs from ty type checking 2026-02-18 21:18:24 -05:00
Kevin Turcios
6a5c9c1b40 test: update expected context values for statement-type helpers 2026-02-18 21:07:03 -05:00
Kevin Turcios
6360b63822 chore: remove tiles directory 2026-02-18 20:57:47 -05:00
claude[bot]
5f7dadf825 style: auto-fix ruff formatting in function_optimizer.py 2026-02-19 01:56:48 +00:00
Kevin Turcios
9e8c29d0e9 fix: include module-level variables and second-degree helpers in testgen helper FQNs
Generated tests were importing symbols like _EXTENSION_REGISTRY from the
wrong module because helper_function_names only contained first-degree
function/class helpers. The AI had no metadata about where module-level
variables lived, causing incorrect import paths and 0% test coverage.
2026-02-18 20:54:10 -05:00
Kevin Turcios
47f5887154
Merge pull request #1539 from codeflash-ai/faster-file-discovery
feat: replace rglob with os.walk and per-language directory pruning
2026-02-19 01:39:16 +00:00
Kevin Turcios
d91ee0a0f3 chore: update tessl agent config files
Replace skills gitignores with MCP server config for codex and gemini.
2026-02-18 20:23:23 -05:00
Kevin Turcios
14f4324d46 chore: update tessl tiles and upgrade dependencies
Remove codeflash-specific tessl tiles, add new pypi tiles from
pyproject.toml, and run uv sync --upgrade to bump dependencies.
2026-02-18 20:23:23 -05:00
claude[bot]
aa5db4cbc3 style: remove duplicate if statement causing syntax error 2026-02-19 00:54:39 +00:00
Kevin Turcios
4473430fd9
Update codeflash/discovery/functions_to_optimize.py
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
2026-02-18 19:52:17 -05:00
claude[bot]
d950bb1c64 style: auto-fix formatting and resolve mypy no-redef error
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 00:41:12 +00:00
Kevin Turcios
35091cdb49 feat: replace rglob with os.walk and per-language directory pruning
File discovery used Path.rglob per extension, traversing excluded dirs
(e.g. .venv, node_modules) before filtering. Switch to a single os.walk
pass with in-place dirs[:] pruning. Each language now declares its own
dir_excludes patterns (exact, prefix*, *suffix) on the LanguageSupport
protocol, parsed by parse_dir_excludes() at walk time.
2026-02-18 19:36:57 -05:00
Kevin Turcios
efd215da3f
Merge pull request #1537 from codeflash-ai/cf-crosshair-optional-3.15
feat: make crosshair-tool optional for Python 3.15+
2026-02-18 23:47:58 +00:00
Kevin Turcios
5aa115a523 feat: make crosshair-tool optional for Python 3.15+
crosshair-tool doesn't support Python 3.15 yet. The dependency is now
conditional on python_version < 3.15, with a runtime guard that skips
concolic test generation when the package is absent.
2026-02-18 17:56:59 -05:00
Kevin Turcios
20c956c0e9 feat: add codeflash-benchmark automated release to publish workflow
Extend the publish workflow to handle both codeflash and codeflash-benchmark
releases from a single workflow file, triggered by their respective version
files. Also syncs benchmark __init__.py version to match pyproject.toml.
2026-02-18 17:39:36 -05:00
Kevin Turcios
6020c4fab7
Merge pull request #1533 from codeflash-ai/cf-release-0.20.1
chore: release v0.20.1
2026-02-18 21:15:54 +00:00
Kevin Turcios
c76acaeba6 chore: bump version to 0.20.1 2026-02-18 15:24:49 -05:00
Kevin Turcios
2bcd91c0cf
Merge pull request #1522 from codeflash-ai/cf-fix-worktree-module-root-path
Fix worktree mode filtering out all diff-discovered functions
2026-02-18 12:23:27 +00:00
Kevin Turcios
305210b1f7 fix: resolve git root from module_root for worktree PR creation
git_root_dir() searches from CWD (original repo), but in worktree mode
file paths have been remapped to the worktree. This caused relative_to()
to raise ValueError when creating PRs. Search from module_root instead
so root_dir is always in the same path space as the file paths.
2026-02-18 06:38:03 -05:00
claude[bot]
6a19b9d4b8 fix: add type assertions for mypy narrowing in worktree path remapping 2026-02-18 11:02:09 +00:00
claude[bot]
d43d9aeb4b style: auto-fix ruff formatting for long line 2026-02-18 11:00:58 +00:00
Kevin Turcios
0749621bee fix: use original repo roots for filtering in worktree diff mode
In --worktree mode, get_git_diff resolves file paths from cwd (the
original repo), but module_root/project_root are mirrored to the
worktree. This caused filter_functions to reject all diff-discovered
functions as "outside module-root". Use the pre-mirror roots for
filtering, then remap file paths to the worktree for downstream use.
2026-02-18 05:57:17 -05:00
Kevin Turcios
9d23a0ed1c
Merge pull request #1518 from codeflash-ai/proper-async
refactor: inline async decorators to remove codeflash import dependency
2026-02-18 10:11:22 +00:00
Kevin Turcios
6c092b5e7f fix: update expected coverage lines for optimized async e2e code
The optimized code removes `import time`, shifting all function lines
up by 1. Update expected_lines from [10-20] to [9-19] to match.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 09:45:51 +00:00
Kevin Turcios
9505451194 fix: revert async e2e fixture to use time.sleep() for optimization target
The e2e test expects codeflash to detect and fix the intentional use of
blocking time.sleep() in an async function. Using asyncio.sleep() removes
the optimization opportunity and causes the CI job to fail.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 09:25:33 +00:00
Kevin Turcios
e0861214ec fix: clean up async helper file and combine all decorators into single file
Write all three async decorator implementations into one helper file to
avoid overwrite issues when switching modes. Clean up the helper file in
revert_code_and_helpers and early-exit paths so it doesn't persist in the
user's project root after optimization.
2026-02-18 03:46:02 -05:00
KRRT7
64a18c9870 refactor: use helper file for async decorator instrumentation
Replace inline code injection with a helper file approach that writes
decorator implementations to a separate codeflash_async_wrapper.py file.
This removes the codeflash package import dependency from instrumented
source files while keeping line numbers stable (only 1 import + 1
decorator line added, same as before).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 08:17:08 +00:00
Kevin Turcios
9f80ea60d6
Merge branch 'main' into proper-async 2026-02-18 06:33:13 +00:00
KRRT7
325ec7d741 refactor: inline async decorators to remove codeflash import dependency
Instead of injecting `from codeflash.code_utils.codeflash_wrap_decorator import ...`
into instrumented source files, inject the decorator function definitions directly.
This removes the hard dependency on the codeflash package being importable at runtime
in the target environment, matching the pattern already used for sync instrumentation.
2026-02-18 06:30:16 +00:00
mohammed ahmed
8cb7209851
Merge pull request #1513 from codeflash-ai/fix/gen_test_to_no_of_tests_path_mismatch
[FIX] path mismatch for behavior_file_path for original baseline, resulting into empty validated test source
2026-02-18 03:51:06 +02:00
ali
7b2692feab
fix path mismatch bug 2026-02-18 03:39:46 +02:00
Sarthak Agarwal
cc678babf7
Merge pull request #1509 from codeflash-ai/fix/js-capture-perf-for-external-runner
[FIX][JS] capturePerf shouldn't break when we have an external runner (batch size = 1)
2026-02-18 02:47:16 +05:30
ali
7308afebc7
Merge branch 'main' of github.com:codeflash-ai/codeflash 2026-02-17 23:10:28 +02:00
ali
d3074096e8
fix always execute capture perf for external runner 2026-02-17 23:10:01 +02:00
Sarthak Agarwal
110e9b8d1e
Merge pull request #1507 from codeflash-ai/fix/bedrock-model-id
fix: use correct Bedrock inference profile ID
2026-02-17 21:24:23 +05:30
aseembits93
09c026a7b9 fix: use correct Bedrock inference profile ID (no :0 suffix)
The cross-region inference profile for Claude Opus 4.6 on Bedrock is
`us.anthropic.claude-opus-4-6-v1`, not `us.anthropic.claude-opus-4-6-v1:0`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 20:34:49 +05:30
Aseem Saxena
e739649e1f
Merge pull request #1504 from codeflash-ai/chore/claude-workflow-aws-bedrock
chore: switch Claude workflows from Foundry to AWS Bedrock
2026-02-17 20:14:33 +05:30
Aseem Saxena
0b9dc5d872
Merge branch 'main' into chore/claude-workflow-aws-bedrock 2026-02-17 20:04:47 +05:30
mohammed ahmed
f855c05479
Merge pull request #1497 from codeflash-ai/fix/jest30-pnpm-resolution
fix: resolve jest-runner from project's node_modules for Jest 30 compatibility
2026-02-17 16:21:13 +02:00
aseembits93
e1a45dd0c8 chore: switch Claude workflows from Foundry to AWS Bedrock
Replace Azure Foundry authentication with AWS Bedrock OIDC in all
Claude Code GitHub Actions workflows.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 19:02:00 +05:30
mohammed ahmed
c262f3c439
Merge branch 'main' into fix/jest30-pnpm-resolution 2026-02-17 15:31:55 +02:00
Kevin Turcios
fc9cdf87e2
Merge pull request #1503 from codeflash-ai/fix-codeflash-benchmark-build
fix: update license format to use license-files
2026-02-17 06:01:36 +00:00
KRRT7
fa452f2f31 fix: update license format to use license-files
Replace deprecated license table format with modern license-files array
in both main package and codeflash-benchmark subpackage. This resolves
the setuptools deprecation warning about TOML table license format.

Changes:
- Use license-files = ["LICENSE"] instead of license = {text = "BSL-1.1"}
- Add LICENSE file to root directory
- Add LICENSE and README.md to codeflash-benchmark/
2026-02-17 05:54:21 +00:00
Kevin Turcios
805d946c5b
Merge pull request #1498 from codeflash-ai/cf-simplify-context-extraction
refactor: move context extraction to languages/python/context/
2026-02-16 22:41:51 -05:00
claude[bot]
633acce436 style: auto-fix linting issues 2026-02-16 21:58:47 +00:00
Kevin Turcios
707703ca59 refactor: deduplicate Python language support code
Extract shared helpers and remove dead code across the language support area:
- Extract `is_assignment_used()` and move `recurse_sections` to unused_definition_remover.py, replacing duplicated logic in both context files
- Extract `function_sources_to_helpers()` in support.py to unify identical HelperFunction construction
- Remove dead `get_comment_prefix()` method from protocol and all implementations (comment_prefix property serves all callers)
2026-02-16 16:55:01 -05:00