Deepen run decisions for skip controls#63
Merged
Conversation
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.
This pull request refactors how the pre-push workflow decides which checks to run or skip, replacing the old "run plan" logic with a more robust "run decision" system. It introduces a centralized decision model for handling skip controls, clearer skip reasons, and improved test coverage for these behaviors. The main goal is to make the logic for skipping checks (like "skip all checks" or "skip AI check") more explicit, maintainable, and testable.
Key changes:
Skip Control Refactor and Centralization
SkipControlStatestructure with anactivefield to represent which skip control (if any) is active, and acreateSkipControlStatehelper to construct it. This replaces the previous boolean flags and makes skip logic more explicit and extensible. [1] [2]buildGitPushArgsand related CLI code to use the newSkipControlStatestructure, ensuring consistent skip control handling throughout the CLI and workflow. [1] [2] [3] [4]Decision Modeling for Pre-Push Workflow
PrePushRunPlanwith a new decision-based model (PrePushRunDecision,PrePushConfigDecision, etc.) inrun-decisions.ts. These types and functions provide a clearer, more granular way to represent and reason about which phases (deterministic checks, local AI, changed file resolution) should run or be skipped, and why. [1] [2] [3] [4] [5] [6]Workflow and Test Updates
runPrePushWorkflow) and related helper functions to use the new decision types, ensuring all phases respect the new skip logic and reasons. [1] [2] [3] [4] [5]run-plan.tsand its related types and functions.These changes make the workflow's decision-making easier to understand, extend, and test, and provide better feedback to users about why certain checks are skipped.