Add --fail-on CI gating with exit code 2 - #166
Merged
Merged
Conversation
--fail-on regression,failure-rate>N turns ci-snitch into a CI gate: exit 2 when conditions match findings (distinct from 1 = operational error so pipelines can tell 'the data tripped the gate' from 'the tool broke'), with one fail-on: reason per tripped finding on stderr — printed even in quiet mode, since telling CI why is the whole point. Conditions are validated before any network call. Completes the U section. (ROADMAP U6)
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.
Fixes ROADMAP U6 — completes the U (CLI & output UX) section.
ci-snitch analyze --fail-on regression,failure-rate>25makes the tool usable as a CI gate:fail-on: <reason>line per tripped finding on stderr, printed even with-q(telling CI why is the point)--fail-on boguserrors instantly)regression(post-BH-correction regression category) andfailure-rate>NTests: parse table (valid/invalid specs, threshold bounds), evaluator (trips/doesn't/speedup-isn't-regression), exit-code error contract. New-code contract tests rather than red-first (no prior behavior to break).
Live: cli/cli
--fail-on regressionexits 2 with three named regressions;failure-rate>90exits 0;--fail-on boguserrors before fetching.