Skip to main content

Module contract

Module contract 

Source
Expand description

Public wire DTO for the normalized OSS-RELEASE.md contract (SCHEMA.md §4).

This is the versioned public surface every /oss-* member reads. At founding the wire DTO is exactly the canonical model — the serialized form of crate::contract::schema::Contract is SCHEMA.md §4, so a second parallel struct would be duplication with no divergence to justify it. This module therefore re-exports the canonical types and owns the wire-version declaration (CONTRACT_SCHEMA_VERSION).

The seam the ADR mandates (internals refactor without a wire break) stays open: when the internal model ever needs a shape the wire cannot follow, introduce a dedicated ContractDto here plus a From<&schema::Contract> conversion and pin it — exactly the “sanctioned escape hatch when it hurts” posture ADR-0001 takes toward the domain-crate split. Until then, one model, documented as the wire contract.

Consumers read this document under the CLI’s canonical data envelope: {schema_version, data: <this shape>, warnings} — every ossctl --json command shares that envelope, so the §4 fields live at .data.*, uniform with facts, audit, and the rest.

Re-exports§

pub use crate::contract::schema::Adapter;
pub use crate::contract::schema::Changelog;
pub use crate::contract::schema::ChangelogMode;
pub use crate::contract::schema::ChangelogSource;
pub use crate::contract::schema::Contract;
pub use crate::contract::schema::ContributionProvenance;
pub use crate::contract::schema::DependencyBot;
pub use crate::contract::schema::DocsSite;
pub use crate::contract::schema::Ecosystem;
pub use crate::contract::schema::HealthBadge;
pub use crate::contract::schema::Maturity;
pub use crate::contract::schema::ProvenanceLevel;
pub use crate::contract::schema::Registry;
pub use crate::contract::schema::Release;
pub use crate::contract::schema::ReleaseLayout;
pub use crate::contract::schema::ReleaseModel;
pub use crate::contract::schema::Status;
pub use crate::contract::schema::Target;
pub use crate::contract::schema::VersioningBase;

Constants§

CONTRACT_SCHEMA_VERSION
The OSS-RELEASE.md contract-document schema version this build reads and emits. Distinct from the JSON-envelope crate::SCHEMA_VERSION: this versions the contract document (SCHEMA.md §4), that versions the wire envelope. Both are 1 today. A breaking change to the §4 shape bumps this (and crate::contract::schema::KNOWN_SCHEMA_VERSION, its enforcement twin), never silently (migration rule).