Help us shape the future of Go! Take the 2026 Go Developer Survey

provider

package
v0.4.23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

README

Provider conformance profile v1

Implementation candidate for v0.4.22. Import github.com/mcpdev80/baseharbor/conformance/provider/v1 from your own Go module and pin the tested BaseHarbor commit (or v0.4.22 after publication).

This public entry point calls the existing Provider Integration Contract harness. It does not introduce another lifecycle implementation or combine capability, runtime and development contract families. Artifact trust is separate.

Fixture

Supply Target with your IntegrationDescriptor, Request, driver and stable disposable application identity. The driver implements Descriptor, Preflight, Provision, Bind, Verify and ConformanceStateDigest. The fingerprint excludes volatile output and credentials, but changes when owned provider state changes. The profile rejects a missing fingerprint hook rather than claiming side-effect verification without observable state.

Use isolated test infrastructure: the suite provisions and binds the supplied resource. Never point it at production resources. The descriptor names the provider's supported capabilities/scopes and observability limitations explicitly. An optional unsupported scope fixture proves fail-closed placement.

Invoke

report := provider.RunFull(ctx, target)
if err := provider.WriteJSON(os.Stdout, report); err != nil {
    os.Exit(2)
}
os.Exit(provider.ExitCode(report))

ctx is your bounded context and target contains your adapter/fixtures. Results have schema_version=baseharbor.provider-conformance/v1, profile=provider-contract/v1 and contract=baseharbor.provider/v1. Exit 0 means all executed checks passed; exit 1 means failed conformance; the sample uses exit 2 for a report I/O error. No timestamps or private infrastructure are required.

The initial public profile runs descriptor, driver identity, placement, preflight, state fingerprint, provision/bind, readiness and repeated convergence checks. Raw provider error messages are suppressed from public reports because they can contain credentials; failed check names identify the contract violation.

Independent module proof

The testdata/external fixture is a separate module with its own driver, importing only the public API. From that directory:

go run -mod=mod .

The repository test TestExternalModuleCanRunPublicProfileWithoutInternalImports executes that module and checks its JSON/pass result. The local replace in the fixture is solely for testing this checkout; external consumers pin the public module revision normally.

Run provides the lifecycle-only suite (suite=lifecycle). Release semantic acceptance uses RunFull (suite=full), which retains the existing lifecycle harness and adds the retained fault/recovery/ownership scenarios: observable drift and stable-identity repair, side-effect-free outage rejection and recovery, failed provisioning/binding/verification with convergent retries, foreign-ownership blocking before mutation, sibling-safe destroy, owned destroy and repeated destroy.

For full acceptance, the isolated fixture implements ReconciliationDriver, Drifter, Destroyer, FaultFixture and OwnershipFixture as well as StateDigester. SetFailure(FailureNone) clears a fault; fault controls and operational counters must not change state fingerprints. ConformanceDrift must visibly change owned state. Destroy uses the exact immutable application/kind/name/provider resource identity and refuses a sibling application. Missing hooks fail the full suite; they are never skipped. The full run destroys the disposable resource, so reruns need a clean fixture.

Discover the public provider contract at docs/spec/provider-contract-v1.md, this profile at conformance/provider/v1, and its machine-readable discovery artifact at contracts/conformance/provider/v1/profile.json. These artifacts are versioned together in the public Go module; pin an immutable BaseHarbor source commit during pre-release or the release module version after publication. New public contract families publish separate profile paths and versions without changing provider v1.

Documentation

Overview

Package provider exposes the existing Provider Integration Contract harness to external Go modules. Behavioral profiles are independent of artifact trust.

Index

Constants

View Source
const (
	FailureNone             = providerconformance.FailureNone
	FailureUnavailable      = providerconformance.FailureUnavailable
	FailureProvision        = providerconformance.FailureProvision
	FailureMalformedBinding = providerconformance.FailureMalformedBinding
	FailureVerify           = providerconformance.FailureVerify
	OwnershipBaseHarbor     = reconciliation.OwnershipBaseHarbor
	OwnershipForeign        = reconciliation.OwnershipForeign
	ProtocolVersion         = capability.ProviderProtocolV1
	ScopeApplication        = capability.ScopeApplication
	ScopeShared             = capability.ScopeShared
	ScopeExternal           = capability.ScopeExternal
)
View Source
const ProfileID = "provider-contract/v1"
View Source
const ReportVersion = "baseharbor.provider-conformance/v1"

