feat(miner): design the ContributionProfile schema + caching shape#6970
Conversation
…SONbored#6795) Defines the ContributionProfile shape AMS uses to represent a repo's learned contribution-eligibility rules, grounded in the JSONbored#6794 real-repo signal inventory (not designed in the abstract). Schema/design only -- no extraction (JSONbored#6796) or discover wiring (JSONbored#6798). Three inventory findings drove the shape: eligibility labels are matchers over name AND description (not a fixed name list, since rust/deno/kubernetes use custom taxonomies); every rule is independently absent with per-signal confidence (signal quality varies within one repo); and the linked-issue requirement is an optional slot, not a spine field (it is loopover-local, not an ecosystem norm). Assignee exclusion is modelled as a runtime check, not a cached rule. Adds the design doc, the .d.ts interfaces, a constants+helpers .js (100% covered), and a schema test. Names the cache table + TTL so JSONbored#6797 and this schema agree. Closes JSONbored#6795
|
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 #6970 +/- ##
=======================================
Coverage 93.71% 93.71%
=======================================
Files 686 687 +1
Lines 68392 68404 +12
Branches 18730 18730
=======================================
+ Hits 64093 64105 +12
Misses 3302 3302
Partials 997 997
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-17 16:53:16 UTC
Review summary Nits — 5 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Summary
Defines the
ContributionProfileshape AMS uses to represent what it has learned about a repo's contribution-eligibility rules, before any extraction (#6796), caching (#6797) ordiscoverwiring (#6798) is built against it. Schema/design only — no extraction logic, nodiscoverchanges.Deliverables (mirroring the
miner-goal-specprecedent): a design doc underpackages/loopover-miner/docs/, the TypeScript interfaces (.d.ts), a constants + pure-helpers module (.js), and a schema test.Grounded in #6794, not the abstract
The issue is explicit that this must be "informed by #6794's actual findings, not assumed upfront." I wrote that inventory (#6948), and three of its findings drove decisions the abstract shape would have gotten wrong — each is cited inline in the doc and the
.d.ts:E-easy's description — a name-only match misses it.absent, with per-signal confidence — not a single repo-level score. Signal quality varies widely within one repo (rust: great label descriptions, no PR template; react: a PR template, almost no label descriptions).absentis first-class, distinct fromunknown.CONTRIBUTING.mdmentions vs 0 for react/rust/kubernetes), so modelling it as core would encode our own norm as an ecosystem norm.Plus: assignee-exclusion is modelled as a runtime check (
ContributionAssigneeRuntimeCheck), not a cached rule, because #6794 found it isn't documented for most repos and is derivable from the issue's ownassigneesat query time.completeness= weakest signalcompleteness = weakestConfidence([...spine signals]), not the average — so one strong signal never masks an absent one, anddiscovertreats a partial profile conservatively. TheweakestConfidencehelper is provided and fully tested.Caching shape
Names the SQLite store table (
miner_contribution_profile) and TTL (CONTRIBUTION_PROFILE_CACHE_TTL_MS= 7 days), mirroringpolicy-doc-cache.js, so #6797 and this schema agree on them rather than each inventing one.Validation
.js(packages/loopover-miner/lib/**): 13/13 statements, 4/4 branches, 3/3 functions — measured. The.d.tsis type-only (no runtime) and the doc/test are outside the gate.weakestConfidence, and thatemptyContributionProfile's three rules are independent objects), and a doc test asserting every field + the three cited findings are documented (so the schema stays traceable to evidence).npm run typecheck— 0 (after the standard engine rebuild; the one pre-existingbuildGateDispositionserror is on cleanmaintoo, from a stale dist, and CI builds fresh).eslint— 0/0 ·prettier --check— clean ·node --check— ok ·check-miner-package— unchanged (same 1 pre-existing local failure, my file adds none) · rebased on latestmain.Scope & safety
node --checkbuild list. Wanted paths (packages/,test/).src/api/routes.ts,src/mcp/server.ts, the MCP CLI bin, or the pinned stdio-tool count — by design, to avoid the base-conflict/count-pin contention.discoverbehavior change; the implementation sub-issues build on this. No secrets; no changelog/site//CNAME/lovablechanges.Closes #6795