Paired Implementation Consistency
Compares sibling class implementations for opposite boolean polarity on the same predicate.
Why this rule exists
Parallel implementations of the same behavior with inverted predicates usually indicate a copy/paste logic bug rather than an intentional difference.
Code example
+ // FooValidator and BarValidator disagree on the same IsActive check
+ if (!user.IsActive) return;
+ if (user.IsActive) return;+ // Both validators use the same polarity or document why they differConfiguration
Disable or adjust the severity of this rule in .gauntletci.json:
{
"rules": {
"GCI0058": { "enabled": true, "severity": "Block" }
}
}See Configuration for the full schema.
Related rules
Behavioral Change Detection
Detects removed logic (Warn), incompatible method signature changes (Block), backward-compatible extensions (Info), and cryptographic boundary changes (Block).
Pattern Consistency Deviation
Detects mixed sync/async naming conventions and service locator anti-patterns introduced inconsistently within the same file.
Real-world evidence
Implemented in src/GauntletCI.Core/Rules/Implementations/GCI0058_*.cs.
Eric Cogen -- Founder, GauntletCI
Twenty years as a senior technical consultant building and modernizing enterprise platforms across .NET, AWS, serverless, microservices, and AI-driven systems.
