feat(workspace): add sampling to loader diff harness + bit show coverage#10352
Merged
davidfirst merged 1 commit intorefactor/component-loading-v2-take-2from May 7, 2026
Conversation
Adds BIT_LOADER_DIFF_SAMPLE=N to skip the partner on most calls. Lets the harness run on workspaces big enough that V1+V1 in parallel would OOM the default 4GB heap. Adds a bit-show e2e (the previous "bit show isn't covered" report turned out to be a stale-compile artifact). Documents actual command coverage in SNAPSHOT-CONTRACT.md.
6682e50
into
refactor/component-loading-v2-take-2
10 of 12 checks passed
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.
Builds on #10349. Two small follow-ups to the harness:
1. `BIT_LOADER_DIFF_SAMPLE=N` for big workspaces
On large workspaces (bit7 itself, ~300 components), running both loaders for every call doubles cache footprint and OOMs Node's default 4GB heap. `BIT_LOADER_DIFF_SAMPLE=10` runs the partner only every 10th call. The previously-skipped e2e test (`bit status` on a tagged+modified workspace) now passes with sample rate 50.
Trade-off documented in `SNAPSHOT-CONTRACT.md`: sampling can miss regressions on non-sampled calls. Use the lowest rate the workspace can afford.
2. `bit show` coverage confirmed
The earlier "bit show doesn't trigger the harness" report turned out to be a stale-compile artifact — once the workspace component is recompiled with the latest `workspace.ts`, `bit show comp1` produces a header line and zero diffs. Added an e2e test to pin this.
`bit list` still doesn't trigger the harness, but that's by design: it only reads `consumer.bitMap.bitmapIdsFromCurrentLane` and never loads components. Documented in `SNAPSHOT-CONTRACT.md` under "Command coverage".
Verification