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
19bd6e4bad
test: sync test files from main (safe, main-only changes)
...
34 test files updated with main's refactored tests for new language
support protocol, JS/TS improvements, and code context extraction.
2026-03-02 15:25:50 -05:00
Kevin Turcios
04a94f2b03
test: update tests for refactored language support
...
- Update discover_functions calls to new (source, file_path) signature
- Use language-specific FunctionOptimizer subclasses in tests
- Add explicit utf-8 encoding to read_text()/write_text() for Windows
- Fix pytest fixture in TestTsJestSkipsConversion (was __init__)
- Update nonexistent file tests for source-based discover_functions
- Remove unused imports
2026-03-02 06:09:06 -05:00
Kevin Turcios
94a99a980f
fix failing test
2026-02-23 05:43:16 -05:00
Kevin Turcios
0dbb3a47a2
not used
2026-02-20 08:47:27 -05:00
Kevin Turcios
ef99747697
refactor: move code_extractor, code_replacer to languages/python/static_analysis/
2026-02-19 03:21:34 -05:00
Kevin Turcios
a96918766f
refactor: replace jedi_definition with definition_type on FunctionSource
...
Store only the type string instead of the full Jedi Name object,
removing the need for arbitrary_types_allowed and the runtime
dependency on jedi in the model layer.
2026-02-10 04:57:10 -05:00
misrasaurabh1
198487bf81
format and lint all
2026-01-29 01:39:48 -08:00
Kevin Turcios
7b33e8b7f6
refactor: smarter placement of global assignments based on dependencies
...
Assignments that don't reference module-level definitions are now placed
right after imports. Only assignments that reference classes/functions
are placed after those definitions to prevent NameError.
2026-01-24 06:29:39 -05:00
Kevin Turcios
50fba096f7
fix: insert global statements after function definitions to prevent NameError
...
When LLM-generated optimizations include module-level function calls like
`_register(MessageKind.ASK, ...)`, they were being inserted right after
imports, BEFORE the function definition they reference, causing NameError
at module load time.
Changes:
- Add GlobalStatementTransformer to append global statements at module end
- Reorder transformations: functions → assignments → statements
- Remove unused ImportInserter class
- Update test expectations to reflect new placement behavior
2026-01-24 02:09:38 -05:00
ali
b4294f8a90
handle new added classes
2025-11-11 16:20:11 +02:00
ali
1c7c2b88ba
Merge branch 'main' of github.com:codeflash-ai/codeflash into testgen/multi-files
2025-10-08 01:40:56 +03:00
Kevin Turcios
3f1f8d3080
sync with main
2025-09-26 17:06:38 -07:00
Kevin Turcios
c6c9d9559f
few missing things
2025-09-26 16:25:28 -07:00
ali
4b41ab73bf
fix: unit tests
2025-09-25 04:10:25 +03:00
ali
5981d75b3e
use markdown context for the testgen
2025-09-25 03:31:05 +03:00
ali
28f50cc1e0
Merge branch 'main' of github.com:codeflash-ai/codeflash into fix/duplicate-global-assignments-when-reverting-helpers
2025-08-25 21:36:35 +03:00
ali
9c8256a122
prevent duplicates for new global statements
2025-08-25 00:44:12 +03:00
ali
117e682835
test: simplify
2025-08-23 20:17:13 +03:00
ali
e7de51a2df
prevent duplicate global assignments when reverting helpers
2025-08-23 18:34:37 +03:00
ali
99cb90832a
test & correct last import index
...
Signed-off-by: ali <mohammed18200118@gmail.com>
2025-08-22 17:45:44 +03:00
ali
c5b1d30319
add global assignments after the imports
...
Signed-off-by: ali <mohammed18200118@gmail.com>
2025-08-22 15:52:15 +03:00
mohammed ahmed
f2e5cb2e90
Merge branch 'main' into fix/existing-top-level-cond-imports
2025-08-11 18:45:31 +03:00
mohammed
a7ff701309
eleminate the use of flat code for parsing
2025-08-06 22:48:03 +03:00
mohammed
989b1f30a2
unit tests fixing
2025-08-06 03:33:46 +03:00
mohammed
07a9365987
send&recieve markdown code
2025-08-06 01:09:42 +03:00
mohammed
3eee162d41
fix markdown context for formatting and more refactoring
2025-08-04 15:35:28 +03:00
mohammed
24f2785d38
new line
2025-07-31 16:54:52 +03:00
mohammed
c3b775fc68
avoid adding new imports existed in top level try/catch or if TYPE_CHECKING
2025-07-31 16:52:11 +03:00
mohammed
330bf91e73
fix code replacement tests
2025-07-25 15:39:47 +03:00
mohammed
190d5930ca
fix: tests expected code new lines
2025-06-29 00:44:02 +03:00
aseembits93
da9df78062
new tests
2025-06-13 17:27:45 -07:00
aseembits93
85ce164d6a
rstrip for comparing strings
2025-06-06 13:41:34 -07:00
aseembits93
6abb3df8ef
1 test failing
2025-06-06 13:24:17 -07:00
Aseem Saxena
62909dbc19
Update tests/test_code_replacement.py
2025-06-06 13:19:39 -07:00
aseembits93
0be74c4d52
Ready to review
2025-06-06 13:18:58 -07:00
aseembits93
c93b80e87b
Ready to review
2025-06-06 13:11:07 -07:00
aseembits93
a65569cfa0
tests
2025-06-06 12:30:30 -07:00
Saurabh Misra
14409f7a23
Revert helper functions definitions when they are not used anymore in the optimized FTO
2025-06-05 22:40:09 -07:00
aseembits93
6db4199cec
quick fix
2025-05-01 16:47:52 -07:00
aseembits93
44d9229eea
assignments with if/else blocks are not modified
2025-05-01 16:02:20 -07:00
aseembits93
b7d01a8f74
more tests
2025-05-01 15:30:41 -07:00
aseembits93
0cbd20451f
more tests with different positions of global variables and multiple reassignments
2025-05-01 15:25:50 -07:00
aseembits93
28596b7b55
refactoring to run only for code replacement before PR/behavior instead of code context extraction
2025-04-30 19:46:29 -07:00
aseembits93
3da7b739de
undoing some test modifications
2025-04-30 19:20:13 -07:00
aseembits93
abbaec3b5e
tests work now
2025-04-30 18:14:00 -07:00
aseembits93
18c989537e
still testing
2025-04-30 16:32:43 -07:00
aseembits93
38f0253c41
duplicate global statements need to be handled
2025-04-29 18:54:54 -07:00
aseembits93
08c8067630
some tests failing now
2025-04-29 18:34:40 -07:00
Alvin Ryanputra
ed55d88d2b
updated other tests
2025-04-17 18:58:28 -04:00