feat(miner): AMS contribution-eligibility filtering for discover - #7034
feat(miner): AMS contribution-eligibility filtering for discover#7034JSONbored wants to merge 1 commit into
Conversation
Closes #6798: wires eligibility filtering into `discover` -- resolves each target repo's ContributionProfile (cache hit when fresh, extracted live otherwise, via the already-merged #6797 store) and excludes a candidate missing a required eligibility label, carrying an exclusion label, or assigned to the repo's own owner, before ranking/enqueueing. Safe-default posture: a label rule only excludes when the profile actually resolved a matcher for it -- a repo whose conventions couldn't be read excludes nothing via those rules, so discover never silently skips real work on an unreadable repo. Conflicting signals (a candidate that is both eligible and excluded) resolve conservatively: exclusion always wins. Both --dry-run and the real run apply the same filtering; dry-run never opens the cache, matching the existing policy-doc/policy-verdict cache convention. Excluded candidates and their reasons are surfaced in both --json and the human-readable summary. Extends RawCandidateIssue with `assignees` (already present in the same GitHub list/search payload discover already fetches -- no extra request) to support the assignee-exclusion check. Label-description matching (the "rust E-easy" case from the #6794 signal inventory) uses a separate, conditional per-repo label fetch rather than widening the candidate shape further, since descriptions are needed far less often than names.
|
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 #7034 +/- ##
========================================
Coverage 93.73% 93.74%
========================================
Files 690 692 +2
Lines 68591 68692 +101
Branches 18748 18748
========================================
+ Hits 64293 64394 +101
Misses 3302 3302
Partials 996 996
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Closing as superseded — #7024 independently implemented and merged this exact issue (#6798) while this PR was in progress, along with #6797 (#7001) before it. Both sub-issues are now closed. One real gap remains: #7024 candidly scoped out assignee-exclusion as a follow-up ("a genuine second shared-file change... rather than half-wiring it"). I'll file a narrow, separate issue/PR for just that piece on top of the now-merged contribution-profile-filter.js, rather than carrying this duplicate diff forward. |
Summary
discover: resolves each target repo'sContributionProfile(cache hit when fresh, extracted live otherwise) and excludes a candidate missing a required eligibility label, carrying an exclusion label, or assigned to the repo's own owner, before ranking/enqueueing.RawCandidateIssuewithassignees— already present in the same GitHub list/search payloaddiscoveralready fetches, no extra request.contribution-profile-eligibility.js(matcher evaluation + conditional per-repo label-description fetch for the "rust E-easy" description-field case) andcontribution-profile-resolution.js(cache-or-extract-live per repo).Design notes
value: null) excludes nothing via that rule —discovernever silently skips real work on an unreadable repo.--dry-runand the real run apply the same filtering;--dry-runnever opens the cache, matching the existing policy-doc/policy-verdict cache convention.--jsonand the human-readable summary (excludedByEligibility).Test plan
npm run typecheck— clean.npm run test:coverage(full, unsharded) — 978 files / 18314 tests passed, 0 failures.