Add Dry Run Mode to Culprit Finder #112
Draft
+95
−5
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.
This PR introduces a dry run mode to the
culprit_findertool. This mode allows users to simulate the bisection process and visualize the steps it would take (branch creation, workflow triggering, and branch deletion) without making any actual state-changing API calls to GitHub.Key Changes
Core Logic (
culprit_finder.py)dry_runparameter to theCulpritFinderconstructor._test_committo skip triggering GitHub workflows whendry_runis enabled, returningTrueby default to allow the bisection loop to proceed.run_bisectionto:create_branchanddelete_branch.CLI Interface (
cli.py&README.md)--dry-runflag to the CLI.--dry-runis used, the script will exit after the simulation without attempting to print a final culprit (since no real testing occurred).Testing (
test_culprit_finder.py&test_cli.py)test_run_bisection_dry_run: Verifies that no state-changing API calls (create_branch,delete_branch,trigger_workflow) are made.test_test_commit_dry_run: Ensures_test_commitbehaves correctly in dry run mode.How to use
Run the culprit finder with the
--dry-runflag: