Skip to content

feat(engine): honor candidatePaths in metadata lane-fit scoring - #3298

Merged
loopover-orb[bot] merged 3 commits into
JSONbored:mainfrom
kiannidev:feat/engine-metadata-path-lane-fit
Jul 5, 2026
Merged

feat(engine): honor candidatePaths in metadata lane-fit scoring#3298
loopover-orb[bot] merged 3 commits into
JSONbored:mainfrom
kiannidev:feat/engine-metadata-path-lane-fit

Conversation

@kiannidev

Copy link
Copy Markdown
Contributor

Summary

  • Add computeMetadataLaneFit in @jsonbored/gittensory-engine: label-only lane fit by default, full path+label computeLaneFit when optional candidatePaths are present on a metadata candidate.
  • Wire buildMetadataRankInput to use the new helper so discovery batches can respect wantedPaths / blockedPaths from .gittensory-miner.yml when path hints are available.
  • Extend MetadataCandidateIssue with optional candidatePaths (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, and test/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 normalizeCandidatePaths branches (non-string entries). This revision adds explicit computeMetadataLaneFit vitest cases; local diff-cover reports 100% patch coverage on the engine diff.

Test plan

  • npm run build --workspace @jsonbored/gittensory-engine
  • npm run build:miner
  • npx vitest run test/unit/opportunity-metadata-signals.test.ts test/unit/miner-goal-lane-fit.test.ts
  • diff-cover coverage/lcov.info --compare-branch=upstream/main --fail-under=99 → 100%
  • CI validate / validate-code / codecov patch+project / orb review agent

Made with Cursor

kiannidev and others added 3 commits July 5, 2026 02:52
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>
@kiannidev
kiannidev requested a review from JSONbored as a code owner July 5, 2026 01:10
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 5, 2026
@loopover-orb

loopover-orb Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-05 02:41:17 UTC

7 files · 1 AI reviewer · no blockers · readiness 73/100 · CI green · clean

⏸️ Suggested Action - Manual Review

Review summary
The AI review returned non-blocking notes for this change but did not include a separate narrative summary. Review the nits below before deciding this PR.

Nits — 5 non-blocking
  • nit: `packages/gittensory-engine/src/miner-goal-lane-fit.ts:65` still passes `candidateLabels: [...issue.labels]` directly to `computeLaneFit`; if `computeLaneFit` is less tolerant than `computeMinerGoalLaneFit`, consider reusing the same label normalization before crossing into the path-aware scorer.
  • nit: `packages/gittensory-engine/test/miner-goal-lane-fit.test.ts:4` is now a long import line; split it to match the formatting already used in the Vitest coverage file.
  • At `packages/gittensory-engine/src/miner-goal-lane-fit.ts:65`, either normalize labels before calling `computeLaneFit` or add a path-present test with malformed labels so this new branch has the same malformed-input contract as label-only scoring.
  • At `test/unit/opportunity-metadata-signals.test.ts:73`, add one integration assertion for `candidatePaths: []` or blank-only paths with repo `wantedPaths` configured, so the `buildMetadataRankInput` fallback contract is covered at the wiring layer too.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (no linked issue context).
Validation posture ❌ 5/25 Preflight is holding this PR: the review lane is unavailable, so it is not ready for automated review.
Contributor workload ✅ 10/10 Author activity: 1313 registered-repo PR(s), 629 merged, 49 issue(s).
Contributor context ✅ Confirmed Gittensor contributor kiannidev; Gittensor profile; 1313 PR(s), 49 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: kiannidev
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: not available
  • Official Gittensor activity: 1313 PR(s), 49 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Explain no-issue PR.
  • Await review-lane availability.
  • Refresh registry data or choose a registered active repo.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 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.

  • Re-run Gittensory review

@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.25%. Comparing base (c6813b5) to head (4377c4c).
⚠️ Report is 4 commits behind head on main.

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     
Files with missing lines Coverage Δ
...kages/gittensory-engine/src/miner-goal-lane-fit.ts 90.90% <100.00%> (+4.54%) ⬆️
...ages/gittensory-engine/src/opportunity-metadata.ts 100.00% <ø> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gittensory approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit b4727d5 into JSONbored:main Jul 5, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant