Commit graph

224 commits

Author SHA1 Message Date
Kevin Turcios
a76f28f196 chore: bump codeflash-benchmark version to 0.3.0 2026-02-18 17:45:55 -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
HeshamHM28
3359c9ab0d add JDK for windows 2026-02-18 03:57:09 +02:00
HeshamHM28
dc1083b3f9 add java jdk 2026-02-18 03:47:42 +02:00
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
0b9dc5d872
Merge branch 'main' into chore/claude-workflow-aws-bedrock 2026-02-17 20:04:47 +05:30
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
ali
066980b06f
Merge branch 'fix/jest30-pnpm-resolution' of github.com:codeflash-ai/codeflash into fix/jest30-pnpm-resolution 2026-02-16 14:36:55 +02:00
ali
2fb4b2dbfd
cleaning up 2026-02-16 14:36:39 +02:00
HeshamHM28
ca4f01f7c5 Add Java end to end tests 2026-02-16 08:43:51 +02:00
Kevin Turcios
02b9a5e226 chore: replace gh-aw duplicate detector with claude-code-action + Serena
gh-aw doesn't support Azure Foundry auth. Use claude-code-action directly
with use_foundry and Serena MCP server for semantic code analysis.
2026-02-14 19:05:47 -05:00
Kevin Turcios
ef661394b7 fix: configure duplicate code detector for Azure Foundry auth
Pass ANTHROPIC_FOUNDRY_API_KEY and ANTHROPIC_FOUNDRY_BASE_URL env vars
so Claude Code CLI authenticates via Azure Foundry instead of direct API.
2026-02-14 18:26:00 -05:00
Kevin Turcios
f819d6061e chore: add gh-aw duplicate code detector workflow
Adds automated duplicate code detection using GitHub Agentic Workflows
with Serena semantic analysis, configured for Python.
2026-02-14 18:14:16 -05:00
Kevin Turcios
1a3dba2574 Update claude.yml 2026-02-12 00:13:47 -05:00
Mohamed Ashraf
9be69106f6 fix: resolve merge conflicts with omni-java base
Merged omni-java base into PR #1279 to resolve conflicts.

Resolution approach:
1. test_discovery.py: Used refactored method call resolution from base
   - New approach uses sophisticated type tracking (jedi-like "goto")
   - Already includes duplicate checking (line 141)
   - Removed old Strategy 3 (class-based fallback) as it's not needed
     and caused single-function optimization issues

2. test_instrumentation.py: Combined both changes
   - Added API key setup from PR #1279
   - Kept FunctionToOptimize imports from base

