Skip to content

feat(scoring): wire contributor validity floors into score preview (#808) - #1284

Merged
JSONbored merged 5 commits into
JSONbored:mainfrom
bohdansolovie:feat/808-contributor-validity-gates
Jun 26, 2026
Merged

feat(scoring): wire contributor validity floors into score preview (#808)#1284
JSONbored merged 5 commits into
JSONbored:mainfrom
bohdansolovie:feat/808-contributor-validity-gates

Conversation

@bohdansolovie

Copy link
Copy Markdown
Contributor

Summary

Completes the remaining #808 contributor validity floors by wiring upstream eligibility gates into score preview:

  • Merged PR history floor (MIN_VALID_MERGED_PRS): zeroes the estimate when repo-level merged count is known and below the floor; inferred from contributor evidence when omitted.
  • Issue-discovery validity floor (MIN_VALID_SOLVED_ISSUES, MIN_ISSUE_CREDIBILITY): applied when issue-discovery is relevant (non-zero issueDiscoveryShare or linked-issue mode); skipped when history is unknown.
  • Local branch analysis now passes mergedPullRequests, validSolvedIssues, and issueCredibility from outcome history.
  • Scenario previews (cleanGates, afterPendingMerges, bestReasonableCase) project history cleanup; gate deltas and public blocker text updated.

Fixes #808 (partial — completes contributor validity wiring alongside prior open-issue spam and test-file weight work).

Test plan

  • npm run test:ci (or targeted test/unit/scoring.test.ts + test/unit/local-branch.test.ts)
  • Merged floor: at floor passes, below floor blocks with merged_pr_history_floor
  • Unknown merged count does not block
  • Evidence inference for merged count
  • Issue-discovery floor blocks when relevant and below floors
  • Issue-discovery floor skipped when not relevant or history unknown
  • bestReasonableCase and afterPendingMerges scenario projections

…SONbored#808)

Mirror upstream merged-PR and issue-discovery eligibility gates in preview,
local branch wiring, scenario projections, and API/OpenAPI schemas.

Co-authored-by: Cursor <cursoragent@cursor.com>
@bohdansolovie
bohdansolovie requested a review from JSONbored as a code owner June 24, 2026 23:24
@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.41%. Comparing base (823749a) to head (69b91f0).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1284   +/-   ##
=======================================
  Coverage   95.40%   95.41%           
=======================================
  Files         193      193           
  Lines       20973    21006   +33     
  Branches     7581     7609   +28     
=======================================
+ Hits        20010    20043   +33     
  Misses        383      383           
  Partials      580      580           
Files with missing lines Coverage Δ
src/api/routes.ts 94.60% <ø> (ø)
src/openapi/schemas.ts 100.00% <ø> (ø)
src/scenarios/scenario-summary.ts 100.00% <ø> (ø)
src/scoring/preview.ts 99.02% <100.00%> (+0.10%) ⬆️
src/signals/local-branch.ts 97.20% <100.00%> (+0.02%) ⬆️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…ONbored#808)

Only apply issue-discovery validity when linkedIssueMode is active, and
bump local-branch fixtures to established contributor history so existing
scenario tests stay valid under the merged-PR floor.

Co-authored-by: Cursor <cursoragent@cursor.com>
…bored#808)

Remove dead nullish-coalescing branches in gate blockers/deltas and add
coverage for contributor-history wiring, public blocker text, and actions.

Co-authored-by: Cursor <cursoragent@cursor.com>
@bohdansolovie

Copy link
Copy Markdown
Contributor Author

@JSONbored
Could you continue review please?
Thank you for your work

@JSONbored JSONbored added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jun 26, 2026
@JSONbored

Copy link
Copy Markdown
Owner

@JSONbored Could you continue review please? Thank you for your work

Please note, if you comment/message for reviews in the future, it's a +5 day wait to get reviewed. Too many people keep bugging me to review - I know the PRs need to be reviewed and I'll review them when time permits :)

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

Confirmed net-new on current main — #835 wired the issue-discovery constants into the engine; this closes the preview-side gap so a miner's projection actually reflects the validity floors. Conservative "unknown ⇒ don't gate" semantics, mirrored as blocker + gate-delta + scenario, OpenAPI regenerated. On the active preview-accuracy line, real value, low maintenance. Merge. (Minor: it links the now-closed #808; the work itself is the legitimate follow-up.)

@dosubot dosubot Bot added the lgtm label Jun 26, 2026
@JSONbored
JSONbored merged commit 4e9a1fd into JSONbored:main Jun 26, 2026
14 checks passed
@github-actions github-actions Bot mentioned this pull request Jun 26, 2026
12 tasks
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.

feat(scoring): model (or explicitly scope out) the issue-discovery / issue-spam dimension

2 participants