Repository navigation
feat(dupes): add an opt-in --fail-on-new gate for new duplication - #125
Merged
Merged
Conversation
With --since REV --fail-on-new, fensu dupes exits 1 when a cluster not hidden by [dupes] touches lines changed since REV, so CI can block new copies without failing on the existing backlog. The report says it is gated (JSON advisory is false). The default stays advisory. Also apply a clippy unwrap_or simplification the current stable toolchain requires in the roles path parser.
kvlonge
enabled auto-merge (squash)
November 5, 2026 04:45
Deploying fensu with
|
| Latest commit: |
0db20c6
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://db536aeb.fensu.pages.dev |
| Branch Preview URL: | https://feat-dupes-new-cluster-gate.fensu.pages.dev |
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.
Why
fensu dupesis advisory only, so a project that wants to stop new copies has no way to fail CI on them without also failing on its existing backlog.Changes
--fail-on-newflag (requires--since). It exits 1 when a cluster not hidden by[dupes](allowlist or contract exemptions) touches lines changed since the revision, and prints a failure line naming the remedy.advisoryisfalseunder the flag. Without the flag, output and exit codes are unchanged.unwrap_orsimplification in the roles path parser, which the current stable toolchain requires formake check-ci.Verification
cargo test -p fensu-cli --test dupes: 10 passed. The new table test covers a new copy failing, an allowlisted copy passing, an untouched existing cluster passing, the flag absent staying advisory, JSONadvisory: false, and the flag without--sinceexiting 2.make check-ci: exit 0.make test: 1350 passed, 12 skipped.