Variables

This section is empty.

Functions

func ExitCode

func ExitCode(report Report) int

ExitCode is suitable for the caller's conformance runner process.

func WriteJSON

func WriteJSON(out io.Writer, report Report) error

WriteJSON emits one deterministic report without timestamps or terminal text.

Types

type Binding

type Binding = capability.Binding

type Check

type Check = providerconformance.Check

type Desired

type Desired = reconciliation.Desired

type Destroyer

type Destroyer = providerconformance.Destroyer

type Drifter

type Drifter = providerconformance.Drifter

type Driver

type Driver = capability.Driver

Public aliases let external implementers satisfy the same Core interfaces without importing internal packages or maintaining a parallel protocol.

type FailureMode

type FailureMode = providerconformance.FailureMode

type FaultFixture

type FaultFixture = providerconformance.FaultFixture

type HTTPExposureBinding

type HTTPExposureBinding = capability.HTTPExposureBinding

type IdentityBinding

type IdentityBinding = capability.IdentityBinding

type IntegrationDescriptor

type IntegrationDescriptor = capability.IntegrationDescriptor

type Kind

type Kind = capability.Kind

type LogsBinding

type LogsBinding = capability.LogsBinding

type MetricsBinding

type MetricsBinding = capability.MetricsBinding

type OTLPTelemetryBinding

type OTLPTelemetryBinding = capability.OTLPTelemetryBinding

type ObjectStorageS3Binding

type ObjectStorageS3Binding = capability.ObjectStorageS3Binding

type Observed

type Observed = reconciliation.Observed

type OptionalLifecycleSupport

type OptionalLifecycleSupport = capability.OptionalLifecycleSupport

type Ownership

type Ownership = reconciliation.Ownership

type Profile

type Profile struct {
	ID                  string   `json:"id"`
	Contract            string   `json:"contract"`
	ReportVersion       string   `json:"report_version"`
	FixtureRequirements []string `json:"fixture_requirements"`
}

func Describe

func Describe() Profile

type Provider

type Provider = capability.Provider

type ProviderInterface

type ProviderInterface = capability.ProviderInterface

type ProviderKind

type ProviderKind = capability.ProviderKind

type ProviderObservability

type ProviderObservability = capability.ProviderObservability

type ProviderObservabilitySignal

type ProviderObservabilitySignal = capability.ProviderObservabilitySignal

type ProviderOperationObservation

type ProviderOperationObservation = capability.ProviderOperationObservation

type ProviderOperationObserver

type ProviderOperationObserver = capability.ProviderOperationObserver

type ProviderScope

type ProviderScope = capability.ProviderScope

type ReconciliationDriver

type ReconciliationDriver = capability.ReconciliationDriver

type Report

type Report struct {
	SchemaVersion string `json:"schema_version"`
	Profile       string `json:"profile"`
	Contract      string `json:"contract"`
	Suite         string `json:"suite"`
	providerconformance.Report
}

func Run

func Run(ctx context.Context, target Target) Report

Run uses the original harness without replacing its lifecycle implementation. The caller must provide isolated test infrastructure; this provisions data.

func RunFull

func RunFull(ctx context.Context, target Target) Report

RunFull exercises the retained fault/recovery and ownership suite in addition to the core lifecycle. Missing fixture hooks fail; they never become skips.

type Request

type Request = capability.Request

type Requirement

type Requirement = capability.Requirement

type Resource

type Resource = capability.Resource

type SecureBinding

type SecureBinding = capability.SecureBinding

type ServiceKind

type ServiceKind = capability.ServiceKind

type SpecificationID

type SpecificationID = capability.SpecificationID

type Status

type Status = providerconformance.Status

type Target

type Target = providerconformance.Target

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL