import { Bundle, Capability, Capacity, CoreCount } from "./types"; /** @public */ export interface ValidationError { /** Stable machine-readable code for tests / structured logging. */ code: ValidationErrorCode; /** Human-readable message including the offending value. */ message: string; } /** @public */ export type ValidationErrorCode = "duplicateJobName" | "unknownJobNameInPlacement" | "selfReferenceInPlacement" | "contradictoryPlacement" | "mixedExclusiveGroup" | "singleUseRequiresExclusive" | "mixedSingleUseGroup" | "invalidRequirement" | "unsatisfiableCapacity" | "unsatisfiableCores" | "unsatisfiableCapability" | "emptyPoolName" | "unknownPoolName" | "unknownResiliencePool" | "resilienceUnsatisfiable"; /** * Outcome of validateBundle. An empty `errors` array means submission * is allowed; `warnings` may still be non-empty (capacity issues against * a cluster pool, where workers may join later). * * @public */ export interface ValidationResult { errors: ValidationError[]; warnings: ValidationError[]; } /** * Description of a configured pool, sufficient for static validation. A * pool's `nodeProfiles` represent the kinds of node available — for * elastic pools this is each allowed instance type's capability set; * for fixed cluster pools it's the actual registered nodes' capability * sets. Validation accepts a bundle if at least one profile in at least * one named pool can satisfy each requirement. * * `kind` controls whether an unsatisfied capacity / cores / capability * requirement becomes a hard `error` ("elastic"; candidateInstanceTypes * is operator-configured and time-invariant — if it doesn't fit, future * instances won't either) or a soft `warning` ("cluster"; live worker * inventory may change before placement runs). * * @public */ export interface PoolDescriptor { poolName: string; kind: "elastic" | "cluster"; nodeProfiles: NodeProfile[]; /** Distinct cloud/failure-domain keys the pool's tiers span (tier kinds). * Used for the resilience sameCloud cardinality check. */ clouds: string[]; } /** @public */ export interface NodeProfile { /** * Reference-workload-normalised compute score the node advertises * (or, for elastic pools, what the candidate instance type is * scored at). Used to statically reject bundles whose * `requiredCapacity` exceeds the largest profile available in any * candidate pool. */ totalCapacity: Capacity; totalCores: CoreCount; capabilities: Capability[]; } /** * Validate a Bundle against a set of configured pools. Returns all * findings (does not short-circuit on first one) so callers can surface * a complete list to the user. See `ValidationResult` for the * errors-vs-warnings split. * * @public */ export declare function validateBundle(bundle: Bundle, pools: PoolDescriptor[]): ValidationResult; //# sourceMappingURL=validation.d.ts.map