The refactored code is more accurate and fixes the single-function
optimization issue that existed in the original PR.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 14:31:25 +00:00
Kevin Turcios
2847edc719 feat: upgrade Claude GHA to Opus 4.6 2026-02-06 02:30:37 -05:00
Kevin Turcios
91454e27d7 fix: add verification step to CI Claude workflow to prevent hallucinated fixes
The PR review bot was claiming lint issues were fixed without actually
fixing or committing them. Add a mandatory re-run of prek after fixes
and explicit instructions to report unfixed issues honestly.
2026-02-06 01:53:04 -05:00
Kevin Turcios
e9aadb8d14 feat(ci): auto-merge codeflash optimization PRs when CI passes 2026-02-04 06:23:39 -05:00
Kevin Turcios
7cf2e4e67b feat(ci): add mypy checks to Claude PR review workflow
Claude will now run mypy on changed files and fix type annotation issues.
2026-02-04 06:12:21 -05:00
Kevin Turcios
fe9f22b3ad docs: update pre-commit references to prek
Replace outdated pre-commit terminology with prek across documentation
and CI workflow.
2026-02-04 06:09:18 -05:00
Kevin Turcios
8231c60b70 fix(ci): consolidate Claude review into single sticky comment
- Remove instruction to use gh pr comment for summaries
- Add STEP 4 with explicit single-comment policy
- Include instructions to update existing comments
- Add cleanup step to delete duplicate comments
2026-02-04 06:05:12 -05:00
Kevin Turcios
95cc60397d
Merge branch 'main' into omni-java 2026-02-04 03:22:37 -05:00
Kevin Turcios
cb9248e022 feat: add merge/close permissions and secure workflow
- Add git merge/fetch/checkout/branch to allowed tools
- Add gh pr merge/close to allowed tools
- Add allowed_bots for claude[bot] to trigger pr-review
- Restrict @claude mentions to maintainers only (OWNER/MEMBER/COLLABORATOR)
- Block fork PRs from triggering pr-review and claude-mention
2026-02-03 23:54:43 -05:00
Kevin Turcios
831d296052 fix: skip pr-review when triggered by claude bot 2026-02-03 23:40:45 -05:00
Kevin Turcios
d5ec877a78 feat: add coverage analysis to PR review workflow
- Run tests with coverage on changed files
- Compare coverage between PR and main branch
- New files require ≥75% test coverage
- Modified files must have changed lines covered
- Flag coverage regressions in PR comment
2026-02-03 22:57:56 -05:00
Kevin Turcios
6289c5325a feat: improve Claude PR review workflow
- Consolidate claude-code-review.yml into claude.yml with two jobs
- Add auto-fix for safe linting issues (formatting, imports) before review
- Use --from-ref origin/main to only check changed files
- Add smart re-review logic that resolves fixed comments
- Add inline comment support via MCP tool with 5-7 comment limit
2026-02-03 22:51:32 -05:00
Kevin Turcios
9f4776eb2e chore: migrate from pre-commit to prek
Replace pre-commit with prek (faster Rust-based alternative) for linting.
- Add prek to dev dependencies
- Replace pre-commit workflow with prek workflow using setup-uv@v6
- Update Claude workflow allowed tools to use prek
2026-02-03 19:56:58 -05:00
Kevin Turcios
4dc09174da fix: add uv setup to Claude workflow
Install uv and project dependencies before running Claude Code action
so that pre-commit, ruff, and other tools are available.
2026-02-03 17:34:54 -05:00
Kevin Turcios
32b5d468b4 chore: add tool permissions to Claude workflow and strengthen CLAUDE.md guidelines
Add allowedTools for pre-commit, ruff, pytest, mypy, coverage, and git/gh commands
to enable Claude to run linting and testing. Strengthen naming convention guidance
to explicitly forbid leading underscores on functions.
2026-02-03 16:59:28 -05:00
misrasaurabh1
c40798fa73 Merge branch 'omni-java' of github.com:codeflash-ai/codeflash into omni-java 2026-02-02 19:15:37 -08:00
Mohamed Ashraf
131597caa9 fix: add API key for tests and build codeflash-runtime JAR in CI
- Add CODEFLASH_API_KEY for test_instrumentation.py tests that instantiate Optimizer
- Create pom.xml for codeflash-java-runtime with Gson and SQLite JDBC dependencies
- Add CI step to build and install JAR before running tests
- Update .gitignore to allow pom.xml in codeflash-java-runtime
- All 348 Java tests now pass including 5 Comparator JAR integration tests
2026-02-03 02:18:49 +00:00
Saurabh Misra
a00eb39cd2 feat: add Java end-to-end tests and CI workflow
Add comprehensive e2e tests for the Java optimization pipeline:
- Function discovery (BubbleSort, Calculator)
- Code context extraction
- Code replacement
- Test discovery (JUnit 5)
- Project detection (Maven)
- Compilation and test execution

Also add:
- GitHub Actions workflow for Java e2e tests (java-e2e-tests.yml)
- Maven pom.xml for the Java sample project
- .gitignore exception for pom.xml

