@@ -41,22 +41,39 @@ extension GitHub.ContinuousIntegration.Validation {
4141 /// invocation wants; a sweep over a foreign checkout names it.
4242 public let organizationsFile : String ?
4343
44+ /// A caller-supplied organization set. This is the compiled-control
45+ /// path: the Institute policy owner can provide its typed set directly
46+ /// without recreating the retired YAML transport beside the subject.
47+ public let organizations : Organizations ?
48+
4449 /// The burn-down ledger. `nil` is an empty ledger.
4550 public let baselineFile : String ?
4651
4752 public init ( organizationsFile: String ? = nil , baselineFile: String ? = nil ) {
4853 self . organizationsFile = organizationsFile
54+ self . organizations = nil
55+ self . baselineFile = baselineFile
56+ }
57+
58+ public init ( organizations: Organizations , baselineFile: String ? = nil ) {
59+ self . organizationsFile = nil
60+ self . organizations = organizations
4961 self . baselineFile = baselineFile
5062 }
5163
5264 public func findings( in subject: Subject ) throws ( EnvironmentDefect) -> [ Finding ] {
53- let manifestPath =
54- organizationsFile
55- ?? Organizations . locateManifest ( startingAt: subject. root)
56- guard let manifestPath else {
57- throw . missingSupportFile( path: Organizations . manifestPath)
65+ let organizations : Organizations
66+ if let supplied = self . organizations {
67+ organizations = supplied
68+ } else {
69+ let manifestPath =
70+ organizationsFile
71+ ?? Organizations . locateManifest ( startingAt: subject. root)
72+ guard let manifestPath else {
73+ throw . missingSupportFile( path: Organizations . manifestPath)
74+ }
75+ organizations = try Organizations . read ( at: manifestPath)
5876 }
59- let organizations = try Organizations . read ( at: manifestPath)
6077 let baseline = try Baseline . read ( at: baselineFile)
6178
6279 var findings : [ Finding ] = [ ]
0 commit comments