feat(scoring): wire valid-issue token floor into lifecycle and preview (#808)#1617
feat(scoring): wire valid-issue token floor into lifecycle and preview (#808)#1617bohdansolovie wants to merge 4 commits into
Conversation
JSONbored#808) Apply MIN_TOKEN_SCORE_FOR_VALID_ISSUE to linked-issue previews, lifecycle classification, outcome history, score breakdown, and OpenAPI surfaces. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1617 +/- ##
=======================================
Coverage 95.51% 95.52%
=======================================
Files 204 204
Lines 22041 22090 +49
Branches 7963 7989 +26
=======================================
+ Hits 21052 21101 +49
Misses 413 413
Partials 576 576
🚀 New features to boost your workflow:
|
…ored#808) Cover score-breakdown history branches and solver token index edge cases. Co-authored-by: Cursor <cursoragent@cursor.com>
…1617 Cast the default valid-issue token floor for noUncheckedIndexedAccess, fix solver index empty-profile test typing, and cover remaining branches. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review — held for maintainer review
⏸️ Held for maintainer review — Large change — held for manual review; Touches a guarded path — held for manual review Review summary
Nits — 7 non-blocking
Review context
Contributor next steps
Signal definitions
Review detailsGenerated from public PR metadata and the diff. Advisory only; deterministic signals remain authoritative. This PR correctly wires MIN_TOKEN_SCORE_FOR_VALID_ISSUE through three distinct paths: the score-preview gate (validIssueTokenGatePassed), the lifecycle classifier (valid_solved → solved downgrade), and the score-breakdown explainer. The fail-open design in solverMeetsValidIssueTokenFloor (absent score returns true) is the right default for cache-incomplete data, and the state-machine rewrite from solvedByPullRequests.length > 0 to mergedSolverPrs.length > 0 && tokenQualifiedSolverPrs.length > 0 is semantically equivalent on the pre-existing path while correctly gating valid_solved on the token floor. The three previously-missing breakdown components (openIssueMultiplier, mergedHistoryMultiplier, issueDiscoveryHistoryMultiplier) are mentioned in the description but expand scope beyond the floor wiring itself. Nits (5)
🟩 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.
|
…ONbored#1617) Exercise merged/issue-discovery summary branches when observed counts are absent so patch coverage clears the 97% gate. Co-authored-by: Cursor <cursoragent@cursor.com>
JSONbored
left a comment
There was a problem hiding this comment.
merge conflicts/issue has already been resolved.
|
Hi, @JSONbored |
Summary
Wires
MIN_TOKEN_SCORE_FOR_VALID_ISSUE(#808) into contributor-facing scoring and issue-discovery lifecycle:validIssueTokenFloor/validIssueTokenGatePassedand a context blocker (valid_issue_token_floor) when linked-issue mode is active and planned source tokens are below the upstream floor.valid_solved→solvedwhen the official solver PR's GittensortokenScoreis below the floor; outcome history uses the same classifier path.solverTokenScoreIndexFromGittensorindexes official PR token scores from the Gittensor snapshot embedded in contributor profiles.Fixes #808 (partial — valid-issue token floor alongside prior contributor validity and open-issue spam work).
Test plan
npx vitest run test/unit/scoring.test.ts test/unit/signals.test.ts test/unit/score-breakdown.test.tsvalid_issue_token_floorwhensourceTokenScoreis below floor in linked-issue modevalid_solvedwhen solver PRtokenScoreis below floorsolverTokenScoreIndexFromGittensormaps official PR rowsvalidIssueTokenGatecomponentnpm run ui:openapi:check