Skip to content

feat(miner): implement generic ContributionProfile extraction - #6979

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
luciferlive112116:feat/contribution-profile-extract-6796
Jul 17, 2026
Merged

feat(miner): implement generic ContributionProfile extraction#6979
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
luciferlive112116:feat/contribution-profile-extract-6796

Conversation

@luciferlive112116

Copy link
Copy Markdown
Contributor

Summary

The extraction half of the AMS contribution-profile chain (#6793): reads a repo's real published signals — its label taxonomy and CONTRIBUTING.md — and produces a populated ContributionProfile per the #6795 schema I just landed. Depends only on #6795, which is merged.

Generic by design — no loopover-specific hardcoding

The issue is explicit that classification must be "generic heuristics, not loopover-specific keyword matching." The extractor recognizes conventional OSS eligibility (good first issue, help wanted, up for grabs, beginner, easy, …) and exclusion (blocked, wontfix, needs triage, …) vocabulary, and — the key #6794 finding — matches over label name AND description, preferring the name but falling back to the description. That's what lets it catch rust's E-easy, which encodes "good first issue" only in the description.

loopover's own gittensor:* labels are deliberately not special-cased — the #6794 inventory found they're the exception, not the shape to generalize from.

Confidence is honest, never a false positive

Per the issue ("a repo with no discoverable signals should produce a low-confidence/empty profile, not a false-positive guess"):

Never throws

Every fetch goes through a bounded, catch-wrapped helper; any transport/HTTP/parse failure degrades that signal to absent/unknown rather than propagating. A malformed repo name returns the safe empty profile without any network call. Fetch is injectable (fetchImpl), following the live-issue-snapshot.js pattern.

Tests

18 cases against fixtures, covering exactly the three the issue names plus every branch:

  • loopover's own convention (help wanted label) → explicit eligibility.
  • A different, explicit convention where the meaning is in the description, not the name → matched via description (a name-only extractor would miss it).
  • A repo with no discoverable signals → fully-absent, low-confidence profile, no throw.
  • Plus: exclusion→inferred, linked-issue requirement from a real-sized doc, the tiny-doc signpost case, .github/ fallback, HTTP-error and thrown-transport degradation, JSON-parse failure, undecodable contents, unnamed-label provenance, a supplied token's Authorization header + a custom apiBaseUrl, the default-now timestamp, and the weakest-completeness rule.

Validation

  • Patch coverage 100%, measured on the codecov-gated .js (packages/loopover-miner/lib/**): 78/78 statements, 51/51 branches, 13/13 functions. The one genuinely-unreachable branch (the global-fetch production default, which every test injects around) carries a /* v8 ignore */ pragma.
  • 18/18 tests pass; the AMS contribution-profile: design the ContributionProfile schema and caching shape #6795 schema sibling suite still green.
  • npm run typecheck — 0 (after the standard engine rebuild) · eslint — 0/0 · prettier --check — clean · node --check (added to the miner build list) — ok · check-miner-package unchanged · rebased on latest main.

Scope & safety

  • Four files, all new except one line in the miner package's node --check list. Wanted paths (packages/, test/).
  • No hot files: touches no src/api/routes.ts, src/mcp/server.ts, the MCP CLI bin, or the stdio-tool count pin — by design, to avoid the base-conflict/count-pin contention.
  • Read-only extraction; no discover behavior change (that's AMS contribution-profile: wire eligibility filtering into discover #6798). No secrets; no changelog/site//CNAME/lovable changes.

Closes #6796

…red#6796)

Reads a repo's real published signals -- label taxonomy + CONTRIBUTING.md -- and
produces a populated ContributionProfile per the JSONbored#6795 schema. Generic by design: it
recognizes conventional OSS eligibility/exclusion vocabulary and matches over label
name AND description (the JSONbored#6794 finding that rust encodes eligibility in descriptions),
with no loopover-specific hardcoding. Never throws: any fetch/parse failure degrades
the signal to absent/unknown, so an unreachable or docs-less repo yields a
low-confidence profile rather than a false-positive guess.

Confidence is honest per signal: recognized eligibility labels are explicit,
conventional exclusion labels inferred, a tiny CONTRIBUTING.md is treated as a signpost
(unknown) not the rules. Fetch is injectable; 100% branch coverage on fixtures for the
loopover convention, a description-only convention, and a no-signals repo.

Closes JSONbored#6796
@superagent-security

Copy link
Copy Markdown
Contributor

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

@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
@loopover-orb

loopover-orb Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Important

🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪

🔍 LoopOver is reviewing…

AI analysis is in progress. This comment will update when the review is complete.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed · 🟪 Reviewing

@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.72%. Comparing base (d6e7404) to head (bce5840).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6979      +/-   ##
==========================================
+ Coverage   89.24%   93.72%   +4.47%     
==========================================
  Files         687      688       +1     
  Lines       68422    68491      +69     
  Branches    18737    18737              
==========================================
+ Hits        61066    64192    +3126     
+ Misses       5647     3302    -2345     
+ Partials     1709      997     -712     
Flag Coverage Δ
shard-1 43.66% <0.00%> (-0.08%) ⬇️
shard-2 36.76% <0.00%> (-0.17%) ⬇️
shard-3 32.89% <0.00%> (-0.18%) ⬇️
shard-4 34.39% <0.00%> (?)
shard-5 31.59% <0.00%> (-0.57%) ⬇️
shard-6 46.14% <100.00%> (+0.38%) ⬆️

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-extract.js 100.00% <100.00%> (ø)

... and 100 files with indirect coverage changes

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoopOver approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 018e261 into JSONbored:main Jul 17, 2026
16 checks passed
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: implement generic label/docs/agent-file extraction

1 participant