Repository navigation
spec: issue-3825 Attestation progress events (spec and plan) - #3857
Conversation
Design spec for run events: a timeline of attestation progress that the CLI records and the control plane keeps with the workflow run, shown by workflow run describe, plus a custom event command. Refs #3825 Assisted-by: Claude Code Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev> Chainloop-Trace-Sessions: 3eeeeacd-8df3-4b29-bf84-7ab6e5c86691
PR validation — ✅ 3 passing
AI Session Checks — 🟢 92% · ✅ 0 failing
|
| Status | Attribution | File | Lines |
|---|---|---|---|
| created | ai | docs/plans/issue-3825-attestation-progress-events.md |
+436 / -35 |
| created | ai | docs/specs/issue-3825-attestation-progress-events.md |
+256 / -0 |
Policies (4)
| Status | Policy | Material | Messages |
|---|---|---|---|
| ✅ Passed | ai-config-ai-agents-allowed |
ai-coding-session-3eeeea |
- |
| ✅ Passed | ai-config-no-dangerous-commands |
ai-coding-session-3eeeea |
- |
| ✅ Passed | ai-config-no-secrets |
ai-coding-session-3eeeea |
- |
| ✅ Passed | ai-config-mcp-servers-allowed |
ai-coding-session-3eeeea |
- |
Security Checks — ✅ 6 passing
✅ AI Security Analysis
Nothing this change touches re-opens a recorded security fix.
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
There was a problem hiding this comment.
All reported issues were addressed across 1 file
Tip: Get a Slack DM when cubic finishes reviewing your PRs. Connect Slack
View guided diff | Re-trigger cubic
Add the implementation plan in docs/plans with two milestones: automatic progress events with describe output and retention (R-001 to R-008), and the custom event command (R-009). Run events reuse the access checks of storing and viewing the run, so no new permission is added. Spec updates: the 64-character key limit applies to custom keys only (R-008), custom keys use the annotation name format (R-009), and the Access constraint states the real store and view checks. Refs #3825 Assisted-by: Claude Code Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev> Chainloop-Trace-Sessions: 3eeeeacd-8df3-4b29-bf84-7ab6e5c86691
R-004: when the control plane cannot return events, describe shows the run as today and does not fail. The plan adds a compatibility test with an in-process gRPC server that lacks the new calls. Refs #3825 Assisted-by: Claude Code Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev> Chainloop-Trace-Sessions: 3eeeeacd-8df3-4b29-bf84-7ab6e5c86691
There was a problem hiding this comment.
All reported issues were addressed across 2 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
View guided diff | Re-trigger cubic
…ents Remove the policies event type and the chainloop.policies.init and chainloop.policies.push keys. The chainloop.attestation start event at the end of init carries the init attestation policy counts. A new chainloop.push event, sent before Store, carries all attestation policy counts and the blocking policies. A gated push is still stored, so it shows push failed followed by the closing attestation succeeded. Assisted-by: Claude Code Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev> Chainloop-Trace-Sessions: 3eeeeacd-8df3-4b29-bf84-7ab6e5c86691
Close the two open questions with the proposed answers (D-008 limits, D-009 error text in failed add events). State the key of a failed add with no name, the closing event messages, and the blocked push message. Fix the plan's test file names, the Record signature and its error, the step 05 files, and the describe example. Assisted-by: Claude Code Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev> Chainloop-Trace-Sessions: 3eeeeacd-8df3-4b29-bf84-7ab6e5c86691
There was a problem hiding this comment.
1 issue found across 2 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="docs/plans/issue-3825-attestation-progress-events.md">
<violation number="1" location="docs/plans/issue-3825-attestation-progress-events.md:245">
P2: This plan promises `ErrFailedPrecondition` will map to gRPC `FailedPrecondition`, but the current shared error handler does not recognize a generic error of that name. Add the handler mapping and a regression test to the plan, or specify that `RecordEvent` converts the error directly.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
Add D-010 with a size bound on each run event field (R-008), and the summary event for an add that expands an archive into more than 20 materials (R-001). Record the accepted risk of filling the 1,000-event cap. In the plan, compare RecordEvent with Store and ListEvents with View, and list the FailedPrecondition mapping in the shared handler. Assisted-by: Claude Code Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev> Chainloop-Trace-Sessions: 3eeeeacd-8df3-4b29-bf84-7ab6e5c86691
There was a problem hiding this comment.
1 issue found across 2 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="docs/plans/issue-3825-attestation-progress-events.md">
<violation number="1" location="docs/plans/issue-3825-attestation-progress-events.md:152">
P2: These comments do not create protobuf validation options, and the changed `MaterialAttributes` line removes the only concrete attribute validator. Implementing this snippet leaves event attributes and policy-name lists unbounded for control-plane callers, violating D-010/R-008; attach the limits to each affected field.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
An add that expands an archive also records an event for the archive file itself, which the CLI keeps as an evidence material. The summary count stays the number of expanded materials. Assisted-by: Claude Code Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev> Chainloop-Trace-Sessions: 3eeeeacd-8df3-4b29-bf84-7ab6e5c86691
There was a problem hiding this comment.
1 issue found across 2 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="docs/specs/issue-3825-attestation-progress-events.md">
<violation number="1" location="docs/specs/issue-3825-attestation-progress-events.md:61">
P2: R-001 only requires the archive-file event for archives with more than 20 materials, but the proposal and plan require it for smaller archives too. State that every archive add records the archive-file event, while only large archives replace per-material events with a summary.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
Summary
While an attestation is in progress, the control plane knows only that its workflow run is initialized. This spec adds run events: short, timestamped entries that the CLI records on each action of the attestation. The control plane keeps them with the run.
chainloop workflow run describeuses them to show the evidence that is in, the evidence that is missing, and the policy results so far. A second milestone addschainloop attestation event. With it, a pipeline can record its own steps, for example a security scan. Run events are operational progress data. They are not part of the signed attestation, and they are not an audit trail.The UI view is described in the spec and is a follow-up in the UI repository.
This PR also holds the implementation plan (
docs/plans/issue-3825-attestation-progress-events.md). It has two milestones: automatic progress (R-001 to R-008) and custom events (R-009). Run events add no new permission. The write call uses the checks of storing the attestation of the run, and the read call uses the checks of the run view. The first milestone is in #3859.The two earlier open questions are closed with the proposed answers. D-008 keeps the limits of R-008 (1,000 events for each run, 64-character custom keys, 1 KB messages). D-009 keeps the error text of a failed
addin its event, cut to 1 KB.We would like two reviewers to approve this spec before it merges.
Refs #3825
This spec was drafted with AI assistance (Claude Code).
🤖 Posted by Maximus bot (Claude Code) on behalf of @migmartri