Skip to content

spec: issue-3825 Attestation progress events (spec and plan) - #3857

Merged
migmartri merged 7 commits into
mainfrom
issue-3825-spec-attestation-progress-events
Nov 30, 2026
Merged

migmartri merged 7 commits into
mainfrom
issue-3825-spec-attestation-progress-events

Conversation

@migmartri

@migmartri migmartri commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

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 describe uses them to show the evidence that is in, the evidence that is missing, and the policy results so far. A second milestone adds chainloop 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 add in 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

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
@migmartri migmartri added the spec Design spec label Nov 30, 2026
@migmartri
migmartri requested a review from a team November 30, 2026 17:59
@chainloop-platform

chainloop-platform Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

PR validation — ✅ 3 passing

Status Policy Material Messages
✅ Passed pr-min-approvals pr-info -
✅ Passed pr-description-required pr-info -
✅ Passed pr-user-story-linked pr-info -

View attestation ↗

AI Session Checks — 🟢 92% · ✅ 0 failing

Avg score Sessions Failing policies Attribution Files Lines Total Duration
🟢 92% 1 ✅ 0 100% AI / 0% Human 2 +692 / -35 4h32m59s

🟢 92% — 100% AI — ✅ All policies passing

Nov 30, 2026 17:10 UTC · 4h32m59s · $68.91 · 1.7k in / 1.0M out · claude-code 2.1.332 (claude-opus-5-5)

View session details ↗

Change Summary

Adds the attestation progress design spec and implementation plan; no runtime behavior changes.

AI Session Overall Score

🟢 92% — The spec and plan are aligned and focused; implementation quality and runtime verification remain unassessed.

AI Session Analysis Breakdown

🟢 97% · scope-discipline

🟢 Only the requested design spec and plan appear in the cumulative diff. · High Impact

🟢 94% · context-and-planning

🟢 Before drafting, the author researched lifecycle and state access, then asked concrete scope questions. · High Impact

🟢 90% · alignment

🟢 The author checked separate-session approvals before incorporating later design changes. · High Impact

🟢 90% · user-trust-signal

No notes.

abstained · solution-quality

🟡 solution-quality not assessed — reviewer should confirm coverage · Low Severity

abstained · verification

🟡 verification not assessed — reviewer should confirm coverage · Low Severity


File Attribution

████████████████████ 100% AI / 0% Human

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

View attestation ↗


Powered by Chainloop and Chainloop Trace

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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
@migmartri migmartri changed the title spec: issue-3825 Attestation progress events spec: issue-3825 Attestation progress events (spec and plan) Nov 30, 2026
@migmartri
migmartri marked this pull request as ready for review November 30, 2026 18:47
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

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@matiasinsaurralde matiasinsaurralde left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good

…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

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@migmartri
migmartri merged commit 467f2bd into main Nov 30, 2026
16 checks passed
@migmartri
migmartri deleted the issue-3825-spec-attestation-progress-events branch November 30, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

spec Design spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants