[Feature] : API ENDPOINTS PR 4 : Samples Endpoints#1133
Open
pulk17 wants to merge 4 commits into
Open
Conversation
pulk17
requested review from
canihavesomecoffee and
thealphadollar
as code owners
June 24, 2026 11:21
pulk17
force-pushed
the
api-pr4-samples
branch
21 times, most recently
from
June 27, 2026 07:17
4fbc686 to
e949987
Compare
This was referenced Jun 29, 2026
|
9 tasks
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.



[FEATURE]
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
Overview
Fourth PR of the CI API stack (#1130 → #1141, merge bottom-up). Per-run regression test results and the sample catalog — the endpoints a dashboard would poll to render a run's result table.
Endpoints
GET /runs/{id}/samples— per-regression-test outcomes for a run, with derived status, exit codes, runtime, categories, and per-output-file status. Filters:?status,?name,?tag,?category.GET /runs/{id}/samples/{regression_test_id}— single result detailGET /samples— catalog with?name(LIKE wildcards escaped),?extension,?sha256,?tag,?status=active|inactivefiltersGET /samples/{id}— single sample with active regression test countGET /samples/{id}/history— how a sample performed across runs, with?branch/?platform/date filtersGET /regression-tests— definitions;?activedefaults totrueand rejects anything that isn'ttrue/falsewith a 400 rather than silently coercingDesign notes
failure_signaturein history distinguishes real regressions from noise:diff_mismatch:output:{id}(same signature across runs ⇒ same diff failing),exit_code_mismatch:rc:{code}, ormissing_output. This is the field to use when deciding whether a failure is new./runs/{id}/summary, with expected-output rows threaded through, so a sample can't showpasshere while the summary counts it asmissing_output.?statusfiltering happens in Python after a fixed set of batched queries. That's a deliberate trade-off — runs have at most a few hundred regression tests. What's not tolerated is per-row lazy loading: all relationship access is eager-loaded (joinedload/selectinload), and a regression test pins this down by asserting the endpoint's SQL query count is identical with 1 and 9 regression tests. If someone reintroduces an N+1, that test fails.Testing
16 new tests; 140 total at this layer. Filter matrices, invalid-filter 400s, missing-output consistency with
/summary, history signatures, and the flat-query-count guard.