fix(cli): accept matching --name and metadata.name in contract commands
Merged
TK
3mo ago+123+123+012345678901234567890123456789-11-11-01234567890123456789
When both an explicit --name flag and metadata.name in the contract file were provided, workflow contract create/update/apply failed with conflicting names even when the two values were identical. This broke documented, copy-paste invocations.
This PR:
- Accepts the command when
--nameandmetadata.nameare identical (the common, unambiguous case). - When they differ, emits an actionable error:
--name "A" and metadata.name "B" differ: pass only one, or set them to the same value. - Adds unit tests for
ValidateAndExtractName. - Aligns
metadata.namein the SLSA/SSDF/CRA example contracts with the names used in the docs guides so the documented commands work as written (companion docs PR in platform-docs).
closes https://linear.app/chainloop/issue/sol-58
🤖 Generated with Claude Code