Repository navigation
Conversation
`chainloop trace init` and `chainloop trace run` both produce a CHAINLOOP_AI_CODING_SESSION material with an identical shape, so an ongoing coding session and a one-shot wrapped command are indistinguishable once attested. Add session.mode to the AI coding session payload: "coding" for the git-hook path installed by trace init, "generic" for trace run. An absent mode means "coding", so sessions recorded before this change keep their meaning. The mode is also published as the chainloop.material.aisession.mode annotation, which is an exact key/value match consumers can filter on without downloading and parsing the session itself. The field is a plain string rather than a closed enumeration so that further modes need no schema version bump. Assisted-by: Claude Code Signed-off-by: Jose I. Paris <jiparis@chainloop.dev> Chainloop-Trace-Sessions: 79f9ea21-3bbd-4ee9-8640-097df91d751c
AI Session Checks — 🟡 60% ·
|
| Avg score | Sessions | Failing policies | Attribution | Files | Lines | Total Duration |
|---|---|---|---|---|---|---|
| 🟡 60% | 1 | 100% AI / 0% Human | 12 | +246 / -4 | 4h14m31s |
🟡 60% — 100% AI — ⚠️ 1 policies failing
-
Sep 15, 2026 16:48 UTC · 4h14m31s · $28.70 · 586 in / 110.7k out · claude-code 2.1.272 (claude-opus-5)
Change Summary
-
- Adds
session.modepluscoding/generichandling for AI coding session payloads. - Publishes
chainloop.material.aisession.modeand protects it from redaction. - Threads mode through the CLI trace entry points and expands schema/material tests around the new behavior.
- Adds
AI Session Overall Score
-
🟡 60% — Well-planned, well-tested work, but the final PR-creation request was not completed.
AI Session Analysis Breakdown
-
🟢 94% · context-and-planning
-
🟢 A written plan and user-approved design choices preceded implementation. · High Impact
🟢 93% · scope-discipline
-
🟢 The recorded diff stayed within the intended producer-side files and tests. · High Impact
🟢 92% · user-trust-signal
-
No notes.
🟢 90% · solution-quality
-
🟢 The AI used red-to-green test loops instead of papering over failures. · High Impact
🟢 84% · verification
-
🟡 The live control-plane path was not exercised because the local stack was unavailable. · Low Severity
🔴 35% · alignment
-
🔴 After
create a PR, the session shows commit/push steps but no PR creation. · High Severity💡 When the ask is to create a PR, show the PR URL or the command that opened it before stopping.
-
File Attribution
████████████████████100% AI / 0% HumanStatus Attribution File Lines modified ai pkg/attestation/crafter/materials/chainloop_ai_coding_session_test.go+71 / -0 modified ai internal/schemavalidators/schemavalidators_test.go+63 / -0 created ai pkg/attestation/crafter/materials/aicodingsession/mode_test.go+43 / -0 modified ai pkg/attestation/crafter/materials/aicodingsession/aicodingsession.go+27 / -2 modified ai app/cli/pkg/action/trace_hook_handler.go+17 / -1 modified ai pkg/attestation/crafter/materials/chainloop_ai_coding_session.go+13 / -1 modified ai internal/schemavalidators/internal_schemas/aicodingsession/ai-coding-session-0.1.schema.json+4 / -0 modified ai app/cli/cmd/trace_hook.go+2 / -0 modified ai app/cli/pkg/action/trace_run.go+2 / -0 modified ai pkg/attestation/crafter/materials/aicodingsession/redact_test.go+2 / -0 modified ai pkg/attestation/crafter/materials/aicodingsession/redact.go+1 / -0 modified ai pkg/attestation/crafter/materials/aicodingsession/testdata/session-with-secrets.json+1 / -0
Policies (4, 1 failing)
Status Policy Material Messages ✅ Passed ai-config-ai-agents-allowedai-coding-session-79f9ea- ✅ Passed ai-config-no-dangerous-commandsai-coding-session-79f9ea- ⚠️ Failedai-config-no-secretsai-coding-session-79f9eaSecret (aws-access-token) detected in session content [turn=682, source=tool_result, line=93]: assert.Contains(t, string(got), "[REDACTED:aws-access-token]") ✅ Passed ai-config-mcp-servers-allowedai-coding-session-79f9ea- -
Security Checks — ✅ 9 passing
✅ secret-scan
| Status | Policy | Messages |
|---|---|---|
| ✅ Passed | secrets-detection |
- |
✅ sast-scan
| Status | Policy | Messages |
|---|---|---|
| ✅ Passed | sast |
- |
| ✅ Passed | cwe-top25 |
- |
| ✅ Passed | cwe-top26-40-cusp |
- |
| ✅ Passed | owasp-top10-2025 |
- |
✅ iac-scan
| Status | Policy | Messages |
|---|---|---|
| ✅ Passed | iac-misconfiguration |
- |
PR info
| Status | Policy | Messages |
|---|---|---|
| ✅ Passed | pr-min-approvals |
- |
| ✅ Passed | pr-description-required |
- |
| ✅ Passed | pr-user-story-linked |
- |
⏭️ 2 scans not applied
| Scan | Reason |
|---|---|
vulnerability-scan |
no manifest/lockfile changed |
github-actions-scan |
no workflow files changed |
Powered by Chainloop and Chainloop Trace
There was a problem hiding this comment.
All reported issues were addressed across 12 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
chainloop tracehooks andchainloop trace runboth emit aCHAINLOOP_AI_CODING_SESSIONmaterial with an identical shape, so an ongoing coding session and a one-shot wrapped command cannot be told apart once attested.This PR adds a new
session.modefield to the AI coding session payload, with the following values:codingfor a session traced through the git hooks installed bytrace initgenericfor a single-shotchainloop trace runAn absent mode means
coding, so sessions recorded before this change keep their meaning. The mode is also published as thechainloop.material.aisession.modematerial annotation, which is an exact key/value match consumers can filter on without downloading and parsing the session itself.The field is a plain string rather than a closed enumeration, so further modes (spec, security) need no schema version bump. It is added to the redaction deny-list alongside the other identifiers and enumerations the secret scanner must never rewrite.
Ingesting the mode into the platform database and defaulting the AI coding dashboards to
mode = "coding"is separate follow-up work.AI disclosure: this contribution was assisted by Claude Code.