Commit graph

159 commits

Author SHA1 Message Date
HeshamHM28
5add169ba9
Merge branch 'main' into java-config-redesign 2026-03-27 14:10:00 +02:00
Matt Van Horn
ad90129965
feat: create issue templates for bug reports and feature requests
Add GitHub issue templates using YAML form syntax:
- bug_report.yml: structured bug report with version, OS, reproduction steps
- feature_request.yml: feature request with motivation and alternatives
- config.yml: enable blank issues and link to discussions

Closes #523

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 22:56:15 -07:00
misrasaurabh1
0fc5bba763 fix: e2e java tracer runs on all codeflash changes and validates replay tests + speedups
- Trigger on any codeflash/** or tests/** changes (not just java subset)
- Validate replay test files are discovered per-function
- Already validates: replay test generation, global discovery count,
  optimization success, and minimum speedup percentage

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 22:34:56 -07:00
Saurabh Misra
59031a145e
Merge pull request #1874 from codeflash-ai/java-tracer
feat: Java tracing agent with end-to-end optimization pipeline
2026-03-19 15:12:11 -07:00
misrasaurabh1
c699093a26 Initial e2e tracer implementation 2026-03-18 23:03:35 -07:00
Kevin Turcios
f4319aac67 fix: scale review depth to PR size, add scope boundaries
- Triage now classifies PRs as TRIVIAL/SMALL/LARGE based on lines changed
- SMALL PRs: focused correctness check, quick duplicate scan, skip coverage
- LARGE PRs: full review with design checks, deep duplicate detection, coverage
- Optimization PRs: concise correctness verdict instead of long essays
- Added explicit scope rules: only read files in the diff, don't explore broadly
2026-03-18 19:06:40 -06:00
Kevin Turcios
f1cf46ce6b fix: improve Claude GHA review behavior
- Stop closing PRs on unrelated CI failures (check base branch first)
- Remove age-only auto-close rule; require individual evaluation
- Prevent mass-closing without per-PR analysis
- Merge conflicts only close after 3 days (not immediately)
- Resolve stale threads silently (no " Fixed" reply noise)
- Add design review checks (module placement, root cause, config files)
- Flag accidental file inclusions (binaries, auto-generated versions)
- Request tests for untested new public functions
2026-03-18 19:01:18 -06:00
Mohamed Ashraf
fa9d32f1c4 Merge branch 'main' into omni-java
Resolve 7 merge conflicts from main's modular refactoring + JS improvements:

- aiservice.py: combine multi-language metadata (omni-java) with main's structure
- cmd_init.py: adopt main's modular split (init_config, init_auth, github_workflow) + add Java import
- code_replacer.py: main's clean early-return style + omni-java's non-Python single-block fallback
- version.py, test_support_dispatch.py, test_javascript_test_runner.py: take main's versions
- uv.lock: regenerated

Port Java into main's modular structure:
- Fix init_java.py lazy imports to point to new modules (init_config, init_auth, github_workflow)
- Add Java workflow support to github_workflow.py (detection, template, customization)
- Fix broken Java imports (function_optimizer, line_profiler) after main's module moves

Add safety tests for merge-critical functions:
- test_add_language_metadata.py: 10 tests covering per-language payload correctness
- test_code_replacer_matching.py: 8 tests covering fallback chain

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 00:15:19 +00:00
Kevin Turcios
3ba68c0288 fix: attempt to fix failing CI on codeflash optimization PRs before closing
Instead of immediately closing optimization PRs when CI fails, Claude
now checks out the branch, inspects failures, and attempts to fix them.
Only closes if unfixable, with a specific explanation of the failures.
2026-03-10 16:34:55 -06:00
Kevin Turcios
89faf1e2fd chore: use default testgen-review-turns in GHA 2026-03-06 17:05:01 -05:00
Kevin Turcios
70a410a656 feat: add --testgen-review-turns CLI flag to control repair cycles 2026-03-06 01:12:39 -05:00
Kevin Turcios
5c34cb994b chore: enable --testgen-review flag in CI optimization workflow 2026-03-06 00:45:23 -05:00
Kevin Turcios
eceac13fc3 Merge remote-tracking branch 'origin/main' into omni-java
# Conflicts:
#	.claude/rules/architecture.md
#	.claude/rules/code-style.md
#	.github/workflows/claude.yml
#	.github/workflows/duplicate-code-detector.yml
#	codeflash/api/aiservice.py
#	codeflash/cli_cmds/console.py
#	codeflash/cli_cmds/logging_config.py
#	codeflash/code_utils/deduplicate_code.py
#	codeflash/discovery/discover_unit_tests.py
#	codeflash/languages/base.py
#	codeflash/languages/code_replacer.py
#	codeflash/languages/javascript/mocha_runner.py
#	codeflash/languages/javascript/support.py
#	codeflash/languages/python/support.py
#	codeflash/optimization/function_optimizer.py
#	codeflash/verification/parse_test_output.py
#	codeflash/verification/verification_utils.py
#	codeflash/verification/verifier.py
#	packages/codeflash/package-lock.json
#	packages/codeflash/package.json
#	tests/languages/javascript/test_support_dispatch.py
#	tests/test_codeflash_capture.py
#	tests/test_languages/test_javascript_test_runner.py
#	tests/test_multi_file_code_replacement.py
2026-03-04 01:52:32 -05:00
Kevin Turcios
bccc02aade merge: incorporate omni-main-java sync work
Merges the omni-main-java branch which synced main into omni-java,
including JavaFunctionOptimizer, removal of is_java()/is_python() guards,
protocol dispatch for parse_test_xml, and deletion of concolic_testing.py.
2026-03-03 23:42:39 -05:00
Kevin Turcios
c7854fb605 chore: remove simplify step from Claude PR review and add prek rule
Drop the /simplify step that caused unprompted refactors and scope
creep in PR reviews. Also add prek pre-commit rule to project config
so the PR bot and all contributors see it.
2026-03-03 22:21:55 -05:00
Kevin Turcios
8f50f31251 fix: add gh pr close permission to pr-review workflow
The merge_optimization_prs step needs to close stale PRs but
gh pr close was missing from the allowed tools list.
2026-03-03 21:04:14 -05:00
Kevin Turcios
dee1175acd chore: remove simplify step from Claude PR review and add prek rule
Drop the /simplify step that caused unprompted refactors and scope
creep in PR reviews. Also add prek pre-commit rule to project config
so the PR bot and all contributors see it.
2026-03-03 20:02:22 -05:00
Mohamed Ashraf
50ba89c6be ci: build codeflash-runtime JAR in unit-tests workflow
The unit-tests workflow relied on a pre-committed JAR binary in
resources/ which could become stale when Comparator.java changes.
Now the workflow builds the JAR from source and installs it to the
local Maven repo, matching what java-e2e and fibonacci-nogit already do.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 20:01:40 +00:00
Kevin Turcios
08dad4e6a4 chore: sync docs, rules, and workflows from main 2026-03-02 22:48:28 -05:00
Kevin Turcios
12b18de2d1 chore: limit claude workflow triggers to reduce spam
- Add paths-ignore to skip reviews for docs, config, CI, and non-production files
- Use github.event.sender.login instead of github.actor for reliable bot detection
- Add triage step to early-exit on trivial PRs
2026-03-02 22:01:11 -05:00
aseembits93
7ee1e7bd2f chore: switch claude workflow model from opus to sonnet 4.6
Use claude-sonnet-4-6 instead of claude-opus-4-6 for CI cost/speed savings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 08:08:28 +05:30
Kevin Turcios
ad4ebdb710 fix: merge duplicate detector into claude workflow and add concurrency
Consolidates duplicate-code-detector.yml into claude.yml as a step in
the pr-review job. Adds concurrency groups with cancel-in-progress to
prevent comment spam from racing workflow runs.
2026-03-02 16:36:35 -05:00
Kevin Turcios
a538722ff7 chore: sync docs, CI, config, and rules from main
Pulls latest changes for .claude/rules/, .github/workflows/, CLAUDE.md,
and docs/ — all main-only changes with no omni-java overlap.
2026-03-02 14:56:26 -05:00
Kevin Turcios
29d0d2cb48 fix: rewrite Claude Code PR review prompt for better instruction following
- Use XML structure instead of markdown for clearer step boundaries
- Resolve stale review threads via GraphQL instead of leaving them
- Positive framing instead of negation for instructions
- Replace aggressive language with calm direct instructions
- Add /simplify skill invocation for code quality pass
- Add verification checkpoint at the end
- Auto-close stale codeflash optimization PRs (age, conflicts, CI failures, deleted functions)
- Remove inline comment MCP tool, add Skill tool
2026-03-02 10:53:35 -05:00
aseembits93
efb5cd9987 reverting workflows to original state 2026-02-24 21:54:58 +05:30
aseembits93
bdd22afe20 chore: sync workflow files from main
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 21:49:11 +05:30
aseembits93
51028a6edf updating workflows to mains 2026-02-24 21:41:39 +05:30
Kevin Turcios
0c786840e7 rework duplicate-code-detector a bit. 2026-02-23 08:16:43 -05:00
Kevin Turcios
c74782757b Merge commit '6346c740' into sync-main-batch-4
# Conflicts:
#	.github/workflows/windows-unit-tests.yml
#	codeflash/code_utils/config_consts.py
#	codeflash/code_utils/instrument_existing_tests.py
#	codeflash/languages/python/context/unused_definition_remover.py
#	codeflash/languages/python/static_analysis/code_replacer.py
#	codeflash/optimization/function_optimizer.py
#	codeflash/optimization/optimizer.py
#	pyproject.toml
2026-02-19 21:26:23 -05:00
Kevin Turcios
85d1d4fbf6 Merge commit '6020c4fa' into sync-main-batch-3 2026-02-19 20:33:09 -05:00
Kevin Turcios
c66953d110 Merge commit 'd578d996' into sync-main-batch-2
# Conflicts:
#	codeflash/github/PrComment.py
#	codeflash/optimization/function_optimizer.py
#	codeflash/tracer.py
#	codeflash/verification/parse_test_output.py
#	codeflash/verification/verification_utils.py
2026-02-19 20:27:14 -05:00
Kevin Turcios
7d7a2a21c0 Merge commit '3dd19c62' into sync-main-batch-1
# Conflicts:
#	codeflash/optimization/function_optimizer.py
#	codeflash/verification/verification_utils.py
#	codeflash/version.py
2026-02-19 20:10:05 -05:00
Saurabh Misra
67c12bca07
Merge branch 'main' into cf-release-benchmark-0.2.0 2026-02-19 10:31:39 -08:00
Kevin Turcios
81997282d2 ci: consolidate Windows tests into main unit-tests workflow
Remove redundant windows-unit-tests.yml and add Windows Python 3.13 job
to the main unit-tests.yaml workflow. Add PYTHONIOENCODING env var for
Windows compatibility.
2026-02-19 01:36:11 -05:00
Kevin Turcios
d09fa5ceaa ci: add Windows to unit tests matrix
Run unit tests on Windows with Python 3.13 in addition to all Python
versions (3.9-3.14) on Ubuntu. This ensures cross-platform compatibility
is tested while keeping Windows test duration reasonable.
2026-02-19 01:33:52 -05:00
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