Skip to content

Restore concurrency in testgen and candidate generation#1461

Merged
KRRT7 merged 3 commits into
mainfrom
aseembits93-patch-1
Feb 12, 2026
Merged

Restore concurrency in testgen and candidate generation#1461
KRRT7 merged 3 commits into
mainfrom
aseembits93-patch-1

Conversation

@aseembits93
Copy link
Copy Markdown
Contributor

@aseembits93 aseembits93 commented Feb 12, 2026

Removing the jit rewrite api call, it was impacting the latency by removing the concurrency of testgen and candidate generation. It existed originally to improve the testgen for jit compiled code. Will fix it on the backend by modifying the testgen api.

@aseembits93 aseembits93 requested a review from KRRT7 February 12, 2026 06:02
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Feb 12, 2026

PR Review Summary

Prek Checks

✅ All prek checks pass (ruff check, ruff format).

Mypy

⚠️ 145 mypy errors in codeflash/optimization/function_optimizer.py — all pre-existing on main. This PR only removes code (JIT optimization block + unused sentry_sdk import), so no new type errors are introduced.

Code Review

No critical issues found. This is a clean code removal PR:

Change Details
Removed JIT optimization block Lines 682-705 (original) in optimize_function() — the JIT rewrite path that called get_jit_rewritten_code, wrote optimized code, gathered new code context, then reverted
Removed sentry_sdk import No longer used anywhere in the file after the JIT block removal

Observations:

  • get_jit_rewritten_code still exists in codeflash/api/aiservice.py — this is dead code now but outside the scope of this PR
  • is_numerical_code and no_jit_opts are still referenced elsewhere in the file (lines 689, 1211) for passing to generate_optimizations, so those remain valid
  • The code flow after removal is correct: new_code_context = code_context feeds directly into generate_and_instrument_tests and generate_optimizations

Test Coverage

File Stmts (PR) Stmts (main) Cover (PR) Cover (main) Δ
codeflash/optimization/function_optimizer.py 1148 1159 18% 18% 0%
  • Coverage is unchanged at 18% for this file on both branches
  • The PR removes 11 statements (dead code), which does not affect coverage percentage
  • No new code was added, so no new coverage is needed
  • No overall coverage regression

Test results: 2347 passed, 8 failed, 57 skipped (same 8 failures exist on main — pre-existing, unrelated to this PR)


Last updated: 2026-02-12

@KRRT7 KRRT7 merged commit bcffb5e into main Feb 12, 2026
26 of 27 checks passed
@KRRT7 KRRT7 deleted the aseembits93-patch-1 branch February 12, 2026 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants