Conversation
…] TOML is parsed #[serde(default)] on a Vec<String> field calls Vec::default() (empty), not the struct-level impl Default. Replace with a named serde default function so invoke_skill and load_skill are always exempt regardless of whether [tools.utility] is present or partially specified in config. Also update impl Default to call the same function, eliminating the duplicate literal. Closes #3245
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
#[serde(default)]onUtilityScoringConfig.exempt_toolswith#[serde(default = "default_utility_exempt_tools")]so the named function (returning["invoke_skill", "load_skill"]) is used even when[tools.utility]is partially specified in configimpl Defaultto call the same function instead of duplicating the literalutility_partial_toml_exempt_tools_uses_default_not_empty_vecRoot Cause
#[serde(default)]on aVec<String>field callsVec::default()(empty vec), not the struct-levelimpl Default. This causedinvoke_skillandload_skillto be blocked by the utility gate whenever any[tools.utility]key was present in the config.Test Plan
cargo nextest run -p zeph-tools --lib— 1054 passedcargo clippy -p zeph-tools -- -D warnings— cleancargo +nightly fmt --check— cleanCloses #3245