[Feature] : API ENDPOINTS PR 5 : Result Data and Baseline Approval#1134
Open
pulk17 wants to merge 5 commits into
Open
[Feature] : API ENDPOINTS PR 5 : Result Data and Baseline Approval#1134pulk17 wants to merge 5 commits into
pulk17 wants to merge 5 commits into
Conversation
pulk17
requested review from
canihavesomecoffee and
thealphadollar
as code owners
June 24, 2026 11:26
pulk17
force-pushed
the
api-pr5-results
branch
8 times, most recently
from
June 27, 2026 07:43
bc5b0ea to
05e55cc
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
Fifth PR of the CI API stack (#1130 → #1141, merge bottom-up). Access to the actual output artifacts behind a result — expected files, produced files, diffs — plus the admin workflow for accepting a changed output as the new baseline.
Endpoints
GET /runs/{id}/samples/{sid}/regression-tests/{rid}/outputs/{oid}/expectedGET .../outputs/{oid}/actualGET .../outputs/{oid}/diffPOST /runs/{id}/samples/{sid}/baseline-approvalFile content semantics
?format), truncated at 1 MiB. Thesha256field always covers the complete file even whencontentis truncated, so clients can verify a full download against it. Truncated responses include adownload_url(signed GCS URL when available);storage_statusdistinguishesok/degraded/missing.got IS NULL, i.e. nothing was stored separately),/actualresponds with a relative 303 to/expected. Relative on purpose: HTTP clients only resend theAuthorizationheader on same-origin redirects, and an absolute URL would also break behind a reverse proxy.?format=unified.safe_resolve, which rejects traversal attempts — covered by tests.Baseline approval
POST .../baseline-approval(admin role +baselines:write) repoints theRegressionTestOutputbaseline at the produced output's hash, optionally deleting variant files (remove_variants). Guardrails, each tested:Because this mutates a global baseline (affecting every future run), every approval is audit-logged with the approving user, run, regression test, and output ids.
Testing
24 new tests; 164 total at this layer. Content encodings, truncation + sha256 semantics, the 303 redirect round-trip, structured and unified diffs, approval happy path + every rejection path, role/scope boundaries (contributor with
baselines:writestill 403s), and path traversal.