fix(cli): accept matching --name and metadata.name in contract commands

Merged
TK
3mo ago
+123-11

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 --name and metadata.name are 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.name in 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