Add fail_fast option to policies and update related configurations#76
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 introduces a new
fail_fastoption for built-in policy checks (diff_sizeandforbidden_paths), allowing configuration of whether a blocking violation should prevent later deterministic checks from running. The change is fully documented, validated, and tested across configuration, schema, runner logic, and documentation.Key changes include:
Fail-fast policy configuration and behavior:
fail_fastboolean option to bothdiff_sizeandforbidden_pathspolicy configs, with schema and type updates (pushgate-config-v2.schema.json,src/config/types.ts,src/config/normalize.ts). This controls whether a blocking policy violation stops subsequent deterministic checks. [1] [2] [3] [4] [5] [6] [7]fail_fastsetting, so that iffail_fastis true and a blocking violation occurs, later checks are skipped. [1] [2] [3]Documentation and configuration examples:
fail_fastoption indocs/reference/configuration.mdand added it to example YAML configs. [1] [2] [3] [4] [5] [6]Testing and validation:
fail_fastoption, including explicit tests for fail-fast vs. aggregate behavior. [1] [2] [3] [4] [5] [6] [7]