Documentation
¶
Overview ¶
Package conformance provides small Windmill readiness probes and report aggregation for chassis services.
It intentionally checks L0-L2 runtime evidence plus L3 declaration evidence only. Durable outbox and domain-event behavior remain service/addon concerns.
Index ¶
Constants ¶
const ( ReqAcceptsXTraceID = "accepts_x_trace_id" ReqEmitsProblemJSONErrors = "emits_problem_json_errors" ReqScopedBearerAuthOnMutatingRoutes = "scoped_bearer_auth_on_mutating_routes" ReqErrorProblemJSONRetryClass = "error_problem_json_retry_class" ReqCapabilityManifest = "capability_manifest" ReqIdempotencyKeyReplayForMutating = "idempotency_key_replay_for_mutating_routes" ReqIdempotencyStoreDeclared = "idempotency_store_declared" ReqIdempotencyKeyTenantScoped = "idempotency_key_tenant_scoped" ReqOutboxOrEquivalentDeclared = "chassis_outbox_or_equivalent_declared" ReqDomainEventsTraceAndEntityRefs = "domain_events_preserve_trace_and_entity_refs" ReqDurableStoreRequiredForL2Production = "durable_store_required_for_l2_prod" )
Requirement names mirror testdata/windmill/contracts/conformance.yaml.
const (
ContractVersion = orchestration.DefaultContractVersion
)
Variables ¶
This section is empty.
Functions ¶
func AcceptsTraceID ¶
AcceptsTraceID reports whether traceID is acceptable at ingress. It allows the bounded legacy tr_[0-9a-f]{12} migration form but new IDs must be canonical.
func RequirementsFor ¶
RequirementsFor returns cumulative requirement names for the target level.
func ValidCanonicalTraceID ¶
ValidCanonicalTraceID reports whether traceID matches the generated canonical X-Trace-ID format tr_[0-9a-f]{32}.
Types ¶
type Evidence ¶
type Evidence struct {
AcceptsXTraceID bool
EmitsProblemJSONErrors bool
ErrorProblemJSONRetryClass bool
ScopedBearerAuthOnMutatingRoutes bool
CapabilityManifest bool
Manifest *orchestration.Manifest
IdempotencyKeyReplayForMutating bool
IdempotencyStoreDeclared bool
IdempotencyKeyTenantScoped bool
OutboxOrEquivalentDeclared bool
DomainEventsTraceAndEntityRefs bool
}
Evidence is caller-supplied proof collected from runtime probes, fixtures, or service metadata. Check interprets Manifest when present, so callers do not need to set CapabilityManifest or IdempotencyStoreDeclared separately.
type IdempotencyReplayObservation ¶
type IdempotencyReplayObservation struct {
FirstStatus int
ReplayStatus int
FirstBody []byte
ReplayBody []byte
ReplayHeader http.Header
}
IdempotencyReplayObservation captures first/replay responses for the same tenant and idempotency key.
type Level ¶
type Level string
Level is a cumulative Windmill readiness target.
func LevelForProfile ¶
func LevelForProfile(profile orchestration.Profile) Level
LevelForProfile maps an orchestration manifest profile to the closest cumulative conformance level. CLI/daemon profiles are not HTTP readiness levels and therefore return an empty Level.
type ProbeResult ¶
type ProbeResult struct {
Passed bool `json:"passed"`
Reason string `json:"reason,omitempty"`
Details map[string]any `json:"details,omitempty"`
}
ProbeResult is returned by individual probe helpers.
func ProbeIdempotencyReplay ¶
func ProbeIdempotencyReplay(obs IdempotencyReplayObservation) ProbeResult
ProbeIdempotencyReplay validates same-tenant idempotency replay behavior.
func ProbeManifest ¶
func ProbeManifest(body []byte) (orchestration.Manifest, ProbeResult)
ProbeManifest validates a capability manifest response body.
func ProbeProblemJSON ¶
func ProbeProblemJSON(obs ProblemObservation) ProbeResult
ProbeProblemJSON validates the Windmill problem+json shape used for L0/L1.
func ProbeTenantIsolation ¶
func ProbeTenantIsolation(obs TenantIsolationObservation) ProbeResult
ProbeTenantIsolation validates that a same idempotency key in tenant B is not replayed from tenant A.
type ProblemObservation ¶
ProblemObservation captures an HTTP problem response for validation.
type Report ¶
type Report struct {
Level Level `json:"level"`
Passed bool `json:"passed"`
Checked []string `json:"checked"`
Missing []string `json:"missing,omitempty"`
Warnings []string `json:"warnings,omitempty"`
L3DeclarationOnly bool `json:"l3_declaration_only,omitempty"`
ManifestContractVersion string `json:"manifest_contract_version,omitempty"`
ManifestProfile string `json:"manifest_profile,omitempty"`
}
Report is the result of evaluating evidence against a target level.
func (Report) SortedMissing ¶
SortedMissing returns a copy of the missing requirements in stable order.