check:contracts

Verify that feature contracts and SPL UVL constraints tell the same dependency story.


Usage

splent check:contracts [--spl SPL]
Option Description
--spl Check a single SPL instead of every SPL in splent_catalog.

Why it exists

A feature dependency lives in two places: the feature’s own contract ([tool.splent.contract.requires].features) and the SPL’s UVL model (A => B constraints). When they disagree, one half of the system is blind: feature:install and the marketplace only see the contract, while product:auto-require and configuration validity only see the UVL.

What it reports

  • Error — a contract dependency with no matching UVL constraint: the SPL would let a product select A without B and break at runtime. The output prints the exact spl:add-constraints command to fix it.
  • Warning — a UVL implication not backed by any contract: the dependency is invisible to feature:install and the marketplace. The output points to the requires.features_manual entry to add (preserved when the contract is regenerated).
  • Features referenced by the UVL but not available locally are listed and skipped.

Exit code is 1 when there are errors, 0 otherwise — safe to wire into CI next to product:validate.

Example

splent check:contracts --spl cms_spl
  ⚠  UVL says 'team => media' but team's contract does not require 'media'
      fix: add "media" to requires.features_manual in splent_feature_team/pyproject.toml

Back to top

splent. Distributed by an LGPL license v3. Contact us: drorganvidez@us.es