feat(planning): reward-risk severity taxonomy, opportunity factors, eligibility gap (#816)#1351
Merged
JSONbored merged 6 commits intoJun 26, 2026
Conversation
…ligibility gap (JSONbored#816) Adds three advisory signals to the miner planning surface: 1. **Action severity** — every `RewardRiskAction` now carries a `severity` field (`"critical" | "warning" | "tip" | "info"`) so UIs can triage the action list at a glance. Classification rules: - `critical` — score gate is blocked (any `scoreBlocker` present) - `warning` — active penalty (cleanup pressure or high closed-PR rate) - `tip` — multiplier opportunity (land PRs, file issues, open new PR) - `info` — planning context (maintainer lane, readiness steps) 2. **Opportunity factors** — `RepoRewardRisk.rewardUpside` gains `opportunityFactors: { competitionFactor, freshnessFactor }`. `competitionFactor` is the ratio of high-risk duplicate clusters to open PRs (0 = open field, 1 = fully contested). `freshnessFactor` decays exponentially with the age of the most-recently-updated open issue (~1.0 at 0 d, ~0.6 at 7 d, ~0.05 at 90 d). 3. **Eligibility gap** — `ContributorRewardRiskStrategy` gains `eligibilityGap: EligibilityGapEntry[]` listing contributor repos where landing or withdrawing 1–5 open PRs would flip the open-PR gate toward scoreable, sorted by fewest cleanups needed (up to 5 entries). OpenAPI schema regenerated; `local-branch.ts` waitAction updated with the new required `severity` field; full branch-coverage tests added.
Contributor
|
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 #1351 +/- ##
==========================================
+ Coverage 95.42% 95.43% +0.01%
==========================================
Files 193 193
Lines 21026 21044 +18
Branches 7614 7618 +4
==========================================
+ Hits 20064 20084 +20
Misses 383 383
+ Partials 579 577 -2
🚀 New features to boost your workflow:
|
JSONbored
approved these changes
Jun 26, 2026
JSONbored
left a comment
Owner
There was a problem hiding this comment.
Screen: ✅ Wanted. #816 is owner-authored, OPEN, gittensor:feature+roadmap; planning signals are core to the maintainer-agent thesis. One coherent subsystem (5 files), real value, low risk. Verdict: MERGE · gittensor:feature. Three deliverables map clause-by-clause to #816, OpenAPI regenerated, both-branch tests, green.
This was referenced Jun 26, 2026
Closed
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the three deliverables from issue #816 (fold upstream-inspired advisor/scan ideas into gittensory miner planning):
RewardRiskActionnow carriesseverity: "critical" | "warning" | "tip" | "info".critical= score gate is blocked by at least onescoreBlocker;warning= active penalty (cleanup pressure or closed-PR rate);tip= multiplier opportunity;info= planning context / maintainer lane.RepoRewardRisk.rewardUpsidegainsopportunityFactors: { competitionFactor, freshnessFactor }.competitionFactor= ratio of high-risk duplicate clusters to open PRs (0 = open field, 1 = fully contested).freshnessFactordecays exponentially with the age of the most-recently-updated open issue (~1.0 at 0 d, ~0.6 at 7 d, ≤0.05 at 90 d).ContributorRewardRiskStrategygainseligibilityGap: EligibilityGapEntry[]listing contributor repos where landing or withdrawing 1–5 open PRs would flip the open-PR gate toward scoreable, sorted by fewest cleanups needed (≤5 entries).OpenAPI schema regenerated (
ui:openapi).local-branch.tswaitActionupdated with the requiredseverityfield. Three new test blocks insignals-coverage.test.tscover both sides of every new branch (cleanupNeeded > 0,hasBlockers, freshness decay, closed-issue exclusion, null-date fallback, eligibility threshold 1–5 vs 0 vs >5).Scope
src/changes only — nosite/,CNAME, or**/lovable/**Validation
npm run typecheck— cleannpm run test:ci— all 3768 tests pass, exit 0npm run ui:openapi:check— passes (JSON regenerated)Safety
close_or_withdraw_low_fit_prsaction fires only for contributor (non-maintainer) laneCloses #816