Skip to main content

Module adapters

Module adapters 

Source
Expand description

Per-ecosystem release adapters behind the ReleaseAdapter trait (ADR-0002).

One module per ecosystem — cargo (rust), node, python, go, homebrew, binary — each implementing the trait’s dry_run / build / publish / verify steps that the coordinator drives through the phase barriers. Selection is runtime dispatch over an enum-backed registry (EcosystemAdapter, resolved from the contract’s Adapter identity by resolve); all adapters are compiled in and the resolve match is exhaustive over the adapter enum, so an unwired variant is a compile error, never a mid-release surprise. The coordinator owns tagging — there is deliberately no tag() method on the trait, which is what structurally enforces “tag once, after all publishes”.

§Injected effects, per-target isolation

Every method takes an EffectCtx (the ADR-0001 ports: CommandRunner, Clock, RegistryQuery) so an adapter is unit-testable against a recording fake and never touches the real network or process table. Each adapter receives only its own AdapterTarget slice — never the whole OSS-RELEASE.md payload — so no adapter can couple to another ecosystem’s config (data hiding, ADR-0002 §1).

§Reversibility

dry_run and build are re-runnable and side-effect-free / self-overwriting. publish is per-target irreversible — its PublishReceipt is captured as a durable fact. verify is read-only and returns the typed VerifyOutcome; a lookup that cannot be performed yields VerifyOutcome::Unknown, never a false VerifyOutcome::Missing.

Modules§

binary
Binary distribution adapter: manual / GitHub Releases.
cargo
Rust ecosystem adapter: cargo-publish (crates.io) and cargo-dist.
go
Go ecosystem adapter: goreleaser.
homebrew
Homebrew distribution adapter: homebrew-tap and homebrew-core.
node
Node ecosystem adapter: release-please, changesets, and npm-publish.
python
Python ecosystem adapter: gh-action-pypi-publish and twine.

Structs§

AdapterTarget
The per-target release input an adapter operates on: exactly one contract Target slice enriched with the plan’s chosen version and the resolved package name.
EffectCtx
The injected effect context every ReleaseAdapter method operates through.
HomebrewFormula
The Homebrew-formula inputs a first-formula create needs that the source tarball alone does not carry — the destination tap and the formula’s license.
ReleaseArtifacts
The concrete release artifacts the coordinator threads from the build phase into every adapter’s publish (ADR-0002 §2).
RemoteObservation
What a read-only remote reconcile observed for a receipt’s coordinates.
SourceTarball
The published source tarball a Homebrew formula bump consumes (--url / --sha256).

Enums§

AdapterError
Why an adapter step failed. Distinct from a verify discrepancy, which is a successful read modelled by VerifyOutcome rather than an error.
EcosystemAdapter
The enum-backed registry: the six compiled-in ecosystem adapters, selected at runtime from the contract’s Adapter identity by resolve.

Statics§

EMPTY_ARTIFACTS
A shared empty artifact set — the value carried through the dry-run / build phases and by every non-publish caller (EffectCtx::artifacts must always point at something).

Traits§

ReleaseAdapter
The per-ecosystem operations the release coordinator drives through its phase barriers (ADR-0002 §1).

Functions§

classify_receipt
Classify a PublishReceipt against an optional remote observation — the pure core of every adapter’s verify (ADR-0002 §1, ADR-0003 state table).
resolve
Resolve an Adapter identity to its compiled-in ecosystem implementation.