[Feature] : API ENDPOINTS PR 7: Test Artifacts#1141
Open
pulk17 wants to merge 7 commits into
Open
Conversation
pulk17
requested review from
canihavesomecoffee and
thealphadollar
as code owners
June 29, 2026 18:40
pulk17
force-pushed
the
api-pr7-artifacts
branch
from
June 29, 2026 18:57
542cd43 to
3236d01
Compare
pulk17
force-pushed
the
api-pr7-artifacts
branch
from
July 20, 2026 10:22
3236d01 to
028ed4c
Compare
pulk17
force-pushed
the
api-pr7-artifacts
branch
from
July 20, 2026 10:36
028ed4c to
484306e
Compare
|
This was referenced Jul 20, 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):
Overview
Final PR of the CI API stack (#1130 → #1141, merge bottom-up). Today, when a CI run finishes, the VM is deleted and everything not in
TestResults/dies with it — debugging a crash means re-running the whole job and hoping. This PR preserves the three artifacts that matter for post-mortem debugging — the built binary, the coredump (Linux), and the combined stdout log — and exposes them through the API.How it works
VM side (
install/ci-vm/ci-linux/ci/runCI,install/ci-vm/ci-windows/ci/runCI.bat)After the test phase, the scripts upload artifacts through a new
artifactuploadtype on the existing token-authenticated progress-reporter endpoint — no new auth surface. Upload robustness:curl --fail+ explicit exit-code logging on failure, so a failed upload appears in the run log instead of dying silentlyif errorlevel 1to the||operator:%ERRORLEVEL%expands at parse time inside parenthesized blocks, andif errorlevel 1misses the negative NTSTATUS codes that actual crashes produce. A comment in the script documents this for the next person.Server side (
mod_ci/controllers.py)Handles
artifactuploadnext to the existing upload types. Target filenames are derived server-side from artifact type + platform (ccextractor/ccextractorwinfull.exe,coredump,combined_stdout.log) — never trusted from the uploaded filename. Files land underSAMPLE_REPOSITORY/test_artifacts/{run_id}/.API side (
GET /runs/{id}/artifacts,results:read)Lists binary/coredump/stdout artifacts alongside the build log and per-test output files, with
?typefilter, sizes,storage_status, and download URLs. Heavy metadata (signed URLs, file sizes) is resolved only for the returned page.CI — new
ci-vm-scripts.ymlworkflow shellchecks the Linux VM scripts on any PR touching them.Deployment notes
SAMPLE_REPOSITORYis bucket-backed in production (the same mechanism that servesTestResults/signed URLs), sodownload_urlresolves with zero new GCS code. On a local/dev install,storage_status: degradedsignals a local-only file.Testing
11 new tests (7 in
tests/test_cifor the upload handler — filename derivation, type validation, rejection paths; 4 API tests for the listing endpoint, missing-storage handling, and?typefiltering). 189 API + 212 CI tests total at this layer;bash -nand shellcheck clean.