Skip to content

feat(miner): enqueue ranked discovery into portfolio queue - #3074

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
pekar9781:feat/miner-enqueue-ranked-discovery-v3
Jul 4, 2026
Merged

feat(miner): enqueue ranked discovery into portfolio queue#3074
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
pekar9781:feat/miner-enqueue-ranked-discovery-v3

Conversation

@pekar9781

Copy link
Copy Markdown
Contributor

Summary

Scope

  • The PR title follows type(scope): short summary Conventional Commit format (feat — new miner capability).
  • Focused on portfolio discovery orchestration only — no CLI, network, or unrelated miner changes.

Validation

  • npm run test:ci locally — CI will run the full gate on push.
  • Unit tests cover enqueue ordering, minRankScore cutoff, malformed row skipping, in_progress preservation, and event-ledger append.

Safety

  • No secrets, wallet details, hotkeys, or private scoring output in code or PR text.
  • Deterministic, read/write-local only: no network calls.

UI Evidence

Not applicable — miner library only.

Notes

Follow-up to #2292 (portfolio queue foundation) and #2302 (opportunity ranker) — connects rank → queue → ledger locally without GitHub calls.

API edges fail closed: non-array rankedIssues throws invalid_ranked_issues; an explicitly provided but invalid eventLedger throws invalid_event_ledger.

Co-authored-by: Cursor <cursoragent@cursor.com>
@pekar9781
pekar9781 requested a review from JSONbored as a code owner July 4, 2026 12:20
@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:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 4, 2026
@loopover-orb

loopover-orb Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Warning

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

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-04 12:25:02 UTC

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

⏸️ Suggested Action - Manual Review

Review summary
This adds a small local bridge from ranked issue rows into the portfolio queue, and the core path is coherent: invalid rows are skipped, rankScore is passed through as priority, and the existing queue store preserves in-progress rows. I do not see a reachable correctness break in the changed files, and the tests exercise the main queue ordering, cutoff, invalid-row, and ledger append behavior. The main cleanup is tightening the public type contract so it matches the intentionally tolerant runtime API.

Nits — 5 non-blocking
  • nit: packages/gittensory-miner/lib/portfolio-discovery.d.ts:23 types `rankedIssues` as `readonly EnqueueRankedDiscoveryInput[]`, but packages/gittensory-miner/lib/portfolio-discovery.js:60 intentionally accepts and counts malformed rows, so consumers cannot call the documented skip-invalid behavior without casts.
  • nit: packages/gittensory-miner/lib/portfolio-discovery.js:75 increments `summary.enqueued` for every valid row even when the underlying queue store preserves an existing `in_progress` row and does not actually requeue it, so the metric name is a little stronger than the behavior.
  • packages/gittensory-miner/lib/portfolio-discovery.d.ts:23: change the input type to `readonly unknown[]` or add a separate loose input type if malformed-row skipping is part of the public API.
  • packages/gittensory-miner/lib/portfolio-discovery.js:75: either rename `enqueued` to `accepted`/`processed` or compare the returned queue entry if you need the summary to mean a row was actually queued or refreshed.
  • 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: 956 registered-repo PR(s), 680 merged, 42 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jony376; Gittensor profile; 956 PR(s), 42 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: jony376
  • 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: 956 PR(s), 42 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 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.08%. Comparing base (27c2182) to head (69d3f43).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3074   +/-   ##
=======================================
  Coverage   96.08%   96.08%           
=======================================
  Files         265      265           
  Lines       29077    29077           
  Branches    10588    10588           
=======================================
  Hits        27940    27940           
  Misses        493      493           
  Partials      644      644           
🚀 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 ab01335 into JSONbored:main Jul 4, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant