feat: Parallelizing test generation phase - #86
Merged
Merged
Conversation
Signed-off-by: Hailun Ding <hailun.ding@ibm.com>
dhl123
marked this pull request as ready for review
September 29, 2026 15:15
Signed-off-by: Hailun Ding <hailun.ding@ibm.com>
Member
|
@dhl123 can you please merge main and resolve conflicts? |
Signed-off-by: Hailun Ding <hailun.ding@ibm.com>
Signed-off-by: Hailun Ding <hailun.ding@ibm.com>
Signed-off-by: Hailun Ding <hailun.ding@ibm.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
smith --flag test_generationruns four LLM stages — decompose → grey_condition → variable_extraction → case_generation. WithBATCH_PROCESSING=true, each split its input into batches and sent one gateway request per batch in a serial loop, waiting for each response before issuing the next.Now they are parallelized exactly as translation does. This applies the pattern established in
extract_tool_args.pyto the generation side.GENERATION_CONCURRENCY=1 (or -1)reproduces the old serial path exactly — no pool is createdCloses: #84
Changes
src/smith/test_generation/concurrency.pyresolve_generation_concurrency()+ sharedrun_batches()src/smith/test_generation/decompose.pyrun_batches; intra-batch pairing moved inside the workersrc/smith/test_generation/grey_condition.pyrun_batchessrc/smith/test_generation/variable_extraction.pyrun_batchessrc/smith/test_generation/case_generation.pyrun_batchessrc/smith/cli.pyGENERATION_CONCURRENCYonce, thread it throughgenerate_testtests/integration/fakes.pyFakeOpenAIthread safety + content-keyedby_promptmodetests/integration/test_generation_unit.py.env_templateGENERATION_CONCURRENCY=4docs/content/docs/configuration.mdTRANSLATION_CONCURRENCYdefault inconsistencyCLAUDE.mdCHANGELOG.md### AddedentryChecks
make cipasses (lint, Rego lint, license headers, build smoke)make testpasses (policy scorecard — needed if policy behavior changed)CHANGELOG.mdupdated under## [Unreleased](if user-facing)feat:,fix:,test:,docs:,chore:, orrefactor:)git commit -s)Notes (optional)
Design sketch, screenshots, or extra context.