namespace ControlPlane.Core.Models; public enum ConformanceViolation { OK, Missing, Diverged, Stale } public enum ConformanceSeverity { OK, Info, Warning, Critical } /// /// The conformance state of one branch in the TBD ladder relative to its upstream source. /// public record BranchConformanceCheck( string Branch, string? SourceBranch, // the upstream branch this is derived from (null for trunk) ConformanceViolation Violation, ConformanceSeverity Severity, string Detail, int AheadOfSource, // commits this branch has that source doesn't — diverged int BehindSource, // commits source has that this branch doesn't — pending promotion string? FixSha // source tip SHA — used when resetting to fix divergence ); /// /// Full TBD conformance report for a single repository. /// IsConformant = no Diverged or Missing violations exist. /// public record ConformanceReport( string Repo, bool IsConformant, BranchConformanceCheck[] Checks );