You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary: Clean, correct refactor. Code is moved verbatim — no logic changes, no behavior delta. Module boundary is now sensibly cohesive.
What's good:
built_in_harness_profiles, provider_routes_equal, wildcard_pattern_matches, and wildcard_chars_match all belong in harness.rs; having them split across lib.rs was the original debt.
Re-export path (pub use harness::{..., built_in_harness_profiles}) is preserved so all existing callers (including the lib.rs:584 internal use in resolve_harness_profile) continue to compile without change.
OnceLock initialization in built_in_harness_profiles is correct; lazy-static allocation is appropriate here.
One flag — missing test coverage (harness.rs has no #[cfg(test)] block at all):
The private helpers wildcard_chars_match / wildcard_pattern_matches carry all the pattern-matching logic for profile resolution, and provider_routes_equal depends on ProviderKind::parse behavior that may change. Moving these helpers into their own module is the right moment to lock in a few unit tests before the resolver is wired into runtime slices.
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
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
crates/config/src/harness.rsbuilt_in_harness_profilesre-exported from the crate root so existing callers keep workingHarvested from PR #3506 by @Hmbown.
Refs #3311.
Verification
cargo fmt --all --checkcargo test -p codewhale-config --locked harnesscargo test -p codewhale-config --lockedgit diff --check