Skip to content

Deepen run decisions for skip controls#63

Merged
dbrosio3 merged 1 commit into
mainfrom
codex/run-decisions-and-skip-controls
Jun 24, 2026
Merged

Deepen run decisions for skip controls#63
dbrosio3 merged 1 commit into
mainfrom
codex/run-decisions-and-skip-controls

Conversation

@dbrosio3

Copy link
Copy Markdown
Member

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

  • Introduced a new SkipControlState structure with an active field to represent which skip control (if any) is active, and a createSkipControlState helper to construct it. This replaces the previous boolean flags and makes skip logic more explicit and extensible. [1] [2]
  • Updated buildGitPushArgs and related CLI code to use the new SkipControlState structure, ensuring consistent skip control handling throughout the CLI and workflow. [1] [2] [3] [4]

Decision Modeling for Pre-Push Workflow

  • Replaced the old PrePushRunPlan with a new decision-based model (PrePushRunDecision, PrePushConfigDecision, etc.) in run-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]
  • Added explicit, user-visible skip reasons with formatting helpers, so users see clear messages when checks are skipped due to config or skip controls. [1] [2]

Workflow and Test Updates

  • Updated the pre-push workflow (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]
  • Replaced and expanded tests to cover the new decision logic, including all combinations of skip controls and configuration, and verifying user-visible skip messages. [1] [2] [3] [4]
  • Removed the obsolete run-plan.ts and 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.

@dbrosio3 dbrosio3 merged commit 0401d7a into main Jun 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant