Skip to content

feat(scoring): add draft-PR awareness to classification and queue health#1189

Merged
JSONbored merged 2 commits into
JSONbored:mainfrom
oktofeesh1:feat/draft-pr-signals
Jun 24, 2026
Merged

feat(scoring): add draft-PR awareness to classification and queue health#1189
JSONbored merged 2 commits into
JSONbored:mainfrom
oktofeesh1:feat/draft-pr-signals

Conversation

@oktofeesh1

Copy link
Copy Markdown
Contributor

Summary

  • isDraftPullRequest() in src/scoring/pending-pr-scenarios.ts now checks pr.isDraft first, before falling through to title-pattern and label matching. Every other draft-detection site in the codebase (local-branch.ts:625, engine.ts:3968, commands.ts:1299, agent-sweep.ts:41, processors.ts:837) uses pr.isDraft directly; this function was the only outlier, silently misclassifying GitHub-native draft PRs as blocked when they lacked a draft title or label.
  • buildQueueHealth() gains a new draftPullRequests signal (count of open draft PRs) and surfaces an inactive_draft_prs finding when any draft PR has gone 14+ days without an update — letting maintainers distinguish genuinely abandoned drafts from stale reviewable work without changing the existing stalePullRequests accounting.

Scope

  • Changes are scoped to src/ and test/
  • No migration, OpenAPI, or cf-typegen changes required
  • No secrets, trust scores, wallet addresses, or reward values introduced
  • site/, CNAME, and **/lovable/** untouched

Validation

  • npm run test:ci fully green (3705 tests pass, 217 test files)
  • git diff --check clean

Safety

  • No auth, session, or CORS paths changed
  • No public PR comment surface changed (queue health is maintainer-facing only)
  • isDraftPullRequest() change is additive — existing title-pattern and label checks are preserved as fallback

isDraftPullRequest() now checks pr.isDraft first, matching every other
draft-detection site in the codebase (local-branch.ts, engine.ts,
commands.ts). GitHub-native draft PRs without a draft title or label
were previously misclassified as blocked.

buildQueueHealth() gains a draftPullRequests signal and surfaces an
inactive_draft_prs finding when any draft PR has not updated in 14+
days, letting maintainers distinguish abandoned drafts from stale
reviewable work.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@oktofeesh1
oktofeesh1 requested a review from JSONbored as a code owner June 24, 2026 06:56
@dosubot dosubot Bot added the size:S label Jun 24, 2026
@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 94.69%. Comparing base (9dfe6ad) to head (e6fee56).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1189   +/-   ##
=======================================
  Coverage   94.68%   94.69%           
=======================================
  Files         157      157           
  Lines       19074    19079    +5     
  Branches     6905     6907    +2     
=======================================
+ Hits        18061    18066    +5     
  Misses        424      424           
  Partials      589      589           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored JSONbored added the gittensor:priority Maintainer-selected Gittensor priority — scores a 1.5x multiplier. label Jun 24, 2026
@JSONbored JSONbored removed the gittensor:priority Maintainer-selected Gittensor priority — scores a 1.5x multiplier. label Jun 24, 2026
@JSONbored
JSONbored merged commit a82f346 into JSONbored:main Jun 24, 2026
14 checks passed
@JSONbored JSONbored added gittensor:priority Maintainer-selected Gittensor priority — scores a 1.5x multiplier. gittensory:needs-human-review labels Jun 24, 2026
@github-actions github-actions Bot mentioned this pull request Jun 24, 2026
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:priority Maintainer-selected Gittensor priority — scores a 1.5x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants