Goal
Define the consumer-side pattern for pinning to a specific contractVersion and gating merges when CheckID's contract bumps incompatibly. Provide a reference implementation.
Depends on
- v0.2 contract version field (separate v0.2 issue)
The pattern
Each downstream consumer (M365-Assess, Az-Assess, EZ-CMMC, M365-Remediate) declares a pinned contract major version in its repo:
# .github/checkid-contract.yml
pinnedMajor: 1
allowMinorAhead: true
checkidRef: tags/v3.5.0 # or a SHA, or main
A consumer-side workflow on every PR:
- Fetches
data/registry.json from the pinned checkidRef.
- Reads its
contractVersion.
- Fails if the major version differs from
pinnedMajor.
- Optionally fails if minor is ahead and
allowMinorAhead: false.
When CheckID bumps major (breaking), the consumer pin no longer satisfies — consumer's PRs fail until they bump pinnedMajor (after migration).
Reference implementation
Ship the consumer-side workflow as a reusable workflow in this repo: .github/workflows/consumer-contract-gate.yml. Consumers reference it:
jobs:
contract-gate:
uses: Galvnyz/CheckID/.github/workflows/consumer-contract-gate.yml@main
Acceptance criteria
Goal
Define the consumer-side pattern for pinning to a specific
contractVersionand gating merges when CheckID's contract bumps incompatibly. Provide a reference implementation.Depends on
The pattern
Each downstream consumer (M365-Assess, Az-Assess, EZ-CMMC, M365-Remediate) declares a pinned contract major version in its repo:
A consumer-side workflow on every PR:
data/registry.jsonfrom the pinnedcheckidRef.contractVersion.pinnedMajor.allowMinorAhead: false.When CheckID bumps major (breaking), the consumer pin no longer satisfies — consumer's PRs fail until they bump
pinnedMajor(after migration).Reference implementation
Ship the consumer-side workflow as a reusable workflow in this repo:
.github/workflows/consumer-contract-gate.yml. Consumers reference it:Acceptance criteria
.github/checkid-contract.ymlschema documentedconsumer-contract-gate.ymlreusable workflow shipped in this repodocs/consumer-guide/contract-gate.md)