Skip to content
Academy
0/19

Routes

On this page

Fundamentals · Unit 3 of 4

A version is a contract

A version is a contract, not a label. The provider declares the concrete version it implements (its contractVersion); the consumer declares the range it can accept (its constraint). The asymmetry is deliberate: the implementer states a fact, the consumer expresses tolerance, and the resolver compares the fact against the range.

Beginner20 min

By the end, you'll be able to

  • Tell the provider's concrete version apart from the consumer's range
  • Choose between upgrading the provider and relaxing the constraint

Understand

A version is a contract, not a label. The provider declares the concrete version it implements (its contractVersion); the consumer declares the range it can accept (its constraint). The asymmetry is deliberate: the implementer states a fact, the consumer expresses tolerance, and the resolver compares the fact against the range.

When the provider exists but its contractVersion falls outside the requested range, the requirement stays open: an out-of-range implementation cannot be trusted to honour the expected shape. The resolver splits the contract side (MILPA_CONTRACT_VERSION_UNSUPPORTED) from the capability side (MILPA_CAPABILITY_VERSION_UNSUPPORTED) so each one teaches its own upgrade path.

The two legitimate fixes mirror the contract: upgrade the provider to a version that satisfies the constraint, or relax the requirer's constraint if the installed version is acceptable. Deleting the requirement doesn't close the contract: it hides it.

See

Open Plant your milpa

An open requirement blocks germination; an out-of-range provider leaves the requirement as open as a missing one.

Do

Run the practice in your checkout and keep the output as evidence.

terminal
$php bin/coa validate

Verify

Show that you can apply the unit. Progress only advances once you pass the assessment.

Criteria assessed

  • Explain why the provider declares a concrete version and the consumer a range.
  • Name the two fixes for an out-of-range requirement without silencing the contract.

Graded assessment

Solve the 3 scenarios. This unit requires 3 of 3 correct answers.

0 attempts
Question 1 of 3PaymentsPlugin requires the payments capability with the constraint ^2.0. StripePlugin provides it, but its contractVersion is 1.4. What should the resolver report?
Question 2 of 3In Milpa manifests, the provider declares a concrete version and the consumer declares a range. Why is that asymmetry deliberate?
Question 3 of 3The report shows MILPA_CONTRACT_VERSION_UNSUPPORTED: the contract is implemented, but no implementation satisfies the constraint. What are the two legitimate fixes?

Grading validates answers in this browser; it doesn't certify identity.

Primary sources

Content verified: 2026-07-12