Harden category filter matching and validation - #3569
Conversation
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
db0fe36 to
22f5c6a
Compare
|
Rebased cleanly onto current |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 22f5c6a9c7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Code review
Reviewed the category-filtering hardening (case-insensitive matching + validation of unmatched/zero-match run/ignore categories).
Summary of changes
ModuleConditionHandler: run/ignore category checks now useStringComparer.OrdinalIgnoreCase, matching the comparer already used byDependsOnModulesInCategoryAttributeand module tags elsewhere in the codebase.OptionsValidator: the existing Run/Ignore conflict check is now case-insensitive, and a newValidateRegisteredCategoriesstep resolves all registered modules' finalized metadata (viaIModuleMetadataRegistry) to catch typo'd/unregistered categories andRunOnlyCategoriesfilters that would silently select zero modules.- Docs and tests updated to match.
What I checked
- Module resolution:
services.GetServices<IModule>()in the new validator doesn't introduce new eager/expensive construction — modules are already registered as singletons and are already resolved earlier inPipelineImpl.CreateAsyncbefore anyIPipelineValidatorruns (DependencyValidator/ModuleConfigurationValidatoralready do the same).FinalizeMetadatais idempotent (Lazy<T>cache keyed by module type), so calling it again here is a cheap no-op, not duplicated construction/side effects. - Category resolution can't be derived from a pure
Typeattribute scan alone — it also honors registration-timeWithCategory()overrides,Configuration.Category, andITaggedModule.Category— so resolving through the already-constructed singleton instance, as this PR does, is the correct approach. - Test coverage looks solid: case-insensitive match/skip behavior for both Run and Ignore categories, conflict detection with mixed case, fully-unmatched vs partially-unmatched
RunOnlyCategories, unmatchedIgnoreCategories, and a "no false positive" test confirming matching categories don't raise errors. - This closes #3489 and brings category matching in line with the case-insensitivity already used for tags elsewhere in the codebase, so the new behavior is consistent rather than a one-off special case.
No bugs or CLAUDE.md violations found. This turns a previously silent "green but ran nothing" failure mode into an explicit validation error, which is a solid UX/correctness improvement. Nice work.
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
ReviewSolid, well-scoped fix for #3489. Case-insensitive matching in One design gap worth considering before merge:
That's a real footgun: Suggested fix: either (a) extend the interface so category-vs-registered-module validation has an explicit signature that takes the known categories/modules (e.g. an overload Nothing else stood out — the |
eabaa55 to
3e914d9
Compare
|
Investigated the Ubuntu pipeline failure: the only failing test was unrelated Rebased onto current Validation after rebase:
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Code reviewRe-reviewed at The rest of the change is solid: One design gap from the earlier review is still unresolved: This means the two public entry points on Suggested fix (still preferred over just updating the doc comment): give the category-vs-registered-module check an explicit signature that takes the known categories (e.g. Nothing else stood out on this pass — the |
Match category names case-insensitively and reject filters that reference no registered modules, preventing typoed run filters from producing green no-op pipelines. Closes #3489.
3e914d9 to
daa2768
Compare
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Code reviewRe-reviewed after the rebase onto current The previously flagged design gap is still unresolved: This still means the two public entry points on Suggested fix (unchanged from before, still preferred over just updating the doc comment): give the category-vs-registered-module check an explicit signature that takes the known categories (e.g. Nothing else new — the rebase didn't introduce any regressions, and everything else (OrdinalIgnoreCase consistency, the |
|
Closed the remaining validation-contract gap: IOptionsValidator now exposes category-aware validation, and the DI path routes through the same implementation. Added direct-consumer regression coverage. ValidationTests pass (37/37); core Release build has 0 errors. The previously fixed P1 thread is now resolved. Branch updated from main. @codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 11d75b4bc9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f62d339fc7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Code reviewRe-reviewed at The previously flagged P1 design gap is now resolved.
The follow-up normalization fix is also correct. Everything else holds up from prior passes:
No further issues. This is a solid, well-scoped hardening of category filtering — nice work closing out the review thread across the iterations. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Code reviewRe-reviewed at ValidationResult ValidateOptions(
PipelineOptions options,
IReadOnlySet<string> registeredCategories) => ValidateOptions(options);This is a good, low-risk fix for a real gap:
Test coverage ( No bugs or CLAUDE.md violations found in this delta. Combined with the prior rounds (case-insensitive category matching, zero-selection/unknown-category validation, normalization of caller-supplied comparers, and the dual-entrypoint validator split), this PR looks solid and ready to merge. |
Summary
RunOnlyCategoriesandIgnoreCategorieswithStringComparer.OrdinalIgnoreCaseIOptionsValidatorimplementations through a default overloadValidation
RunnableCategoryTests: 5/5 passedValidationTests: 39/39 passedIOptionsValidatorimplementation regression passedModularPipelines.slnRelease build: 0 errors (227 existing warnings)Closes #3489