[Feature] : API ENDPOINTS PR 4 : Samples Endpoints#1133
Open
pulk17 wants to merge 6 commits into
Open
Conversation
17c6f1a to
4fbc686
Compare
|
This was referenced Jun 29, 2026
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):
Samples endpoints (PR 4/6)
Summary
Part 4 of 6 (supersedes #1117). Adds endpoints for media samples, their per-run
results, cross-run history, and the regression-test catalogue. (Baseline
approval is in PR 5, since it operates on result data.)
Endpoints (
mod_api/routes/samples.py)GET /runs/{run_id}/samples— per-run results, one row per regression test,with
?status/?name/?tag/?category. Status uses the same expected-outputcomparison as
/runs/{id}/summary, so the two can't disagree.GET /runs/{run_id}/samples/{regression_test_id}— a single result within arun. The path id is the regression_test_id, not
Sample.id(a "samplewithin a run" is identified by its regression test); the response carries both.
GET /samples— catalogue;?name(LIKE-escaped),?extension,?sha256,?tag,?status=active|inactive. Filtered + paginated at the DB level.GET /samples/{sample_id}— sample metadata.GET /samples/{sample_id}/history— cross-run history with afailure_signatureto separate genuine regressions from infra flakes;batch-loads to avoid N+1.
GET /regression-tests— definitions;?active(defaults true),?category,?tag,?sample_id.Schemas / tests
schemas/samples.pyserializes samples/results/history without leaking internalrelationships.
tests/base.pygainssetup_run_data()andget_token()to cutduplication across API tests.
Testing
145 tests; history verified against N+1 regressions; tag/offset edge cases
covered. Lint/type clean. (Consolidated caveats are in PR 6.)
Next
PR 5 (#1134): results data and baseline approvals.