perf: skip artifact coverage scan when a workspace package has a generated skill #336
Merged
LadyBluenotes(GitHub profile, opens in a new tab)merged 2 commits into
main fromrefs/pull/336/head·merged by LadyBluenotes(GitHub profile, opens in a new tab) 🎯 Changes#
- In
buildWorkspaceCoverageSignals,hasGeneratedSkill(fsCache.findSkillFiles(join(packageDir, 'skills')).length > 0) already establishes coverage for a workspace package, but the loop still ranartifacts.skills.some(...)before checkingif (hasGeneratedSkill || hasArtifactCoverage) continue. - Continue immediately when
hasGeneratedSkillis true so packages with a generatedSKILL.mdskip scanningartifacts.skills. - Reported staleness and
missing-package-coveragesignals do not change. - Adds a patch changeset.
Workspace size (16 artifact skills/pkg, all packages covered by generated SKILL.md) | artifacts.skills visits (main ab9877c) | artifacts.skills visits (PR) | buildWorkspaceCoverageSignals median (main ab9877c, Node v24.14.1 win32 x64, 15 samples) | buildWorkspaceCoverageSignals median (PR) |
|---|---|---|---|---|
| 4 packages (16 artifact skills) | 28 | 0 | 0.0807 ms (min 0.0761, max 0.1318) | 0.0471 ms (min 0.0359, max 0.0727) |
| 30 packages (480 artifact skills) | 6,990 | 0 | 13.8825 ms (min 12.8744, max 24.7973) | 0.4142 ms (min 0.3184, max 0.6736) |
| 60 packages (960 artifact skills) | 28,380 | 0 | 54.0838 ms (min 52.7352, max 97.2282) | 0.9538 ms (min 0.7221, max 1.7053) |
| 120 packages (1,920 artifact skills) | 114,360 | 0 | 228.3996 ms (min 210.6511, max 290.4833) | 1.9434 ms (min 1.5011, max 3.2624) |
✅ Checklist#
- I have followed the steps in the Contributing guide.
- I have tested this code locally with
pnpm run test:pr(runpnpm build:allfirst).
🚀 Release Impact#
- This change affects published code, and I have generated a changeset.
- This change is docs/CI/dev-only (no release).
- 1
✨ Finishing Touches: 💡 1
-
🛠️ Fix failing CI checks: 💡
-
- Commit to this branch
- Create a new PR
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment `@coderabbitai help` to get the list of available commands.-
View your CI Pipeline Execution ↗ for commit 0bbae85200784c06f721490ec4d50d36ae1837bb
Command Status Duration Result nx affected --targets=test:eslint,test:sherif,t...✅ Succeeded 1m 7s View ↗ nx run-many --targets=build✅ Succeeded 2s View ↗
☁️ Nx Cloud last updated this comment at
2026-10-19 00:37:56UTCMerging this PR will not alter performance#
:warning: 8 benchmarks spent significant time in system calls
System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.
✅ 12untouched benchmarks
Comparingperf/stale-skip-covered-artifact-scan(0b2d601) withmain(ab9877c)
Sign in to join this conversation.
🦋 Changeset detected#
Latest commit: 0b2d601913607ac81088ecec3cffd421c3e79be6
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR