feat(engine): add pickTopMetadataOpportunitiesAtOrAboveScore helper#3340
Conversation
Compose metadata min-score filtering with a top-N cap so discovery callers can threshold and limit in one pure helper. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3340 +/- ##
=======================================
Coverage 93.88% 93.88%
=======================================
Files 280 281 +1
Lines 30534 30538 +4
Branches 11120 11122 +2
=======================================
+ Hits 28666 28670 +4
Misses 1211 1211
Partials 657 657
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-05 04:49:12 UTC
⏸️ Suggested Action - Manual Review Review summary Nits — 5 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Summary
pickTopMetadataOpportunitiesAtOrAboveScore(candidates, context, minScore, limit)to@jsonbored/gittensory-engine: filters viarankMetadataOpportunitiesAtOrAboveScore, then returns the top N survivors.metadata-top-min-score.tscomposes the merged metadata helpers from feat(engine): add pickTopMetadataOpportunities helper #3331 and feat(engine): add rankMetadataOpportunitiesAtOrAboveScore helper #3336.Why no linked issue
Completes the metadata discovery ranker toolkit (rank → threshold → top-N) without callers chaining helpers manually.
Conflict avoidance
Touches only
packages/gittensory-engine/src/metadata-top-min-score.ts(new),packages/gittensory-engine/src/index.ts(one export line), andtest/unit/metadata-top-min-score.test.ts(new). No overlap with open enrichment, miner CLI, queue, signals, or review PRs.Codecov patch
Local
diff-coverreports 100% patch coverage onmetadata-top-min-score.ts.Test plan
npm run build --workspace @jsonbored/gittensory-enginenpm run build:minernpx vitest run test/unit/metadata-top-min-score.test.ts(6 tests)diff-cover coverage/lcov.info --compare-branch=main --fail-under=99→ 100%Made with Cursor