Skip to content

[heft-jest-plugin] Validate and compact raw V8 coverage - #6208

Open
Yashwanth Reddy Verupaka (yashwanth195) wants to merge 3 commits into
microsoft:mainfrom
yashwanth195:user/yverupaka/jest-v8-coverage
Open

Yashwanth Reddy Verupaka (yashwanth195) wants to merge 3 commits into
microsoft:mainfrom
yashwanth195:user/yverupaka/jest-v8-coverage

Conversation

@yashwanth195

@yashwanth195 Yashwanth Reddy Verupaka (yashwanth195) commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds raw V8 coverage validation and compaction to support future coverage aggregation across Jest shards. Keep nested functions separate so an executed outer range does not incorrectly give coverage to an uncalled inner function.

Details

Validate every observation before merging or baseline replacement, reject incompatible source/maps and count overflow, and retain one observation per script without mutating inputs. Declare @bcoe/v8-coverage@0.2.3 directly and regenerate Rush approval and both subspaces' dependency metadata.

This does not enable sharding, collect coverage or convert reports. Callers remain responsible for JSON shape, source identity and source-map integrity checks.

How it was tested

  • node common\scripts\install-run-rush.js install — passed for both subspaces.
  • node common\scripts\install-run-rush.js test --only @rushstack/heft-jest-plugin --production --parallelism 4 — passed build, lint and all 42 tests after prerequisite builds.
  • node common\scripts\install-run-rush.js change --verify --target-branch upstream/main --no-fetch — passed.

The 37 new cases cover real V8 nested-function capture parity, summed counts, bounded retention, both baseline orders, malformed observations, shebang/byte offsets, source/map conflicts, overflow and input isolation.

Impacted documentation

Package README only; no website documentation changes.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs triage

Development

Successfully merging this pull request may close these issues.

1 participant