Repository navigation
Add upload_coverage_files for uploading coverage reports from disk - #135
Open
shibanalex wants to merge 4 commits into
Open
shibanalex wants to merge 4 commits into
shibanalex wants to merge 4 commits into
Conversation
added 4 commits
November 27, 2026 13:57
Author
|
its me |
This branch has not been deployed
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.
Summary
Adds
upload_coverage_filesonProoflineClientandAsyncProoflineClient, along withCoverageFileandread_coverage_filesinproofline/coverage.py(re-exported fromproofline), bringing Python parity withuploadCoverageFiles/readCoverageFilesinprooflinedev/sdk-typescript(#43).Who this helps
CI jobs uploading LCOV, Cobertura XML, JaCoCo XML, or Go cover profiles from disk no longer need to normalize relative POSIX report names, validate commit SHAs, preserve UTF-8 BOMs, or preflight the 30 MiB request-body limit manually before calling
upload_coverage_reports.Design & prior-art attribution
Follows the
src/coverage.tsdesign merged inprooflinedev/sdk-typescript#43(@IsraelAfangideh), incorporates maintainer review feedback onprooflinedev/sdk-python#37(@Aadhi-07), and closes edge cases surfaced acrosssdk-python#71(@aymandakir),sdk-typescript#76(@mariyam552), andsdk-typescript#79(@Rohit-998):tested_shais required explicitly (full 40-character hex SHA) and never defaults toGITHUB_SHA.realpathmust sit strictly insiderealpath(root), including whenCoverageFile(..., name=...)supplies an explicit report name or when symlinks exist underroot../..segments, empty segments (a//b), leading/trailing slashes, backslashes, Windows drive prefixes, and NUL bytes instead of silently rewriting them.O_NONBLOCK | O_NOFOLLOW, requiresS_ISREG(refusing FIFOs/devices without blocking while letting missing files and directories raise nativeOSErrors), preserves leading UTF-8 BOMs, bounds raw bytes before allocation, and checks the exact compact UTF-8 JSON payload size (separators=(",", ":"), ensure_ascii=False) sent byhttpx2.AsyncProoflineClient.upload_coverage_filesvalidates and snapshotsfilesinto an immutable tuple before running disk reads viaanyio.to_thread.run_sync.upload_coverage_filesinscripts/contracts.py.How it was tested
tests/test_coverage.pycovering sync/async HTTP uploads, BOM preservation, mixed-case 40-char SHAs,GITHUB_SHAnon-fallback, path and symlink escapes (with and without explicitname), invalid POSIX names, duplicate names, non-UTF-8 files, non-regular POSIX FIFOs, sparse files > 30 MiB, exact 30 MiB ± 1 byte wire-JSON boundaries, nativeOSErrorpropagation, and concurrent list mutation during async uploads.scripts/install_smoke.pyto exercise sync and asyncupload_coverage_filesfrom both built artifacts.python3 scripts/check.pyonv10.2.3(scripts/generate.py --check,scripts/contracts.py,ruff check,ruff format --check,mypy proofline scripts, 233pytesttests, andwheel+sdistinstall smoke tests).