Repository navigation
perf: hoist relative package paths and reuse project context in intent stale - #341
Conversation
…t stale - Pass the per-run fsCache through resolveStaleTargets, workspace package enumeration, scanForPolicedIntents, and filterStaleReportSkills so pnpm-workspace.yaml and package.json manifests are read once per stale run. - Compile the skill source policy once in filterStaleReportSkills instead of once per reported skill. - Compute getRelativePackageDir(artifactRoot, packageDir) once per package in buildArtifactSignals and buildWorkspaceCoverageSignals instead of on every artifact entry.
🦋 Changeset detectedLatest commit: 16c71b9 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 |
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 6
✨ Finishing Touches
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 |
|
View your CI Pipeline Execution ↗ for commit 447adaf
☁️ Nx Cloud last updated this comment at |
commit: |
Merging this PR will not alter performance
|
🎯 Changes
fsCachethroughresolveStaleTargets,findWorkspaceRoot,findWorkspacePackages,scanForPolicedIntents, andfilterStaleReportSkillssointent stalereuses cached project-context, workspace-pattern, andpackage.jsonreads instead of re-readingpnpm-workspace.yamlfour times and rootpackage.jsontwice.compileSkillSourcePolicyonce infilterStaleReportSkillsinstead of callingisSourcePermitted(which recompiled the source policy) on every reported skill.getRelativePackageDir(artifactRoot, packageDir)out of the per-artifact loops inbuildArtifactSignalsandbuildWorkspaceCoverageSignalssopath.relativeis computed once per package instead of once per_artifactsentry, and checkhasGeneratedSkillbefore computing uncovered-package metadata inbuildWorkspaceCoverageSignals.benchmarks/intent/stale.bench.ts, Nodev24.14.1win32 x64)maincb45f14)reports workspace drift1.10xhz)reports workspace drift with shared artifacts1.19xhz)✅ Checklist
pnpm run test:pr(runpnpm build:allfirst).🚀 Release Impact