Repository navigation
Conversation
kaihere14
requested review from
canihavesomecoffee and
thealphadollar
as code owners
October 23, 2026 19:35
GET /runs only filters on statuses that map directly to the latest TestProgress row (queued, running, canceled). pass, fail, error and incomplete are not stored in the database: they are computed per request from every sample's TestResult rows once a run completes, so they cannot be used as a query filter. The RunStatus parameter advertised all six values (with example: pass), so spec-conforming clients got a 400. Narrow the enum and document why. Run.status and RunSummary.status were missing "error", which the API already returns when a completed run reported no results or fewer samples than configured. Add it to both enums.
kaihere14
force-pushed
the
fix/runs-status-spec
branch
from
October 23, 2026 19:37
bd0e2b6 to
5fb003b
Compare
|
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.



Problem
The
RunStatusquery parameter onGET /runsadvertised[queued, running, pass, fail, canceled, incomplete]withexample: pass,but
list_runs()(mod_api/routes/runs.py) only acceptsqueued,runningand
canceled. Any client following the spec, including the spec's ownexample, got a 400 for
status=pass,failorincomplete.Separately,
Run.statusandRunSummary.statusdid not listerror, eventhough the API returns it (
_check_completed_run_statusinmod_api/services/status.py) andRunSchemaalready allows it.Why the spec, not the code
pass,fail,errorandincompleteare not stored in the database bydesign. They are computed per request from every sample's
TestResultrowsonce a run has completed, so they cannot be expressed as a SQL filter without
deriving status for every run before pagination. Only the statuses that map
directly to the latest
TestProgressrow can be filtered on.Changes (
openapi-ci-api.yamlonly)components/parameters/RunStatus: enum narrowed to[queued, running, canceled],example changed to
running, and the description explains why outcomestatuses cannot be filtered on.
components/schemas/Run.status: addederror, with a note on when it is returned.components/schemas/RunSummary.status: addederror.No code changes. The spec still validates with
openapi-spec-validator.