Skip to content

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

Closed
kiannidev wants to merge 1 commit into
JSONbored:mainfrom
kiannidev:feat/engine-metadata-path-lane-fit
Closed

feat(engine): honor candidatePaths in metadata lane-fit scoring#3286
kiannidev wants to merge 1 commit 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/** and test/unit/opportunity-metadata-signals.test.ts. Does not overlap with open PRs #3278 (miner CLI), #3284 (enrichment secret-scan), #3255 (review guardrail), or #3281 (grafana).

Test plan

  • npm run build --workspace @jsonbored/gittensory-engine
  • npm run build:miner (engine barrel consumed by miner)
  • npx vitest run test/unit/opportunity-metadata-signals.test.ts (21 tests)
  • Engine package lane-fit tests (computeMetadataLaneFit fallback, path match, blocked path, malformed paths)
  • CI validate / validate-code / codecov patch+project / orb review agent

Made with Cursor

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>
@kiannidev
kiannidev requested a review from JSONbored as a code owner July 5, 2026 00:52
@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

Caution

🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥

🛑 Gittensory review result - fixes required

Review updated: 2026-07-05 00:57:31 UTC

6 files · 1 AI reviewer · no blockers · readiness 73/100 · CI failing · unstable

🛑 Suggested Action - Fix Blockers

Review summary
The change cleanly adds a metadata-specific lane-fit path that preserves the existing label-only behavior when `candidatePaths` are absent and delegates to the shared path+label `computeLaneFit` only when usable paths are present. The wiring in `buildMetadataRankInput` is narrow, the engine barrel export is updated, and the tests exercise fallback, wanted-path, blocked-path, and integration behavior. I do not see a reachable correctness break in the provided diff.

Nits — 4 non-blocking
  • nit: `packages/gittensory-engine/src/miner-goal-lane-fit.ts:24` still says discovery metadata has labels only and path gating belongs in analyze, which is stale now that this same module exposes path-aware metadata lane fit.
  • `packages/gittensory-engine/src/miner-goal-lane-fit.ts:24` should narrow that comment to `computeMinerGoalLaneFit` specifically, for example: `Path-based fit is intentionally omitted from this label-only helper; use computeMetadataLaneFit when metadata includes candidatePaths.`
  • `packages/gittensory-engine/test/miner-goal-lane-fit.test.ts:91` could add one path-present case with a malformed label entry so the new `computeLaneFit` branch preserves the defensive label behavior already covered for `computeMinerGoalLaneFit`.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.

CI checks failing

  • codecov/patch — 81.81% of diff hit (target 99.00%)
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: TypeScript, MDX, C++, HTML, Rust
  • 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

❌ Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.24%. Comparing base (3875335) to head (cb2133b).

Files with missing lines Patch % Lines
...kages/gittensory-engine/src/miner-goal-lane-fit.ts 81.81% 0 Missing and 2 partials ⚠️

❌ Your patch check has failed because the patch coverage (81.81%) is below the target coverage (99.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3286      +/-   ##
==========================================
+ Coverage   94.13%   94.24%   +0.10%     
==========================================
  Files         276      276              
  Lines       30236    30247      +11     
  Branches    11016    11020       +4     
==========================================
+ Hits        28464    28507      +43     
+ Misses       1127     1081      -46     
- Partials      645      659      +14     
Files with missing lines Coverage Δ
...ages/gittensory-engine/src/opportunity-metadata.ts 100.00% <ø> (ø)
...kages/gittensory-engine/src/miner-goal-lane-fit.ts 84.84% <81.81%> (-1.52%) ⬇️

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

@kiannidev
kiannidev marked this pull request as draft July 5, 2026 01:00
@loopover-orb

loopover-orb Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Gittensory is closing this pull request on the maintainer's behalf (CI is failing (codecov/patch)). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed.

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