Skip to content

feat(controlplane): allow filtering workflow runs by workflow and version#3173

Merged
migmartri merged 2 commits into
chainloop-dev:mainfrom
migmartri:feat/list-workflow-runs-by-workflow-and-version
Jun 9, 2026
Merged

feat(controlplane): allow filtering workflow runs by workflow and version#3173
migmartri merged 2 commits into
chainloop-dev:mainfrom
migmartri:feat/list-workflow-runs-by-workflow-and-version

Conversation

@migmartri

@migmartri migmartri commented Jun 8, 2026

Copy link
Copy Markdown
Member

Description

Enables filtering workflow runs by workflow and project version together, and makes version filtering usable from the CLI.

  • Removes the restriction that made the workflow and version filters mutually exclusive on the workflow run list endpoint. They are independent dimensions and now compose as an AND, returning the runs of a given workflow at a given version. There was no clear reasoning for the original restriction.
  • Adds a --version flag to chainloop workflow workflow-run list. The flag takes a project version name (e.g. v1.2.0) and requires --project, since a version name is unique only within a project. It can be combined with --workflow.
  • On the API, WorkflowRunServiceListRequest.project_version (UUID) is deprecated in favor of a new project_version_name field that is resolved to a version within the given project. The dependency on project_name is enforced both at the API layer and server-side. The deprecated UUID field is kept for backward compatibility.

closes #3172

AI Disclosure

This contribution was assisted by Claude Code.

…sion

Workflow and version filters were mutually exclusive on the workflow run
list endpoint. They are independent dimensions and compose as an AND: a
run carries both a workflow edge and a version_id column, so filtering by
both returns the runs of a given workflow at a given version. The version
is a globally-unique UUID, so it does not need a project to disambiguate
it.

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

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 2 files

Re-trigger cubic

@chainloop-platform

chainloop-platform Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

AI Session Analysis

Avg score Sessions Failing policies Attribution Files Lines Total Duration
🟡 83% 1 ✅ 0 99% AI / 1% Human 6 +142 / -19 44m3s

🟡 83% — 99% AI — ✅ All policies passing

Jun 8, 2026 20:38 UTC · 44m3s · $36.27 · 111.6k in / 305.1k out · claude-code 2.1.168 (claude-opus-4-8)

View session details ↗

Change Summary

  • Adds workflow-run filtering by workflow and version in biz logic and regression coverage.
  • Adds CLI --version filtering by version name and requires --project.
  • Deprecates UUID project_version, adds project_version_name, resolves it server-side, and updates generated API and docs.

AI Session Overall Score

🟡 83% — Strong implementation, but planning and direct server-path verification stayed partial.

AI Session Analysis Breakdown

🟢 92% · alignment

🟢 AI clarified the UUID-versus-name contract before changing the API and CLI surfaces. · High Impact

🟢 91% · user-trust-signal

🟢 User follow-ups expanded scope cleanly from backend fix to CLI support and cleanup. · High Impact

🟢 90% · scope-discipline

No notes.

🟢 88% · solution-quality

No notes.

🟡 72% · verification

🟢 AI flipped the workflow-run regression test red-to-green and reran the 60-test suite. · High Impact

🟠 The new project-version-name server path lacks a direct service or integration test. · Medium Severity

💡 Add the cheapest end-to-end check or a manual run whenever a new server path lacks harness coverage.

🟡 68% · context-and-planning

🟠 The backend, API, CLI, and docs expansion ran without any visible plan, TODO list, or plan-mode artifact. · Medium Severity

💡 Write a short visible plan before editing multi-layer changes so scope and checkpoints stay explicit.


File Attribution

███████████████████░ 99% AI / 1% Human

Status Attribution File Lines
created ai app/cli/cmd/workflow_workflow_run_list_test.go +65 / -0
modified ai app/controlplane/internal/service/workflowrun.go +34 / -6
modified ai app/controlplane/api/controlplane/v1/workflow_run.proto +22 / -5
modified ai app/cli/cmd/workflow_workflow_run_list.go +11 / -3
modified ai app/cli/pkg/action/workflow_run_list.go +9 / -5
modified human app/cli/documentation/cli-reference.mdx +1 / -0

Policies (4)

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

Powered by Chainloop and Chainloop Trace

@migmartri migmartri requested a review from a team June 8, 2026 21:18
Add a --version flag to `workflow workflow-run list` so runs can be
filtered by project version. The flag takes a version name (e.g. v1.2.0)
and requires --project, since a version name is unique only within a
project, and composes with --workflow.

On the API, WorkflowRunServiceListRequest.project_version (UUID) is
deprecated in favor of project_version_name, resolved to a version
within the given project. The dependency on project_name is enforced
both at the API layer (CEL) and server-side.

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

Chainloop-Trace-Sessions: 62f19a0d-f8a8-45d0-b208-c22bd4327f45
@migmartri migmartri force-pushed the feat/list-workflow-runs-by-workflow-and-version branch from 8f4bbeb to 59144fb Compare June 8, 2026 21:22
@migmartri migmartri merged commit 5899e3b into chainloop-dev:main Jun 9, 2026
15 checks passed
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.

WorkflowRun List API cannot filter by workflow and version simultaneously

2 participants