fix(filter): apply defaults.tags.exclude to mappings with own tags#90
Merged
Conversation
Resolution was `mapping.tags.or(defaults.tags)` -- a whole-block override. Any mapping that defined its own `tags:` block silently dropped every field under `defaults.tags`, including `exclude:` patterns the operator expected to apply project-wide. Now mapping fields override defaults field by field. The two `exclude` lists are kept on separate tiers so `include:` can act as an escape hatch: - `defaults.tags.exclude:` (soft tier) joins the built-in prerelease list and is bypassable by `include:` on any mapping. Use for project-wide opinions like "drop *-dev unless I say otherwise." - `mapping.tags.exclude:` (hard tier) blocks `include:` on the same mapping. Use for absolute per-mapping denies. The dry-run drop report attributes each dropped tag to its tier (`exclude (mapping)` / `exclude (defaults)` / `exclude (built-in)`) so operators can tell which knob to turn. Behavior change: pre-fix, `defaults.tags.exclude:` was hard tier whenever the mapping had no `tags:` block (because the whole defaults block was inherited as the mapping's). Operators relying on `defaults.exclude` blocking an `include:` pattern should move that exclude to `mapping.tags.exclude:` (still hard tier).
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.
Summary
defaults.tags.exclude:was silently dropped for any mapping with its owntags:block. Resolution was a whole-block override (mapping.tags.or(defaults.tags)); now it's a field-level merge.defaults.tags.exclude:+ built-in prerelease list) is bypassable byinclude:on any mapping. Project-wide opinions.mapping.tags.exclude:) blocksinclude:on the same mapping. Absolute per-mapping denies.--dry-rundrop report attributes each tag to its tier:exclude (mapping)/exclude (defaults)/exclude (built-in).defaults.excludeblocking aninclude:pattern -- migration note added inconfiguration.md.Test plan
resolve_immutable_patternhelper covers partial-set edge casescargo test --workspace --locked)cargo fmt --all -- --checkcleancargo clippy --workspace --all-targets --locked -- -D warningscleancargo deny checkcleannpm run --prefix docs buildclean (docs match new behavior)docs/src/content/configuration.mdto confirm wording is clear for operators with existingdefaults.excludeconfigs.