Skip to content

fix: offer workflow run conclusions in the actions_list status filter - #4022

Open
burrows99 wants to merge 3 commits into
github:mainfrom
burrows99:fix/workflow-runs-status-conclusions
Open

burrows99 wants to merge 3 commits into
github:mainfrom
burrows99:fix/workflow-runs-status-conclusions

Conversation

@burrows99

Copy link
Copy Markdown
Contributor

Summary

The workflow_runs_filter.status enum of actions_list now lists the workflow run conclusions (success, failure, cancelled, ...) as well as the lifecycle statuses, so a client that follows the schema can ask for failed runs directly.

Why

GET /repos/{owner}/{repo}/actions/runs documents its status parameter as "the check run status or conclusion", one of completed, action_required, cancelled, failure, neutral, skipped, stale, success, timed_out, in_progress, queued, requested, waiting, pending. The tool advertised only queued, in_progress, completed, requested, waiting. The server already passes any value through (SDK validation of this filter is relaxed in actionsValidationSchema), so only the advertised contract was short, but that is what models and form-building clients read. The bundled workflow-failure-triage skill even worked around it: "there is no filter for the outcome, so filter to completed and read conclusion off the results".

Checked against the real API: actions/runs?status=failure on this repository returns 2500 runs, all completed/failure; status=cancelled and status=action_required likewise.

No upstream issue is associated with this fix. Reproduced on main at 9b7b200.

flowchart TD
    A[Client wants failed workflow runs] --> B{status enum in actions_list}
    B -->|Before| C[Only lifecycle values, failure not offered]
    B -->|After| D[status failure returns only failed runs]
Loading

What changed

  • pkg/github/actions.go: the status enum lists every value the endpoint documents (adds pending and the nine conclusions); description says "status or conclusion".
  • pkg/github/__toolsnaps__/actions_list.snap: refreshed with UPDATE_TOOLSNAPS=true.
  • pkg/github/typed_actions_outputs_test.go: TestActionsAdvertisedInputMetadata pins the new enum.
  • pkg/github/actions_test.go: new subtest checks that status: failure reaches the API as ?status=failure.
  • pkg/skills/catalog/skills/workflow-failure-triage/SKILL.md: drop the "no outcome filter" workaround and point at status: failure.

Narrated recording in the MCP Inspector, before then after (sound on). Server run with stdio --read-only --toolsets=actions against github/github-mcp-server:

actions-list-status-conclusions.mp4

Edge cases and unchanged behaviour checked (in the running server through the Inspector, as shown in the video):

  • status: cancelled returns only cancelled runs (edge case: another conclusion)
  • status: failure with branch: main returns failed runs on main (edge case: combined with another filter)
  • status: completed still returns completed runs (unchanged)
  • no status still lists the latest runs, total 31621 vs 2500 for completed (unchanged)

MCP impact

  • No tool or API changes
  • Tool schema or behavior changed
    Nine conclusions and pending added to the advertised workflow_runs_filter.status enum of actions_list. Requests are handled as before.
  • New tool added

Prompts tested (tool changes only)

  • "List the failed workflow runs in github/github-mcp-server"
  • "Show cancelled workflow runs on main"

Security / limits

  • No security or limits impact

Tool renaming

  • I am renaming tools as part of this PR (e.g. a part of a consolidation effort)
    • I have added the new tool aliases in deprecated_tool_aliases.go
  • I am not renaming tools as part of this PR

Lint & tests

  • Linted locally with ./script/lint
    golangci-lint v2.14.0 (the pinned version) on ./pkg/github/...: 0 issues; gofmt -s -l pkg/github clean.
  • Tested locally with ./script/test
    go test ./pkg/github/ ./pkg/skills/... pass. With the source change reverted and the tests kept, TestActionsAdvertisedInputMetadata and Test_ActionsList (toolsnap) fail. generate-docs produced no README change. I did not run the whole repository suite.

Docs

  • Not needed
  • Updated (README / docs / examples)

Skills

  • Updated relevant skills or confirmed no bundled skill applies
    workflow-failure-triage described the missing outcome filter; updated. repository-health-review and release-preparation only filter by branch; no change needed.

AI assistance (Claude Code) was used to find the bug, write the fix and tests, and record the video.

🤖 Generated with Claude Code

GET /repos/{owner}/{repo}/actions/runs filters its status parameter by
status or conclusion (success, failure, cancelled, ...), but the
advertised workflow_runs_filter.status enum listed only five lifecycle
statuses. Clients that follow the schema could not ask for failed runs
and had to fetch completed runs and filter them themselves.

List every value the endpoint documents, refresh the tool snapshot, and
check that a conclusion reaches the API.
The workflow-failure-triage skill told agents there was no outcome
filter for workflow runs. The status filter now offers the conclusions,
so point it at status: failure.
@burrows99
burrows99 requested a review from a team as a code owner December 3, 2026 21:35
Copilot AI adaptive review requested due to automatic review settings December 3, 2026 21:35

Copilot AI 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.

🟢 Approval recommended

No active review issues are identified, and the change is supported by schema, forwarding, metadata, snapshot, and guidance updates.

No open issues 🎉

What changed in this PR

Updates actions_list to advertise workflow-run conclusion filters, enabling direct queries for failed or cancelled runs.

Changes:

  • Expanded the status schema enum and description.
  • Added metadata and request-forwarding tests.
  • Refreshed the tool snapshot.
  • Updated failure-triage guidance.
File Description
pkg/​skills/​catalog/​skills/​workflow-failure-triage/​SKILL.md Documents filtering workflow runs directly by failure conclusion.
pkg/​github/​typed_actions_outputs_test.go Verifies the advertised workflow-run status enum metadata.
pkg/​github/​actions.go Expands the workflow-run status filter enum and description.
pkg/​github/​actions_test.go Tests forwarding conclusion filters to the API.
pkg/​github/​__toolsnaps__/​actions_list.snap Refreshes the actions_list tool schema snapshot.

Review effort: Lite (adaptive)

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.

3 participants