Skip to content

feat(scoring): surface the issue-discovery validity floor in the score breakdown#1874

Closed
RenzoMXD wants to merge 1 commit into
JSONbored:mainfrom
RenzoMXD:feat/scoring-issue-discovery-history-breakdown
Closed

feat(scoring): surface the issue-discovery validity floor in the score breakdown#1874
RenzoMXD wants to merge 1 commit into
JSONbored:mainfrom
RenzoMXD:feat/scoring-issue-discovery-history-breakdown

Conversation

@RenzoMXD

Copy link
Copy Markdown
Contributor

Summary

explainScoreBreakdown (src/services/score-breakdown.ts) explained every other scoring multiplier -- density, contribution bonus, label, issue, credibility, review penalty, open-PR pressure, open-issue spam, and now the merged-PR history floor (#1801) -- but silently omitted the issueDiscoveryHistoryMultiplier, even though it can zero an entire issue-discovery preview when a contributor's observed validSolvedIssues or issueCredibility falls below the upstream floors (MIN_VALID_SOLVED_ISSUES, MIN_ISSUE_CREDIBILITY).

What this adds

An issueDiscoveryHistoryBreakdown component mirroring the sibling mergedHistoryBreakdown (#1801):

  • neutral when either solved-issue evidence dimension is unobserved (the floor is not enforced for the preview -- matches preview.ts:410 issueDiscoveryHistoryKnown);
  • full when both observed dimensions meet the upstream floors;
  • blocked -- with a 100-leverage "land more solved-by-PR-validated issues and grow issue credibility" lever -- when either is below the floor.

A contributor in the issue-discovery lane whose evidence is below the floors now sees an actionable lever instead of an opaque zero. Purely additive explanation; no scoring behavior change. The multiplier is consulted whenever linkedIssueMode !== "none" (independent of the per-repo issueDiscoveryPolicy), so the breakdown is real value on every issue-discovery preview.

Scope

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage -- test/unit/score-breakdown.test.ts 12/12 pass; src/services/score-breakdown.ts is 100% statements / 100% functions / 100% lines (the new component's three branches -- unobserved, meets-floors, below-floors -- are each covered).

Targeted run:

npx vitest run test/unit/score-breakdown.test.ts --coverage --coverage.include='src/services/score-breakdown.ts'
# 12/12 passed; 100% statements/functions/lines

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed (a forbidden-term assertion is included).
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics (every summary/lever runs through the existing sanitizePublicComment).
  • No auth, cookie, CORS, GitHub App, Cloudflare, or session changes -- a purely additive explanation projection over an already-computed multiplier; no scoring logic change.
  • No UI changes.
  • No docs/changelog changes.

UI Evidence

Not applicable -- backend score-breakdown projection with no visible UI, frontend, docs, or extension surface.

…e breakdown

explainScoreBreakdown explained every other scoring multiplier (density,
contribution bonus, label, issue, credibility, review penalty, open-PR
pressure, open-issue spam, merged-PR history floor in JSONbored#1801) but
silently omitted the issueDiscoveryHistoryMultiplier, even though it can
zero an entire issue-discovery preview when a contributor's observed
validSolvedIssues or issueCredibility falls below the upstream floors
(MIN_VALID_SOLVED_ISSUES, MIN_ISSUE_CREDIBILITY).

Add an issueDiscoveryHistoryBreakdown component mirroring the sibling
mergedHistoryBreakdown (JSONbored#1801): neutral when no solved-issue evidence is
observed (the floor is not enforced for the preview, matching
preview.ts:410 issueDiscoveryHistoryKnown), full when both observed
dimensions meet the upstream floors, and blocked -- with a 100-leverage
"land more solved-by-PR-validated issues and grow issue credibility"
lever -- when either is below the floor. Purely additive explanation;
no scoring behavior change.
@RenzoMXD RenzoMXD requested a review from JSONbored as a code owner June 30, 2026 12:26
@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jun 30, 2026
@gittensory-orb

gittensory-orb Bot commented Jun 30, 2026

Copy link
Copy Markdown

Warning

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

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-06-30 19:09:59 UTC

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

⏸️ Suggested Action - Manual Review

  • Touches a guarded path — held for manual review

Review summary
The change adds a dedicated issue-discovery history component to the public score breakdown and covers the neutral, full, and blocked paths in unit tests. The core multiplier wiring is additive and the component is sanitized consistently with the existing breakdown entries. The main visible risk is messaging precision: the new neutral branch collapses either missing evidence dimension into “no solved-issue evidence,” which can mislead when only one dimension is absent.

Nits — 6 non-blocking
  • nit: src/services/score-breakdown.ts:151 says “no solved-issue evidence observed” whenever either validSolvedIssues or issueCredibility is undefined, but one dimension may be present while the other is missing; split the copy or say “incomplete solved-issue evidence observed.”
  • nit: test/unit/score-breakdown.test.ts:63 should include "issueDiscoveryHistoryMultiplier" in the componentNames arrayContaining check so the broad “each multiplier” test locks in this new component alongside the siblings.
  • src/services/score-breakdown.ts:151: change the neutral summary to “incomplete solved-issue evidence observed” or branch on which field is undefined so contributors do not get inaccurate guidance.
  • test/unit/score-breakdown.test.ts:63: add "issueDiscoveryHistoryMultiplier" to the expected component list to prevent future regressions that remove the new breakdown from the top-level projection.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.
  • Touches a guarded path — held for manual review — A maintainer must review and merge this change.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
Related work ⚠️ 3 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High review scope from cached public metadata (size label size:M; no linked issue context).
Validation posture ❌ 5/25 Preflight is holding this PR; address the blocker before review.
Contributor workload ✅ 10/10 Author activity: 53 registered-repo PR(s), 25 merged, 7 issue(s).
Contributor context ✅ Confirmed Gittensor contributor RenzoMXD; Gittensor profile; 53 PR(s), 7 issue(s).
Gate result ⚠️ Not blocking Advisory; not blocking this PR.
Review context
  • Author: RenzoMXD
  • 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: 53 PR(s), 7 issue(s).
  • Related work: Titles/paths share 8 meaningful terms. (PR #1877)
  • Related work: Titles/paths share 8 meaningful terms. (PR #1879)
  • Related work: Items reference the same linked issue feat(enrichment): Churn-hotspot + bug-density scorer #1513. (issue #1513, PR #1882)
  • Additional title-only matches omitted; title-only overlap does not block.
Contributor next steps
  • Explain no-issue PR.
  • Review top overlaps.
  • Add a concise scope and risk note.
  • Fix the blocker.
  • Triage stale or unlinked PRs.
  • Refresh registry data or choose a registered active repo.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
  • Check active issues and PRs before submitting.
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

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Please fix this:

The main visible risk is messaging precision: the new neutral branch collapses either missing evidence dimension into “no solved-issue evidence,” which can mislead when only one dimension is absent.

@JSONbored JSONbored closed this Jun 30, 2026
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 30, 2026
JSONbored pushed a commit that referenced this pull request Jun 30, 2026
…wn (#1877)

explainScoreBreakdown explained every other scoring multiplier (density,
contribution bonus, label, issue, credibility, review penalty, open-PR
pressure, open-issue spam, merged-PR history floor in #1801, and the
issue-discovery validity floor now in #1874) but silently omitted the
timeDecayMultiplier, even though it multiplies into the final score
(preview.ts:432) and is the only remaining multiplier on scoreEstimate
without a breakdown component.

Add a timeDecayBreakdown: neutral when the multiplier is >= 0.99 (the
PR is fresh or upstream time-decay -- env SCORING_TIME_DECAY_ENABLED,
default OFF -- is disabled for the preview), and reduced with an aged-PR
lever when the multiplier has decayed. Purely additive explanation; no
scoring behavior change.
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 1.25x multiplier. gittensor Gittensor contributor context size:M This PR changes 30-99 lines, ignoring generated files.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants