fix(ci): stabilize CLI coverage shard ownership#6747
Conversation
📝 WalkthroughWalkthroughCLI coverage sharding now assigns tests deterministically by project and path using salted hashing. The sequencer applies this behavior to CLI and integration projects, while tests verify stable ownership, roster balance, recorded assignments, and project gating. ChangesStable CLI coverage sharding
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage remains at 96%, unchanged from the branch. TypeScript / code-coverage/cliThe overall coverage in the branch remains at 79%, unchanged from the branch. Show a code coverage summary of the most impacted files.
Updated |
E2E Advisor RecommendationRequired E2E: None Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
|
PR Review Advisor — No blocking findingsMerge posture: No blocking advisor findings This is an automated review. Required findings need action before merge. Warnings and optional suggestions do not require a response or follow-up. A human maintainer makes the final merge decision. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@test/cli-coverage-sequencer.test.ts`:
- Line 4: Replace the live repository lookup through
checkedInCliCoverageEntries() in the CLI coverage sequencer test with a fixed
roster fixture, keeping the test deterministic and independent of the Git
worktree and executable. If repository validation is still needed, move it into
a separate integration test.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 1924c424-b14d-4f24-98a9-d4aafc1cb23a
📒 Files selected for processing (2)
test/cli-coverage-sequencer.test.tstest/helpers/cli-coverage-sequencer.ts
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@test/cli-coverage-sequencer.test.ts`:
- Around line 131-136: Update the assertion in the “keeps a representative test
roster balanced across the eight CI shards” test to enforce a maximum shard load
of 105% of average by changing the 1.06 multiplier to 1.05. Preserve the
existing shard assignment and weight calculations.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: d903a799-4edc-4e29-9311-2be58371e1de
📒 Files selected for processing (1)
test/cli-coverage-sequencer.test.ts
Summary
Replace roster-sensitive CLI coverage allocation with stable project/path ownership so adding, removing, or renaming one test no longer moves unrelated tests between coverage shards. The eight-shard parallel run remains intact, and the checked-in timing model keeps the slowest shard within 5% of average load.
The first coverage comparison for this PR may show one final set of per-file changes because it intentionally moves from the old allocation to the stable baseline; subsequent test-roster changes will preserve existing ownership.
Changes
Type of Change
Quality Gates
Verification
Verifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run check:diffpassed when hooks were skipped or unavailablenpx vitest run --project integration test/cli-coverage-sequencer.test.ts(8 tests passed)npm test(1,468 files and 16,584 tests passed; 3 files and 40 tests skipped)npm run docsbuilds without warnings (doc changes only)Signed-off-by: Carlos Villela cvillela@nvidia.com