You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adjust the log message when --no-gen-test is used to avoid misleading output. Explicitly state that generation was skipped so operators don't misinterpret that tests were produced.
-logger.info(f"!lsp|Generated '{count_tests}' tests for '{self.function_to_optimize.function_name}'")+if self.args.no_gen_test:+ logger.info(f"!lsp|Skipped test generation for '{self.function_to_optimize.function_name}' due to --no-gen-test")+else:+ logger.info(f"!lsp|Generated '{count_tests}' tests for '{self.function_to_optimize.function_name}'")
Suggestion importance[1-10]: 6
__
Why: Updating the log when --no-gen-test is active improves accuracy and avoids confusion; it’s straightforward and contextually correct with minimal risk.
Low
Add backward-compatible plural flag
Normalize the flag name to plural to match phrasing elsewhere and reduce confusion. Keep a backward-compatible alias so existing scripts don't break.
parser.add_argument(
- "--no-gen-test", action="store_true", help="Do not generate tests, use only existing tests for optimization."+ "--no-gen-tests",+ "--no-gen-test",+ dest="no_gen_test",+ action="store_true",+ help="Do not generate tests; use only existing tests for optimization."
)
Suggestion importance[1-10]: 5
__
Why: Adding a plural alias enhances UX while preserving dest for compatibility; it’s a minor, correct improvement with modest impact.
Low
Possible issue
Keep counts consistent with outputs
Preserve count_tests consistency with generated_tests. If --no-gen-test is set, also set count_tests based on the empty list so downstream logic doesn't assume tests exist. This avoids mismatches between the reported number of tests and the actual generated list.
Why: Adjusting count_tests for --no-gen-test avoids a potential mismatch, but zeroing counts and nulling concolic_test_str/function_to_concolic_tests may be incorrect if concolic results were still computed. Partial correctness and uncertain impact lower the score.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
Codeflash Bot seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Only for internal testing
PR Type
Enhancement
Description
Add '--no-gen-test' CLI flag
Disable test generation when flag set
Honor flag in optimization test pipeline
Diagram Walkthrough
File Walkthrough
cli.py
Introduce '--no-gen-test' CLI argumentcodeflash/cli_cmds/cli.py
--no-gen-test.function_optimizer.py
Conditionally disable test generation in optimizercodeflash/optimization/function_optimizer.py
args.no_gen_testto skip generated tests.GeneratedTestsListwhen flag enabled.