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 model the workspace knows. |
A model that is not on disk is reported as a warning, with the
spl:fetch command that gets it, or with the fact that
no DOI records it. It is never checked against silently.
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
AwithoutBand break at runtime. The output prints the exactspl:add-constraintscommand to fix it. - Warning. A UVL implication not backed by any contract. The
dependency is invisible to
feature:installand the marketplace. The output points to therequires.features_manualentry 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, so it is 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