Commit graph

21 commits

Author SHA1 Message Date
Kevin Turcios
a73ccca426 Increase test data size for TS findDuplicates benchmark
The js-ts-class E2E test was flaky because n=100 is too small for
the O(n²)→O(n) optimization to overcome Map/Set per-operation overhead.
At n=100, the LLM correctly generates a Map-based O(n) solution but it
benchmarks as slower (-10.6%) due to constant factor dominance.

Bump to n=10,000 so the algorithmic improvement produces measurable
speedup, making the 30% E2E threshold reliably achievable.
2026-04-09 22:26:19 -05:00
Kevin Turcios
45fb07fad2 fix: upgrade dependencies to resolve Dependabot security alerts
Upgrade Python deps via uv sync --upgrade (werkzeug, filelock for py>=3.10,
and others). Run npm audit fix across JS test fixtures to patch minimatch
and rollup vulnerabilities.

Remaining unfixable:
- filelock <3.20.3 for py<3.10 (patched version requires py>=3.10)
- serialize-javascript in mocha ^10 (fix requires mocha 11 breaking change)
2026-03-07 03:48:38 -05:00
Sarthak Agarwal
bc5e3e878a fix mocha test runner 2026-03-04 03:42:10 +05:30
Kevin Turcios
3e282ee293 fix: address security vulnerabilities while maintaining Python 3.9 support
Resolve 12 Dependabot security alerts by constraining vulnerable packages
to Python 3.10+ where patches are available:

Python dependencies:
- filelock: Pin <3.20.3 for Python 3.9, >=3.20.3 for Python 3.10+
  (fixes TOCTOU symlink vulnerabilities CVE-2024-XXXXX)
- tensorflow: Only install on Python 3.10+ (brings keras >=3.12.1, pillow >=12.1.1)
  (fixes 8 high-severity keras vulnerabilities including arbitrary code execution,
   directory traversal, and 1 high-severity pillow out-of-bounds write)

JavaScript dependencies:
- vitest: Update to latest (4.0.18) in test fixture directory
  (fixes moderate-severity esbuild SSRF vulnerability GHSA-67mh-4wv8-2f99)

Python 3.9 notes:
- filelock 3.19.1 has known TOCTOU vulnerabilities (medium severity)
- tensorflow/keras/pillow excluded from Python 3.9 test dependencies
- Python 3.9 reached EOL in October 2025, vulnerabilities are expected

All high-severity vulnerabilities are resolved for Python 3.10+.
Python 3.9 users should upgrade to 3.10+ for full security patches.
2026-02-19 01:26:37 -05:00
ali
9937fe0967
fixes for unit tests 2026-02-12 19:30:46 +02:00
ali
6b77be56ef
ignore calls inside string litrals for instrumentation and fix e2e test 2026-02-12 18:14:33 +02:00
ali
175226bd20
fix: correct loop index calculation in JS performance benchmarking
Loop index now represents how many times all test files ran (batch count)
instead of per-invocation index. Also fixes Date.now() usage when random
seed is active and removes JS-specific workaround in number_of_loops.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 15:32:16 +02:00
ali
dcd9e2a502
some fixes for test runner and instrumentation 2026-02-11 20:27:02 +02:00
ali
6c23255bca
version upgrade for cf package 2026-02-06 18:35:36 +02:00
mohammed ahmed
f800ae3d92
Merge branch 'main' into fix/js-jest30-loop-runner 2026-02-06 17:22:15 +02:00
ali
a6b936402d
fix: include same-class helper methods inside class wrapper for TypeScript
When optimizing TypeScript class methods that call other methods from the
same class, the helper methods were being appended OUTSIDE the class
definition. This caused syntax errors because class-specific keywords like
`private` are only valid inside a class body.

Changes:
- Add _find_same_class_helpers() method to identify helper methods belonging
  to the same class as the target method
- Modify extract_code_context() to include same-class helpers inside the
  class wrapper and filter them from the helpers list
- Fix all JavaScript/TypeScript tests by adding export keywords to test code
  so functions can be discovered by discover_functions()
- Add comprehensive tests for same-class helper extraction

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 17:19:46 +02:00
Sarthak Agarwal
6808e467b0 adding package.json update- we shouldnt upload package lock file for tests as version will keep updating 2026-02-05 05:27:19 +05:30
ali
348a6eccd3
fix: skip module conversion only for TypeScript projects with ts-jest
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 17:27:41 +02:00
Sarthak Agarwal
4bf664dc39 add vitest runner 2026-01-31 04:29:59 +05:30
Sarthak Agarwal
c56002f287 vitest support add to js/ts project 2026-01-31 01:09:52 +05:30
misrasaurabh1
325534dbc2 extract class skeleton for optimization context 2026-01-28 23:28:59 -08:00
Sarthak Agarwal
2cc1fb2809 tests for extractor and replacer 2026-01-29 01:27:19 +05:30
Sarthak Agarwal
942bbac356 update to 0.2.0 2026-01-28 18:10:29 +05:30
Sarthak Agarwal
e9eaa4788a update package-lock files 2026-01-28 17:59:20 +05:30
Sarthak Agarwal
acf0423761 move package dependencies to codeflash 2026-01-28 11:34:44 +05:30
misrasaurabh1
54ef71090e add e2e test for CI 2026-01-27 20:54:01 -08:00