feat(engine): honor candidatePaths in metadata lane-fit scoring - #3298
Conversation
When discovery metadata includes touched paths, rank metadata candidates with the same path+label goal model used in analyze instead of labels alone. Co-authored-by: Cursor <cursoragent@cursor.com>
Exercise non-string and blank candidatePaths through vitest so changed engine lines meet the 99% patch gate. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-05 02:41:17 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.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3298 +/- ##
==========================================
+ Coverage 94.14% 94.25% +0.11%
==========================================
Files 276 276
Lines 30246 30257 +11
Branches 11021 11025 +4
==========================================
+ Hits 28474 28519 +45
+ Misses 1127 1081 -46
- Partials 645 657 +12
🚀 New features to boost your workflow:
|
Summary
computeMetadataLaneFitin@jsonbored/gittensory-engine: label-only lane fit by default, full path+labelcomputeLaneFitwhen optionalcandidatePathsare present on a metadata candidate.buildMetadataRankInputto use the new helper so discovery batches can respectwantedPaths/blockedPathsfrom.gittensory-miner.ymlwhen path hints are available.MetadataCandidateIssuewith optionalcandidatePaths(backward compatible — absent paths keep existing label-only behavior).Why no linked issue
Small, self-contained engine parity gap: analyze-phase ranking already uses path+label goal matching via
computeLaneFit, but metadata fan-out only had labels. This closes that gap without changing miner CLI wiring or hosted review code.Conflict avoidance
Touches only
packages/gittensory-engine/**,test/unit/miner-goal-lane-fit.test.ts, andtest/unit/opportunity-metadata-signals.test.ts. Does not overlap with open PRs (#3278 miner CLI, #3296 enrichment secret-scan, #3255 review guardrail, #3290 linear adapter, #3292 signals classifiers, etc.).Codecov patch
Prior attempt (#3286) missed vitest coverage on
normalizeCandidatePathsbranches (non-string entries). This revision adds explicitcomputeMetadataLaneFitvitest cases; localdiff-coverreports 100% patch coverage on the engine diff.Test plan
npm run build --workspace @jsonbored/gittensory-enginenpm run build:minernpx vitest run test/unit/opportunity-metadata-signals.test.ts test/unit/miner-goal-lane-fit.test.tsdiff-cover coverage/lcov.info --compare-branch=upstream/main --fail-under=99→ 100%Made with Cursor