Skip to content

fix: reconstruct the fork file network instead of checking out fork code - #134

Merged
ernst-dev merged 4 commits into
mainfrom
fix/codecov-fork-network-reconstruction
Sep 1, 2026
Merged

fix: reconstruct the fork file network instead of checking out fork code#134
ernst-dev merged 4 commits into
mainfrom
fix/codecov-fork-network-reconstruction

Conversation

@ernst-dev

@ernst-dev ernst-dev commented Sep 1, 2026

Copy link
Copy Markdown
Member

Reverts #133 and replaces it with a path-only reconstruction.

Codecov resolves report paths against the repository file list. #133 supplied that by checking out the fork, which actions/checkout refuses from workflow_run; the step failed and job-level continue-on-error then silently skipped the upload entirely.

Now the fork build records git ls-files -z next to its coverage, and the privileged job rebuilds those paths as zero-byte files in a scratch repo — no checkout, no fork content, listing validated and failing closed. Placeholders are sufficient because Codecov never receives source: the payload is a path list plus the report, and lcov.info already carries the line, branch and function data.

Search is disabled and the upload names coverage/lcov.info (components) and coverage/clover.xml (build-tools); the CLI warns and skips whichever is absent.

build-tools uploads runner-absolute paths, so only components is a clean single-variable test of the path fix — coverage with absolute paths beats no coverage. cloudscape-design/components#4947 is the test case.

Reverts #133, which checked out the fork to give Codecov a file list.
actions/checkout refuses fork checkouts from workflow_run, so the step
failed and job-level continue-on-error skipped the upload entirely.

The fork build now records git ls-files -z with its coverage, and the
privileged job rebuilds those paths as zero-byte files in a scratch repo.
@ernst-dev
ernst-dev requested a review from a team as a code owner September 1, 2026 10:54
@ernst-dev
ernst-dev requested review from georgylobko and a lite review from Copilot and removed request for a team September 1, 2026 10:54
@ernst-dev ernst-dev assigned pan-kot and unassigned pan-kot Sep 1, 2026
@ernst-dev
ernst-dev requested review from pan-kot and removed request for georgylobko September 1, 2026 10:59

This comment was marked as outdated.

Pinning to lcov.info alone would have silently stopped build-tools, which
emits clover.xml. The CLI warns and skips explicitly named files that are
absent, so listing both is safe for repositories that emit only one.
…fact

A fork that tracks its coverage directory would have coverage/lcov.info in
its file listing, and reconstruction would truncate the real report to zero
bytes before the upload, publishing 0% coverage. Skip those paths; hostile
ones are still rejected because validation runs first.

This comment was marked as outdated.

dirname parses a leading dash as an option, so a tracked file like -foo
aborted the step under set -e and skipped the upload.

This comment was marked as low quality.

This comment was marked as low quality.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@ernst-dev
ernst-dev merged commit 3e0c1c8 into main Sep 1, 2026
40 of 43 checks passed
@ernst-dev
ernst-dev deleted the fix/codecov-fork-network-reconstruction branch September 1, 2026 13:57
ernst-dev added a commit that referenced this pull request Sep 1, 2026
codecov.sh sets IFS=, before splitting CC_FILES, so the newline block
scalar from #134 became one --file argument with an embedded newline and
uploaded nothing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants