feat(trace): record AI coding session ids as an attestation annotation
Refs PFM-8484
When chainloop trace pushes a session attestation, it now adds the attestation annotation chainloop.aisession.ids. The value lists the data.session.id of each CHAINLOOP_AI_CODING_SESSION material that the attestation holds, sorted and comma-joined.
The annotation is on the attestation, not on the material. The control plane stores attestation annotations on the attestation referrer, so chainloop discover on the attestation returns the session ids. Today a consumer such as strata must download the full session material from CAS to read the id. A material annotation would not help, because a material referrer does not keep its annotations.
One attestation can hold more than one session material: a single push attests every session that contributed to the pushed commits. For this reason the annotation is a list (ses_a,ses_b) and not a single id. An id that is empty or that contains a comma is left out of the list. No current provider makes such an id. A consumer can still download that material.
The annotation key is exported as AnnotationAISessionIDs in pkg/attestation/crafter/api/attestation/v1. Attestations pushed before this change do not have the annotation.
This change was made with AI assistance (Claude Code).