Repository navigation
Conversation
The trace push adds the chainloop.aisession.ids annotation to the session attestation. Its value is the data.session.id of each CHAINLOOP_AI_CODING_SESSION material in the attestation, sorted and comma-joined. The control plane stores attestation annotations on the attestation referrer, so discover returns the ids and a consumer no longer has to download the session materials to read them. Refs: PFM-8484 Assisted-by: Claude Code Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev> Chainloop-Trace-Sessions: ad02680a-2ab6-4980-aa71-d685c2c57fb5
PR validation —
|
| Status | Policy | Material | Messages |
|---|---|---|---|
pr-min-approvals |
pr-info |
PR/MR #3885 has 0 approving reviews, 1 required. | |
| ✅ Passed | pr-description-required |
pr-info |
- |
| ✅ Passed | pr-user-story-linked |
pr-info |
- |
AI Session Checks — 🟢 88% · ✅ 0 failing
| Avg score | Sessions | Failing policies | Attribution | Files | Lines | Total Duration |
|---|---|---|---|---|---|---|
| 🟢 88% | 1 | ✅ 0 | 100% AI / 0% Human | 5 | +244 / -5 | 3m56s |
🟢 88% — 100% AI — ✅ All policies passing
-
Dec 4, 2026 23:59 UTC · 3m56s · $3.29 · 120 in / 33.8k out · claude-code 2.1.337 (claude-opus-5-5)
Change Summary
-
Adds material-derived session ids as runtime attestation annotations during trace push. Sorts and deduplicates multiple ids, omitting unusable values, and adds builder and push-forwarding tests.
AI Session Overall Score
-
🟢 88% — Focused annotation delivery with passing builder tests; real push verification remains limited.
AI Session Analysis Breakdown
-
🟢 97% · scope-discipline
-
No notes.
🟢 93% · context-and-planning
-
🟢 Opening request specifies annotation placement, source value, multi-session handling, tests, and downstream exclusions. · High Impact
🟢 92% · solution-quality
-
🟢 Ids come from evidence, exclude unattested sessions, and are sorted and deduplicated before using existing push machinery. · High Impact
🟢 91% · alignment
-
No notes.
🟡 75% · verification
-
🟢 Builder tests assert material-derived ids, multiple sessions, filtering, deduplication, and invalid-id handling. · High Impact
🟠 Push test records annotations on a fake pusher; it does not inspect the serialized attestation produced by the real executor. · Medium Severity
💡 Add a push-path test that inspects the resulting attestation annotations, beyond the fake executor boundary.
abstained · user-trust-signal
-
🟡 user-trust-signal not assessed — reviewer should confirm coverage · Low Severity
-
File Attribution
████████████████████100% AI / 0% HumanStatus Attribution File Lines created ai app/cli/pkg/action/trace_session_annotations_test.go+159 / -0 created ai app/cli/pkg/action/trace_session_annotations.go+68 / -0 modified ai pkg/attestation/crafter/api/attestation/v1/crafting_state.go+9 / -0 modified ai app/cli/pkg/action/trace_attestation.go+5 / -3 modified ai app/cli/pkg/action/trace_hook_handler.go+3 / -2
Policies (4)
Status Policy Material Messages ✅ Passed ai-config-ai-agents-allowedai-coding-session-ad0268- ✅ Passed ai-config-no-dangerous-commandsai-coding-session-ad0268- ✅ Passed ai-config-no-secretsai-coding-session-ad0268- ✅ Passed ai-config-mcp-servers-allowedai-coding-session-ad0268- -
Security Checks — ✅ 6 passing
✅ AI Security Analysis
Reviewed this change against the project's security context (1 concern hunted) — no introduced risk found.
View in Chainloop ↗ · How this works ↗
✅ Secret Scan
| Status | Policy | Messages |
|---|---|---|
| ✅ Passed | secrets-detection |
- |
✅ SAST Scan
| Status | Policy | Messages |
|---|---|---|
| ✅ Passed | owasp-top10-2025 |
- |
| ✅ Passed | sast |
- |
| ✅ Passed | cwe-top25 |
- |
| ✅ Passed | cwe-top26-40-cusp |
- |
Scans not applied (3)
| Scan | Reason |
|---|---|
| Vulnerability Scan | no manifest/lockfile changed |
| GitHub Actions Scan | no workflow files changed |
| IaC Scan | no IaC files changed |
Powered by Chainloop and Chainloop Trace
Refs PFM-8484
When
chainloop tracepushes a session attestation, it now adds the attestation annotationchainloop.aisession.ids. The value lists thedata.session.idof eachCHAINLOOP_AI_CODING_SESSIONmaterial 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 discoveron 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
AnnotationAISessionIDsinpkg/attestation/crafter/api/attestation/v1. Attestations pushed before this change do not have the annotation.This change was made with AI assistance (Claude Code).