Skip to content

feat(miner): exclude discover candidates assigned to the repo owner - #7042

Merged
JSONbored merged 1 commit into
mainfrom
fix/discover-assignee-exclusion-7040
Jul 17, 2026
Merged

feat(miner): exclude discover candidates assigned to the repo owner#7042
JSONbored merged 1 commit into
mainfrom
fix/discover-assignee-exclusion-7040

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

Design note

Unlike the three label-based rules, this check is structural and always-on — per the schema (ContributionAssigneeRuntimeCheck), assignee-exclusion is deliberately not a profile field, so it runs ahead of (and independent of) the existing eligibilityLabels.confidence === "explicit" safe-default gate the label rules are conditioned on. It applies regardless of whether the repo has a trustworthy ContributionProfile at all — tested explicitly (a candidate assigned to the repo owner is excluded even with no profile in the map).

Test plan

  • npm run typecheck — clean.
  • npm run test:coverage (full, unsharded) — 979 files / 18322 tests passed, 0 failures.
  • New tests: 7 in contribution-profile-filter.test.ts (excludes owner-assigned, case-insensitive match, doesn't exclude other assignees, applies with no profile, applies with low-confidence profile, tolerates missing owner/assignees, ignores malformed assignee entries) + 2 integration tests in miner-discover-cli.test.ts (excluded from ranking/enqueueing end-to-end, applies without a profile).
  • All 12 pre-existing contribution-profile-filter.test.ts tests pass unchanged (the new check is purely additive; candidates without owner/assignees are never affected).

Closes #7040, a follow-up to #6798/#7024: that PR candidly scoped out
assignee-exclusion (candidate objects flowing through discover carried
label names but not assignees, and threading them through was flagged as
"a genuine second shared-file change"). This does that threading and adds
the check.

Extends RawCandidateIssue with `assignees` (already present in the same
GitHub list/search payload discover already fetches -- no extra request),
and adds a new `excluded_assignee` reason to contribution-profile-filter.js
for a candidate assigned to its own repo's owner login.

Unlike the three label-based rules, this check is structural and always-on
-- per the schema (ContributionAssigneeRuntimeCheck), assignee-exclusion is
deliberately not a profile field, so it runs ahead of (and independent of)
the existing eligibilityLabels.confidence === "explicit" safe-default gate
that the label rules are conditioned on. It applies regardless of whether
the repo has a trustworthy ContributionProfile at all.
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@JSONbored JSONbored self-assigned this Jul 17, 2026
@JSONbored
JSONbored merged commit 7a7f90a into main Jul 17, 2026
14 checks passed
@JSONbored
JSONbored deleted the fix/discover-assignee-exclusion-7040 branch July 17, 2026 19:19
@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 17, 2026
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.75%. Comparing base (a752b8f) to head (995686f).
⚠️ Report is 19 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7042   +/-   ##
=======================================
  Coverage   93.74%   93.75%           
=======================================
  Files         692      692           
  Lines       68740    68752   +12     
  Branches    18768    18768           
=======================================
+ Hits        64443    64455   +12     
  Misses       3302     3302           
  Partials      995      995           
Flag Coverage Δ
shard-1 43.38% <0.00%> (-0.42%) ⬇️
shard-2 36.85% <75.00%> (+<0.01%) ⬆️
shard-3 33.16% <66.66%> (-0.20%) ⬇️
shard-4 34.39% <8.33%> (+0.49%) ⬆️
shard-5 31.63% <33.33%> (-0.58%) ⬇️
shard-6 46.07% <8.33%> (+0.30%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
.../loopover-miner/lib/contribution-profile-filter.js 100.00% <100.00%> (ø)
packages/loopover-miner/lib/opportunity-fanout.js 98.27% <100.00%> (+0.03%) ⬆️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AMS contribution-profile: exclude candidates assigned to the repo owner in discover

1 participant