feat(advisor): planning advisor with severity taxonomy, opportunity factors, and eligibility-gap view - #834
feat(advisor): planning advisor with severity taxonomy, opportunity factors, and eligibility-gap view #834YB0y wants to merge 10 commits into
Conversation
…actors, and eligibility-gap view (JSONbored#816) Co-Authored-By: YB0y <YB0y@users.noreply.github.com>
|
Note Gittensory Gate skippedPR closed before full evaluation. No late first comment was created.
💰 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. |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
This comment has been minimized.
This comment has been minimized.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #834 +/- ##
==========================================
+ Coverage 96.60% 96.61% +0.01%
==========================================
Files 109 109
Lines 14914 14966 +52
Branches 5390 5406 +16
==========================================
+ Hits 14408 14460 +52
Misses 104 104
Partials 402 402 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
JSONbored
left a comment
There was a problem hiding this comment.
Good:
- Useful planning-advisor shape: severity taxonomy, opportunity factors, eligibility-gap arrays.
- Helper-level test coverage is broad.
- Review bots found no direct logic/security blocker.
Bad:
- Codecov patch/project fail.
- Runtime payload adds new fields, but OpenAPI source/schema is unchanged.
- Existing decision-pack snapshots are returned without defaulting advisoryAdvice/eligibilityGapRepos, despite the new type making them required.
Change requests:
- Update OpenAPI schemas/generated public contract for new fields.
- Default new arrays/factors on cached snapshot paths, or make them explicitly optional.
- Fix Codecov patch/project failure.
|
@JSONbored Could you plz review my PR? Thanks! |
JSONbored
left a comment
There was a problem hiding this comment.
PR #834 — feat(advisor): planning advisor (severity taxonomy, factors, eligibility-gap) [YB0y]
Action: CHANGES REQUESTED
Issue #816: PARTIALLY CI: pass
Good:
- Severity taxonomy (CRITICAL/WARNING/TIP/INFO), competition+freshness opportunity factors, and a
cross-repo eligibility-gap view, with a broad ~34-case helper test suite.
Flagged:
- advisoryAdvice / eligibilityGapRepos are added as REQUIRED fields but cached decision-pack snapshots
are returned without defaulting them — runtime-shape risk on cached read paths. Default them or make optional. - OpenAPI source/generated contract not updated for the new serialized fields.
- competition_factor is computed fresh, not reusing collision/duplicate detection as #816 specifies.
- Confirm reward/score-derived advisory fields stay off public surfaces.
❌ Closed by the review gateNot both reviewers approved (a change/close was recommended). Closed one-shot — address the notes and open a new focused PR. 🔍 Maintainer reviewReviewed 3 file(s) — ✅ all CI green. Suggested action: 🛠️ Request changes. (reviewers split: merge / request changes) Address the suggestions below before merging. Reviewer A · Suggestions
Worth double-checking
Reviewer B · Suggestions
Worth double-checking
|
Summary
Implements the three pillars of the planning advisor requested in #816:
advisoryAdvice: AdvisoryAdviceItem[]list with four machine-readable levels (CRITICAL/WARNING/TIP/INFO) and stablecodeslugs, replacing the existing plain-textscoreBlockers: string[]with a richer parallel structure that consumers can sort, filter, and render by severity.RepoRewardRisk.rewardUpside:competitionFactor(0–1): fraction of open issues that have no competing open PR linked.1.0= zero competition;0.0= every open issue already has a PR working on it.freshnessFactor(0–1): exponential decay of the median age of open issues over a 90-day half-life.1.0= very fresh issue queue; approaches0.0for stale repos.ContributorRewardRiskStrategygainseligibilityGap: EligibilityGapEntry[], a cross-repo surface that surfaces repos where the contributor is just 1–5 open PRs away from dropping back under the scoring threshold. The same view is exposed onContributorDecisionPackaseligibilityGapRepos, derived from the decision pack's existingscoreBlockers. Both lists are sorted ascending byprsNeededToUnlockso the quickest wins appear first.Related Issue
Closes: #816
Change Type
Real Behavior Proof
Advisory severity taxonomy
Opportunity factors
Eligibility-gap view (strategy level)
Eligibility-gap view (decision pack level)
Checklist
npm run typecheckpasses with 0 errorsnpm run test:unit— 1987 tests pass, 0 failuresscoreBlockers: string[]inRepoRewardRiskpreserved —advisoryAdviceis a parallel structured enrichment, not a replacementdecision-pack.ts(4) is consistent with the existingscoreBlockersFortrigger point (openPullRequests >= 5)__rewardRiskInternals/__decisionPackInternalsfor test access — no production-test coupling