fix(api): apply the status filter on run list endpoints - #1086
Open
arberx wants to merge 2 commits into
Open
Conversation
GET /runs and GET /projects/:name/runs accepted ?status= and ignored it: ?status=running&limit=20 returned 20 completed rows. Both routes now filter with eq(runs.status, status), validated against the RunStatuses enum alongside the existing kind filter; an unknown value is a 400 that names the param and its allowed values, and an empty value still means no filter. The two filters share one contracts schema (runListFilterQuerySchema), the OpenAPI param enums derive from the same Zod enums (the hand-copied kind list had fallen four kinds behind RunKinds), and the SDK is regenerated. canonry runs gains --status and the canonry_runs_list MCP tool gains kind/status so agents get the same filter as the API. Patch bump to 4.180.2: the diff exceeds the 100-line threshold. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…y bump Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Both run list endpoints typed and parsed a status query parameter but never read it, so GET /runs?status=running returned completed rows. An ignored filter is worse than a rejected one: a caller polling for in-flight work sees a full page of history and cannot tell. This applies the filter, validates it against the run status enum, and mirrors it to the CLI and MCP surfaces so every agent path accepts the same filters.
What ships
Test coverage
Validation
🤖 Generated with Claude Code