fix: warn and error on unmatched catalog IDs in Mobilize#185
Merged
Conversation
## What Add warning logs for each requested catalog that doesn't match any available evaluation suite, and return an error when no requested catalogs match at all. ## Why Mobilize() silently skipped unmatched catalog IDs, causing zero suites to execute with no indication of misconfiguration. This made it very difficult to diagnose when a plugin's catalog IDs changed (e.g., osps-baseline → osps-baseline-2026-02) and downstream consumers hadn't updated their configs. ## Notes - Partial matches (some catalogs found, some not) log warnings but still succeed — this avoids breaking configs that intentionally list catalogs not supported by every plugin - Total misses (zero suites executed) return a new NO_MATCHING_CATALOGS error that includes both the requested and available catalog IDs - The error message format is designed to make the fix obvious to the user without needing to inspect plugin internals Signed-off-by: jmeridth <jmeridth@gmail.com>
e588614 to
376b3a1
Compare
eddie-knight
approved these changes
Mar 30, 2026
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.
Related privateerproj/privateer#214
What
Add warning logs for each requested catalog that doesn't match any available evaluation suite, return an error when no requested catalogs match at all, and clear
Evaluation_Suitesat the start ofMobilize()to ensure idempotent behavior on repeated calls.Why
Mobilize() silently skipped unmatched catalog IDs, causing zero suites to execute with no indication of misconfiguration. This made it difficult to diagnose when a plugin's catalog IDs changed (e.g.,
osps-baseline→osps-baseline-2026-02) and downstream consumers hadn't updated their configs. This caused a silent integration test failure in privateerproj/privateer.Notes
NO_MATCHING_CATALOGSerror that includes both the requested and available catalog IDs, making the fix obvious without inspecting plugin internalsEvaluation_Suitesis now cleared at the top ofMobilize()to prevent stale results from a prior call masking a zero-match on subsequent callsTesting
TestEvaluationOrchestrator_Mobilize_UnmatchedCatalogswith three subtests:NO_MATCHING_CATALOGSerror when zero suites matchgo vet ./...,go test ./...,golangci-lint run ./...)