The e2e tests verify the full Java pipeline works correctly,
from function discovery through code replacement.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 01:17:17 +00:00
Saurabh Misra
82d9e435ef
Merge branch 'main' into add_vitest_support_to_js 2026-02-01 12:32:09 -08:00
Kevin Turcios
90aec153d5 more perms to write 2026-02-01 09:12:39 -05:00
Sarthak Agarwal
4745b0c347 reset test strings to strict 2026-01-31 12:32:23 +05:30
Sarthak Agarwal
c56002f287 vitest support add to js/ts project 2026-01-31 01:09:52 +05:30
Kevin Turcios
73039364ee not needed 2026-01-29 13:14:43 -05:00
ali
ecbace9cf8
fix unit tests 2026-01-29 17:11:10 +02:00
Sarthak Agarwal
483fa44f36 package installer to e2e test 2026-01-29 14:31:06 +05:30
Sarthak Agarwal
2cc1fb2809 tests for extractor and replacer 2026-01-29 01:27:19 +05:30
misrasaurabh1
79ae59f399 add gha e2e tests 2026-01-27 20:57:08 -08:00
codeflash-ai[bot]
6e40ff8488
Add CodeFlash GitHub Actions workflow 2026-01-28 01:29:39 +00:00
Sarthak Agarwal
bcdb0ef39d
Merge branch 'main' into multi-language 2026-01-27 22:53:40 +05:30
Kevin Turcios
1b92d11058 Update mypy.yml 2026-01-24 06:51:43 -05:00
Sarthak Agarwal
29e0e190c5 add refinement and cleanup 2026-01-21 05:28:03 +05:30
Kevin Turcios
9fcbd2bb8f Rename secret to AZURE_ANTHROPIC_API_KEY 2025-12-26 13:39:12 -05:00
Kevin Turcios
2a5d303e6f Rename secret to AZURE_ANTHROPIC_ENDPOINT 2025-12-26 13:37:02 -05:00
Kevin Turcios
e1b7425d54 Switch Claude workflows to Azure Foundry 2025-12-26 13:35:56 -05:00
Kevin Turcios
1cc97b7517 Remove qodo-ai pr-agent workflow (replaced by Claude) 2025-12-26 13:22:52 -05:00
Kevin Turcios
09c6ec7cf0 sticky comments 2025-12-26 13:03:29 -05:00
Kevin Turcios
508df04c1e "Claude Code Review workflow" 2025-12-22 20:51:48 -05:00
Kevin Turcios
a88ce7e566 "Claude PR Assistant workflow" 2025-12-22 20:51:47 -05:00
Kevin Turcios
2e34d83c52
remove test_framework from pyproject.toml (#955)
* follow up

* remove requirement

* Delete uv.lock

* refresh uv-lock

* first pass

* cleanup test_framework here

* cleanup

* code_review

* cleanup tests

* fix for E2E

* fix tests dir missing

* one more cleanup

* cancel-in-progress

* Revert "cancel-in-progress"

This reverts commit f4bb9079cb.

* not needed here

* lower threshold and cleanup comments

* debug

* temp

* debug

Revert "debug"

This reverts commit fc3655149486c8b980e245e97b8304232086f08d.

fix(discover): Fix pytest discovery for futurehouse structure

Revert "fix(discover): Fix pytest discovery for futurehouse structure"

This reverts commit 40c48882b7413f5876af0e2e08d8f17a65bab091.

Reapply "debug"

This reverts commit c8297e57fbdca2462a8ca1199657748b8bc225e9.

Revert "not needed here"

This reverts commit dd2c5cdf76.

Revert "lower threshold and cleanup comments"

This reverts commit 0e2f57e292.

Reapply "lower threshold and cleanup comments"

This reverts commit e3b24f4a2967551eca8a19f96bf6647b23acdbbc.

Reapply "not needed here"

This reverts commit aec32103c931ff6d57dfa0d012113c2cec5d37a7.

Revert "Reapply "debug""

This reverts commit 77ab9f34f858a17fb29764c544769a0eb72ce7f0.

Reapply "fix(discover): Fix pytest discovery for futurehouse structure"

This reverts commit 506b94ab4fe17a7c8e0d458253812758cced3f22.

feat(futurehouse): Make futurehouse structure pytest compatible

* Revert "debug"

This reverts commit 271c5a37ec.

* Revert "temp"

This reverts commit b363acda1c.

* Revert "debug"

This reverts commit ac29b6beb3.

* just for now
2025-12-09 02:53:08 -08:00
Kevin Turcios
66ff6f065d apply suggestion 2025-12-07 00:53:32 -06:00
Kevin Turcios
a22adba91a apply suggestion 2025-12-07 00:51:47 -06:00
Kevin Turcios
4cb39b8ab3 cancel-in-progress 2025-12-07 00:46:42 -06:00
Kevin Turcios
33437d39e3
use pytest as the execution engine for all tests (#951)
* first pass

restore

restore this too

Revert "first pass"

This reverts commit b507770b2c79cc948b33222d8877fb784bfe108a.

* continue

* Update uv.lock

* refresh lockfile

* bugfix

* temp

* fix these

* pytest changes

* formatting

* set up test env properly here too

* ruff

* make ruff happy

* Update e2e-bubblesort-unittest.yaml

* with pytest

* bugfix

* oops
2025-12-06 22:40:25 -06:00
Saurabh Misra
5e6a8fcea3 fix publish workflow
Signed-off-by: Saurabh Misra <misra.saurabh1@gmail.com>
2025-11-07 16:30:56 -08:00
Saurabh Misra
8a0e90cbc8
Merge branch 'main' into automated-pypi-publishing 2025-11-07 16:16:21 -08:00
Saurabh Misra
67b91d38dd update
Signed-off-by: Saurabh Misra <misra.saurabh1@gmail.com>
2025-11-07 16:16:07 -08:00
Codeflash Bot
e852491f7c sync test dependency packages for 3.9 2025-11-04 00:44:13 -08:00
Kevin Turcios
90eadb8d10 automatically publish when git tag is pushed 2025-10-15 15:25:02 -07:00
Kevin Turcios
97d9e62620 update to avoid locking issues
astral-sh/uv#16105
2025-10-15 15:08:01 -07:00
Kevin Turcios
6e2b05150f conditionally run 3.13 with tests dependencies 2025-10-13 22:13:43 -07:00
Kevin Turcios
e525edc707
Merge branch 'main' into 3.14-in-CI 2025-10-14 01:24:46 +00:00
Kevin Turcios
3b714941b8 lower expect improvement 2025-10-13 14:31:23 -07:00
ali
6b3a020afa
worktree e2e 2025-10-09 15:17:47 +03:00
Kevin Turcios
bf633fefe8 Update unit-tests.yaml 2025-10-08 14:04:08 -07:00
Kevin Turcios
f978a406bb Merge branch 'main' into part-1-windows-fixes 2025-09-29 14:46:25 -07:00
Kevin Turcios
782dba1f23 update this one too 2025-09-29 13:43:00 -07:00
Kevin Turcios
b992f71b6e loosen gain % for E2E 2025-09-29 13:26:18 -07:00
Kevin Turcios
a1d538143b add E2E test on windows too 2025-09-28 09:56:48 +00:00
Kevin Turcios
02662c6a7c run unit tests on windows too 2025-09-28 09:42:47 +00:00
Kevin Turcios
736faa1641 add E2E gha & pytest-asyncio 2025-09-26 15:09:49 -07:00
Kevin Turcios
2cb3e39c32 remove auto deploy of docs 2025-07-31 16:31:39 -07:00
Saurabh Misra
3a44a44106 3.13 test
Signed-off-by: Saurabh Misra <misra.saurabh1@gmail.com>
2025-07-25 13:20:00 -07:00
Kevin Turcios
609144f1ff Update unit-tests.yaml 2025-07-23 17:46:37 -07:00
mohammed
90d84b558e Merge branch 'main' of github.com:codeflash-ai/codeflash into chore/get-pr-number-from-gh-action-event-file 2025-06-29 03:34:51 +03:00
Sarthak Agarwal
64a40d85d6
Rename the test files and Workflow name as all of them have same name (#442)
Co-authored-by: Kevin Turcios <106575910+KRRT7@users.noreply.github.com>
2025-06-27 04:50:08 +05:30
Kevin Turcios
9e26985e76
Merge branch 'main' into chore/get-pr-number-from-gh-action-event-file 2025-06-21 01:31:42 +00:00
Kevin Turcios
46ab01d122 fix 2025-06-20 18:02:39 -07:00
mohammed
89410a5f64 get pr number from gh action event json file, fallback to old behaviour 2025-06-20 18:28:08 +03:00
Kevin Turcios
a407ed267c applied sunscreen 2025-06-19 17:01:24 -07:00
Kevin Turcios
406f86ebfb forgot the flash 2025-06-19 17:00:09 -07:00
Kevin Turcios
4d533f3d7e update the tests to uv 2025-06-19 16:59:06 -07:00
Kevin Turcios
edfc24032e Update unit-tests.yaml 2025-06-09 20:30:53 -07:00
Kevin Turcios
2e4be15cf7 Create pre-commit.yaml 2025-05-20 17:20:49 -04:00
aseembits93
9685312d8b recalibrating expected improvement with new tests 2025-05-12 14:17:08 -07:00
Saurabh Misra
1980dfd431 Fix GHA 2025-05-07 20:43:00 -07:00
Kevin Turcios
3649e9bdbb loosen pytest version
# 3.13 is causing a strange string formatting error, won't spend more time on it until neccesary.
2025-04-21 06:04:33 -05:00
Alvin Ryanputra
5a4a547524 fix ci 2025-04-18 15:54:13 -04:00
Alvin Ryanputra
8ea6a40a8b fix ci 2025-04-18 14:36:20 -04:00
Alvin Ryanputra
e5ca10fbb6 marked multithreaded trace benchmarks test to be skipped during CI as its flaky with github action machines 2025-04-17 11:11:12 -04:00
Alvin Ryanputra
a624221642 added pytest-benchmark as dependency 2025-04-16 19:14:55 -04:00
Alvin Ryanputra
4e8483bef0 created benchmarks for codeflash, modified codeflash-optimize to use codeflash --benchmark 2025-04-15 21:18:59 -04:00
Alvin Ryanputra
b70c4c9542 Merge branch 'main' into codeflash-trace-decorator 2025-04-15 11:11:44 -04:00
Sarthak Agarwal
9005337a74
Syntax improvement for wf file change (#147)
* workflow test for wf file change(Test PR)

* syntax improve for wf changes

---------

Co-authored-by: Kevin Turcios <106575910+KRRT7@users.noreply.github.com>
2025-04-14 02:18:34 +05:30
Sarthak Agarwal
378d88bf8c
WF changes to remove condition (#145) 2025-04-13 13:22:04 +05:30
Sarthak Agarwal
142b0b4117
try folded block scalar notation
* try fix with env variable

* added folded block notation to other yaml files
2025-04-13 12:50:41 +05:30
Alvin Ryanputra
fce641e5e5 Merge branch 'main' into codeflash-trace-decorator 2025-04-11 17:10:32 -04:00
Sarthak Agarwal
87ea50bd9d
recieve request only when workflow file changed (#137) 2025-04-12 00:17:33 +05:30
Alvin Ryanputra
95788541eb Merge branch 'main' into codeflash-trace-decorator 2025-04-11 13:21:37 -04:00
Sarthak Agarwal
7d7340c124
fix workflow triggering condition (#136)
* fix workflow triggering condition

* fix run
2025-04-11 10:34:52 +05:30
Alvin Ryanputra
40e416e0d0 Merge branch 'refs/heads/main' into codeflash-trace-decorator
# Conflicts:
#	codeflash/code_utils/config_parser.py
#	codeflash/optimization/function_optimizer.py
2025-04-10 21:28:48 -04:00
Sarthak Agarwal
6b71c6052d
fix PR approved state (#134)
* fix PR approved state

* fix topological sort wf
2025-04-10 21:07:38 +05:30
Alvin Ryanputra
821fa4798a fixed e2e test 2025-04-09 17:19:19 -07:00
Alvin Ryanputra
906e4348d1 renamed test 2025-04-09 17:19:19 -07:00
Alvin Ryanputra
5c30d3ea46 new end to end test for benchmarking bubble sort 2025-04-09 17:19:19 -07:00
HeshamHM28
3665e7676d
Create GitHub Actions Workflow to Label PRs Modifying Workflows (#130)
* Add PR labeler workflow to label PRs modifying workflows

* Switch from `pull_request_target` to `pull_request`

* Fix label color format

---------

Co-authored-by: Sarthak Agarwal <sarthak.saga@gmail.com>
2025-04-10 03:23:40 +05:30
Saga4
aecf39c905 add environment for contributors 2025-04-08 19:54:33 +05:30
Saga4
f688f740eb test changes for actor confirmation 2025-04-08 02:50:02 +05:30
Saga4
9a9286f32e test changes for actor confirmation 2025-04-07 21:50:53 +05:30
Saurabh Misra
50de507b78 allow external contributors to run our e2e tests 2025-04-06 22:47:47 -07:00
Saurabh Misra
83496493d7 Make codeflash github actions cooler? 2025-03-24 15:11:56 -07:00
Kevin Turcios
c9df6dfa15 restore PR_Agent to repo 2025-03-03 15:17:40 -08:00
Alvin Ryanputra
758f1d289f added mypy and codeflash-optimize 2025-02-14 23:22:58 +08:00
Alvin Ryanputra
da41a516d4 fixed all end to end tests 2025-02-14 13:13:34 +08:00
Alvin Ryanputra
055ff2e877 Merge branch 'refs/heads/main' into github-actions 2025-02-14 13:10:14 +08:00
Alvin Ryanputra
acf6409f9a folder changes 2025-02-14 13:09:44 +08:00
Alvin Ryanputra
f7e8c23e43 trying to fix license not found error 2025-02-14 12:40:53 +08:00
Alvin Ryanputra
1b7054e244 end to end test with prod aiserver 2025-02-14 12:29:15 +08:00
Saurabh Misra
3f0fd3f541 fix working directory 2025-02-13 19:28:17 -08:00
Saurabh Misra
f370439c1d move docs to public 2025-02-13 01:26:19 -05:00
Saurabh Misra
d3c7ae4cea add the new submodule at cli 2025-02-13 01:13:28 -05:00