Skip to content

feat(controlplane): keep workflow run events for the life of the run - #3876

Merged
migmartri merged 1 commit into
mainfrom
feat/permanent-run-events
Dec 3, 2026
Merged

migmartri merged 1 commit into
mainfrom
feat/permanent-run-events

Conversation

@migmartri

@migmartri migmartri commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Workflow run events hold the timeline of a run: failed add actions, custom steps, and the closing event. This is important data about how a run went, not only a live progress signal, so the control plane no longer deletes events after a retention period. Events now stay as long as their run, and go only when the run is deleted.

  • Removes the events retention sweep from the run expirer.
  • Removes the workflow_run_events_retention control plane setting. The field is reserved, and a configuration that still sets it keeps loading.
  • Removes the controlplane.attestations.workflowRunEventsRetention Helm value.
  • Drops the created_at index of workflow_run_events, which only the sweep used.

Spec (#3825): supersedes R-007 (Retention) with R-014 (Run events are kept for the life of the run), and records D-014.

AI disclosure: this change was produced with the assistance of Claude Code.

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

View guided diff

@chainloop-platform

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

Avg score Sessions Failing policies Attribution Files Lines Total Duration
🟡 81% 1 ✅ 0 95% AI / 5% Human 19 +51 / -264 3h5m58s

🟡 81% — 95% AI — ✅ All policies passing

Dec 2, 2026 20:30 UTC · 3h5m58s · $12.79 · 378 in / 87.5k out · claude-code 2.1.334 (claude-opus-5-5)

View session details ↗

Change Summary

Removes age-based event cleanup, retention configuration, and its database index. Keeps run expiry and adds compatibility coverage for obsolete configuration keys. Updates the specification to lifetime-of-run retention.

AI Session Overall Score

🟡 81% — Focused retention removal with passing suites, but long-lived history acceptance remains unverified.

AI Session Analysis Breakdown

🟢 94% · scope-discipline

🟢 The agent declined aggregate quotas after the user selected accepting growth. · High Impact

🟢 91% · solution-quality

🟢 The expirer loses the retention dependency and obsolete deletion methods, rather than hiding cleanup failures. · High Impact

🟢 88% · context-and-planning

No notes.

🟡 75% · user-trust-signal

🟠 The user asked “why didn’t youn push?” after repeated blocked-push explanations, showing a brief expectation mismatch. · Medium Severity

🟡 73% · alignment

🟠 The summary claimed at most 1,000 events per run; the closing event makes 1,001. · Medium Severity

🟡 70% · verification

🟢 The obsolete-key test loads actual configuration and passed in the command package run. · High Impact

🟠 The requested read of events from a run older than 90 days lacks demonstrated acceptance execution. · Medium Severity

🟡 Migration lint was blocked by unavailable authentication and was explicitly reported unrun. · Low Severity


File Attribution

███████████████████░ 95% AI / 5% Human

Status Attribution File Lines
modified ai app/controlplane/pkg/biz/mocks/WorkflowRunEventRepo.go +0 / -73
modified ai app/controlplane/pkg/biz/workflowrun.go +3 / -38
modified ai app/controlplane/pkg/data/workflowrunevent_integration_test.go +0 / -39
modified ai docs/specs/issue-3825-attestation-progress-events.md +23 / -8
modified ai app/controlplane/cmd/main_test.go +14 / -8
modified ai app/controlplane/pkg/biz/workflowrunevent.go +0 / -22
modified ai app/controlplane/pkg/biz/workflowrun_test.go +1 / -20
modified ai app/controlplane/pkg/data/workflowrunevent.go +0 / -21
modified ai app/controlplane/pkg/biz/workflowrun_options_test.go +0 / -14
modified ai app/controlplane/internal/conf/controlplane/config/v1/conf.proto +3 / -5
modified ai app/controlplane/pkg/data/ent/migrate/schema.go +0 / -5
created ai app/controlplane/pkg/data/ent/migrate/migrations/20261202203348.sql +4 / -0
modified ai app/controlplane/cmd/main.go +0 / -3
modified ai app/controlplane/pkg/data/ent/migrate/migrations/atlas.sum +2 / -1
modified ai app/controlplane/pkg/data/ent/schema/workflowrunevent.go +0 / -2
modified ai deployment/chainloop/Chart.yaml +1 / -1
modified ai deployment/chainloop/values.yaml +0 / -2
modified ai deployment/chainloop/README.md +0 / -1
modified ai deployment/chainloop/templates/controlplane/configmap.yaml +0 / -1

Policies (4)

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

Security Checks — ⚠️ 1 failing

⚠️ AI Security Analysis

The per-PR audit did not finish: 1 concern 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 21 files

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

View guided diff | Re-trigger cubic

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

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

View guided diff | Re-trigger cubic

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

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

View guided diff | Re-trigger cubic

@migmartri
migmartri force-pushed the feat/permanent-run-events branch from 1eb1edd to dbd14b6 Compare December 2, 2026 21:33
@migmartri
migmartri requested a review from a team December 2, 2026 21:38
@migmartri
migmartri force-pushed the feat/permanent-run-events branch from dbd14b6 to 5f4458b Compare December 2, 2026 22:55
@migmartri

Copy link
Copy Markdown
Member Author

Rebased onto main after #3877 merged. #3877 took R-013 and D-013 for the skipped status, so this PR's entries are now R-014 (run events are kept for the life of the run) and D-014. The earlier review replies that cite R-013 and D-013 mean these entries. The spec commits are squashed into one commit, 5f4458b.

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

Run events hold the timeline of a run: failed adds, custom steps and the
closing event. They are important data, not only a live progress signal,
so the control plane no longer deletes them after a retention period.

Remove the retention sweep from the run expirer, the
workflow_run_events_retention setting (now reserved, an old config still
loads), its Helm value, and the created_at index that only the sweep used.

Supersedes R-007 of the issue-3825 spec with R-014, records D-014, and
marks the retention references of the spec as superseded. Run events grow
with the number of runs, at most 1,000 client events plus the closing
event for each run, which is accepted.

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

Chainloop-Trace-Sessions: 6fa45112-b259-4fab-9624-8c7abd44f760
@migmartri
migmartri force-pushed the feat/permanent-run-events branch from 5f4458b to b589981 Compare December 2, 2026 23:36

@jiparis jiparis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks!

@migmartri
migmartri merged commit ea4adb4 into main Dec 3, 2026
16 checks passed
@migmartri
migmartri deleted the feat/permanent-run-events branch December 3, 2026 18:38
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