Skip to content

feat(events): progress values on custom attestation steps - #3882

Merged
migmartri merged 2 commits into
mainfrom
feat/custom-step-progress
Dec 3, 2026
Merged

migmartri merged 2 commits into
mainfrom
feat/custom-step-progress

Conversation

@migmartri

@migmartri migmartri commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

Refs #3825

Custom attestation steps can carry progress values, so a long pipeline step can show how far it got, for example 240 of 500 commits.

  • API: WorkflowRunEvent gets an optional top-level Progress progress, with Progress { int64 current; int64 total }. Current is from 0 to total, and total is more than 0. The progress is not one of the typed attributes, so other event types can support it later. Today the control plane accepts it only on custom events. It is stored in a new nullable progress column.
  • CLI: chainloop attestation event takes --current N --total N. It needs both flags or neither. A wrong or empty value shows a warning, sends nothing, and exits 0, as for the other wrong input of the command.
  • A long step reports its progress with repeated started events of its key. There is no new status.
  • chainloop workflow run describe shows the progress of the last event of a custom step on the step row. Below the step, consecutive progress updates fold into the last one, so a step that reports every few seconds does not print hundreds of lines. The JSON output keeps every event.
├─ 10:01:02  ● step `classify-commits`  running for 4m43s · 240/500
│  ├─ 10:01:02  ● Classifying 500 commits · 0/500
│  └─ 10:01:22  ● 240/500

Spec: this adds R-015 and D-015 to spec issue-3825. D-015 supersedes the Non-goal "custom attributes on custom events", which is struck through.

AI disclosure: this change was made with the help of Claude Code.

🤖 Posted by Maximus bot (Claude Code) on behalf of @migmartri

Custom run events can carry a progress of a current value and a total.
chainloop attestation event takes --current and --total, and
workflow run describe shows the progress on the step row. A long step
reports its progress with repeated started events.

Implements R-015 and D-015 of spec issue-3825.

Refs #3825

Assisted-by: Claude Code
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>

Chainloop-Trace-Sessions: 5879441f-3738-4aa2-b8ff-46476884884d
@chainloop-platform

chainloop-platform Bot commented Dec 3, 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 — 🟡 85% · ✅ 0 failing

Avg score Sessions Failing policies Attribution Files Lines Total Duration
🟡 85% 1 ✅ 0 100% AI / 0% Human 23 +485 / -29 41m52s

🟡 85% — 100% AI — ✅ All policies passing

Dec 3, 2026 22:20 UTC · 41m52s · $19.88 · 576 in / 212.5k out · claude-code 2.1.336 (claude-opus-5-5)

View session details ↗

Change Summary

Adds optional current/total progress to custom attestation events, validates CLI and server input, and persists progress separately. Displays latest progress on step rows and folds consecutive updates; updates tests, generated artifacts, CLI documentation, and the design spec.

AI Session Overall Score

🟡 85% — Strong implementation and testing, with one corrected input-handling overclaim and no direct user confirmation.

AI Session Analysis Breakdown

🟢 94% · scope-discipline

No notes.

🟢 93% · solution-quality

🟢 Models optional progress separately and carries it through storage and read mappings instead of encoding it in messages. · High Impact

🟢 92% · context-and-planning

🟢 Read related specs and clarified the superseding process before production edits. · High Impact

🟢 89% · user-trust-signal

No notes.

🟡 77% · verification

🟢 Removed folding temporarily, observed the targeted test fail, restored it, and reran passing CLI suites. · High Impact

🟠 User participated in cleanup and review but never confirmed the feature worked. · Medium Severity

💡 Confirm one representative progress event and its displayed row before approving the feature.

🟡 73% · alignment

🟠 Initial bad-input completion claim overlooked explicitly empty flags; review caught the mismatch before the final correction. · Medium Severity


File Attribution

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

Status Attribution File Lines
modified ai app/cli/pkg/action/attestation_event_test.go +51 / -2
modified ai app/cli/cmd/workflow_run_timeline.go +47 / -2
modified ai app/cli/cmd/attestation_event.go +42 / -2
modified ai app/controlplane/pkg/biz/workflowrunevent_test.go +42 / -0
modified ai app/controlplane/api/controlplane/v1/workflow_run_test.go +40 / -0
modified ai app/cli/cmd/attestation_event_test.go +34 / -5
modified ai app/controlplane/internal/service/workflowrunevent_test.go +34 / -0
modified ai app/cli/cmd/workflow_run_timeline_test.go +31 / -0
modified ai app/cli/pkg/action/attestation_event.go +19 / -10
modified ai app/controlplane/pkg/data/workflowrunevent_integration_test.go +23 / -0
modified ai app/controlplane/pkg/biz/workflowrunevent.go +21 / -1
modified ai app/cli/pkg/action/workflow_run_describe_test.go +20 / -0
modified ai app/controlplane/api/controlplane/v1/workflow_run.proto +16 / -2
modified ai docs/specs/issue-3825-attestation-progress-events.md +16 / -2
modified ai app/cli/pkg/action/workflow_run_describe.go +12 / -0
modified ai app/cli/pkg/action/runevents.go +9 / -0
modified ai app/controlplane/internal/service/workflowrun.go +8 / -0
modified ai app/cli/documentation/cli-reference.md +7 / -0
modified ai app/controlplane/pkg/data/ent/migrate/schema.go +3 / -2
modified ai app/controlplane/pkg/data/workflowrunevent.go +4 / -0
modified ai app/controlplane/pkg/data/ent/migrate/migrations/atlas.sum +2 / -1
created ai app/controlplane/pkg/data/ent/migrate/migrations/20261203225510.sql +2 / -0
modified ai app/controlplane/pkg/data/ent/schema/workflowrunevent.go +2 / -0

Policies (4)

Status Policy Material Messages
✅ Passed ai-config-ai-agents-allowed ai-coding-session-587944 -
✅ Passed ai-config-no-dangerous-commands ai-coding-session-587944 -
✅ Passed ai-config-no-secrets ai-coding-session-587944 -
✅ Passed ai-config-mcp-servers-allowed ai-coding-session-587944 -

Security Checks — ⚠️ 1 failing

⚠️ AI Security Analysis

The per-PR audit did not finish: 3 concerns went unreviewed (spend ceiling or time). No introduced risk was found in what it reviewed, but treat this as incomplete, not clean.

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 -

✅ IaC Scan

Status Policy Messages
✅ Passed iac-misconfiguration -
Scans not applied (2)
Scan Reason
Vulnerability Scan no manifest/lockfile changed
GitHub Actions Scan no workflow 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 26 files

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread app/cli/cmd/attestation_event.go Resolved
Progress moves out of the custom attributes into an optional field of
WorkflowRunEvent, stored in its own column, so other event types can
support it later. Today only custom events accept it. Also treat empty
--current or --total values as wrong values instead of no flags.

Refs #3825

Assisted-by: Claude Code
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>

Chainloop-Trace-Sessions: 5879441f-3738-4aa2-b8ff-46476884884d
@migmartri
migmartri marked this pull request as ready for review December 3, 2026 23:05

@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 31 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

@migmartri
migmartri requested a review from a team December 3, 2026 23:05
@migmartri
migmartri merged commit 1d7c5ab into main Dec 3, 2026
16 checks passed
@migmartri
migmartri deleted the feat/custom-step-progress branch December 3, 2026 23:13
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