feat(cli): show attestation evidence in the custom step that adds it

Merged
MI
4d ago
+594-56

Adds spec issue-3878 and its implementation, in the same PR.

A pipeline records its own steps with chainloop attestation event, and adds the report of each step with chainloop attestation add. Until now nothing linked the report to its step, so the run timeline showed it as a separate row after the step. With this change, the evidence shows in the step that adds it.

  • chainloop attestation add --step <key> records the custom step on the material event (R-001). The material keeps its chainloop.material.<name> key, so the progress of the run does not change. A step that is not a valid custom key never fails the add: the CLI warns and drops the step.
  • The material attributes of a run event get an optional step, which the control plane checks with the rules of a custom key. No database change is needed.
  • chainloop workflow run describe shows each material in the custom step it names, in time order with the events of the step. A step with no matching custom event shows the material as a top-level row, as before (R-002).
  • chainloop attestation event takes its key with --step instead of --name (R-003, D-002). The command has no --name flag any more, so a call with it fails as an unknown flag.

This changes the flag name of R-013 of spec issue-3825 (attestation progress events). Spec issue-3825 is not edited. The new spec records the change in D-002.

The platform UI nests the material in its step in the same way, as a follow-up in the UI repository.

Closes #3878

This PR was written with AI assistance (Claude Code).

šŸ¤– Posted by Maximus bot (Claude Code) on behalf of @migmartri