Repository navigation
fix(scripts): require configured tags in script metadata - #963
Open
rudycelekli wants to merge 1 commit into
Open
rudycelekli wants to merge 1 commit into
rudycelekli wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Problem
Custom-script tag selection checks the subset in the opposite direction from the contract documented at the top of
src/scripts/mod.rs.For configuration
tags = ["core_approved", "example"]:["core_approved", "example", "extra"]is incorrectly excluded.["core_approved"]is incorrectly selected despite missing a required tag.An explicitly empty configured tag list also incorrectly excludes tagged scripts, even though it requires no tags.
Change
Require every configured tag to occur in the script metadata; permit additional script tags. Keep missing configuration opt-in behavior and exclusion of scripts without tag metadata. Extract the selection into a small helper so regression tests exercise the actual production selection logic without changing
HOME, reading personal configuration, running scripts, resolving hostnames, or scanning any addresses. Preserve rejected-script debug logging with safe optional path formatting.Verification
Native qualification on Ubuntu 24.04/current stable Rust, against base
937903340aa6266abb26e93ea3241026b3fd8150:cargo clippy -- --deny warnings,cargo clippy --tests -- --deny warnings,cargo fmt --check, andcargo doc --workspace --all-features --no-deps --document-private-itemspass.Owned qualification run checked out the exact public upstream source and verified the candidate tree
2e387b691a6575ed0fadb52eefd2b959ee9c486f. This is independent qualification, not an upstream CI result or a full platform-matrix run. Compilation and tests used an empty network namespace, unprivileged uid, and offline dependencies. No scans, DNS requests or scripts were executed.Prepared with AI assistance; the patch and test evidence were independently reviewed before submission.