Skip to content

fix(miner): correct usedDefaultGoalSpec for non-matching goal specs#2873

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
james3773:feat/miner-manage-status
Jul 4, 2026
Merged

fix(miner): correct usedDefaultGoalSpec for non-matching goal specs#2873
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
james3773:feat/miner-manage-status

Conversation

@james3773

@james3773 james3773 commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix rankCandidateIssuesWithSummary so usedDefaultGoalSpec reflects whether ranked repos actually matched a supplied goal spec, not merely whether any goal spec map was present.

Problem

When callers passed goalSpecsByRepo entries for repos that did not appear in the ranked candidate list, the summary incorrectly reported usedDefaultGoalSpec: false even though every ranked issue fell back to DEFAULT_MINER_GOAL_SPEC.

Validation

  • Added regression tests for non-matching and matching goal-spec repos.
  • Full CI gate on push.

Safety

  • Pure local ranker change only — no network, no persistence, no secrets.

@james3773
james3773 requested a review from JSONbored as a code owner July 4, 2026 02:57
@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.02%. Comparing base (02af6c1) to head (275e599).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2873   +/-   ##
=======================================
  Coverage   96.02%   96.02%           
=======================================
  Files         259      259           
  Lines       28350    28350           
  Branches    10306    10306           
=======================================
  Hits        27223    27223           
  Misses        491      491           
  Partials      636      636           
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@james3773 james3773 closed this Jul 4, 2026
@james3773 james3773 changed the title feat(miner): add manage-phase status CLI command feat(miner): add claim-ledger staleness expiry sweep Jul 4, 2026
@james3773 james3773 reopened this Jul 4, 2026
@james3773
james3773 force-pushed the feat/miner-manage-status branch from 17de87a to ccbf93d Compare July 4, 2026 03:03
@james3773 james3773 closed this Jul 4, 2026
Report default goal-spec usage per ranked repo match instead of treating any supplied goalSpecsByRepo map as custom spec usage.

Co-authored-by: Cursor <cursoragent@cursor.com>
@james3773 james3773 reopened this Jul 4, 2026
@james3773
james3773 force-pushed the feat/miner-manage-status branch from ccbf93d to 275e599 Compare July 4, 2026 03:08
@james3773 james3773 changed the title feat(miner): add claim-ledger staleness expiry sweep fix(miner): correct usedDefaultGoalSpec for non-matching goal specs Jul 4, 2026
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x 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 03:13:19 UTC

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

⏸️ Suggested Action - Manual Review

Review summary
The change correctly moves `usedDefaultGoalSpec` from “was any spec map supplied” to “did any ranked issue lack a matching repo spec,” and the added tests cover the reported non-matching and matching repo cases. The implementation is small and stays local to the miner ranker, with no schema or API shape changes. The only notable rough edge is that repo-key normalization is repeated inside a nested scan instead of being centralized, but that does not break behavior for the visible inputs.

Nits — 3 non-blocking
  • nit: `packages/gittensory-miner/lib/opportunity-ranker.js:87` normalizes every spec repo inside the ranked-issue loop; precomputing a normalized `Set` would make the matching rule clearer and avoid repeated trim/lowercase work.
  • In `packages/gittensory-miner/lib/opportunity-ranker.js:87`, replace `specRepos.some(...)` with a normalized `Set` lookup to make the repo matching semantics explicit.
  • 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: 906 registered-repo PR(s), 642 merged, 38 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jony376; Gittensor profile; 906 PR(s), 38 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: 906 PR(s), 38 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

@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 f031ff3 into JSONbored:main Jul 4, 2026
10 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