Skip to content

feat: add agent name annotation to AI agent config materials#2859

Merged
jiparis merged 1 commit into
chainloop-dev:mainfrom
jiparis:jiparis/aiagent-name-annotation
Mar 15, 2026
Merged

feat: add agent name annotation to AI agent config materials#2859
jiparis merged 1 commit into
chainloop-dev:mainfrom
jiparis:jiparis/aiagent-name-annotation

Conversation

@jiparis

@jiparis jiparis commented Mar 14, 2026

Copy link
Copy Markdown
Member

Summary

  • Extract the agent name (e.g., "claude", "cursor") from CHAINLOOP_AI_AGENT_CONFIG material JSON payload and surface it as a chainloop.material.aiagent.name annotation
  • This makes the agent name queryable/filterable without downloading and parsing the full evidence content
┌───────────────────────────┬──────────────────────────────────────┐
│ Initialized At            │ 14 Mar 26 23:43 UTC                  │
├───────────────────────────┼──────────────────────────────────────┤
│ Attestation ID            │ 1d0b88fa-08ff-42fa-941b-d50e73d9df22 │
│ Organization              │ my-org                               │
│ Name                      │ aiworkflow                           │
│ Project                   │ my-project                           │
│ Version                   │ v1.82.0+next (prerelease)            │
│ Contract                  │ my-project-aiworkflow (revision 1)   │
│ Policy violation strategy │ ENFORCED                             │
└───────────────────────────┴──────────────────────────────────────┘
┌───────────────────────────────────────────────────────────────────────────────────────┐
│ Materials                                                                             │
├─────────────┬─────────────────────────────────────────────────────────────────────────┤
│ Name        │ ai-agent-config-claude                                                  │
│ Type        │ CHAINLOOP_AI_AGENT_CONFIG                                               │
│ Set         │ Yes                                                                     │
│ Required    │ No                                                                      │
│ Value       │ ai-agent-config-claude-358303667.json                                   │
│ Digest      │ sha256:597d9533e18b09803e8e2834fa1aa9647511b082ecbbcec1649c0e9d37f263db │
│ Annotations │ ------                                                                  │
│             │ chainloop.material.aiagent.name: claude                                 │
│             │ chainloop.material.size: 47950                                          │
└─────────────┴─────────────────────────────────────────────────────────────────────────┘

Extract the agent name from CHAINLOOP_AI_AGENT_CONFIG material JSON
payload and surface it as a `chainloop.material.aiagent.name` annotation,
making it queryable without downloading the full evidence content.

Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 4 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="pkg/attestation/crafter/materials/testdata/ai-agent-config-claude.json">

<violation number="1" location="pkg/attestation/crafter/materials/testdata/ai-agent-config-claude.json:9">
P3: This fixture's `sha256`/`size` values do not match its embedded `content`, so it models impossible AI-agent evidence.</violation>
</file>

<file name="pkg/attestation/crafter/materials/testdata/ai-agent-config-cursor.json">

<violation number="1" location="pkg/attestation/crafter/materials/testdata/ai-agent-config-cursor.json:9">
P2: Fix the fixture metadata so `sha256` and `size` match the decoded `content`. Right now this testdata describes `# Coding Rules`, but the hash and size are for different bytes.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@jiparis jiparis merged commit 961d0e6 into chainloop-dev:main Mar 15, 2026
15 checks passed
@jiparis jiparis deleted the jiparis/aiagent-name-annotation branch March 15, 2026 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants