Skip to content

Sync scoring engine to upstream v3 algorithm#6

Draft
Copilot wants to merge 5 commits into
mainfrom
copilot/connect-to-milady-ai-repos
Draft

Sync scoring engine to upstream v3 algorithm#6
Copilot wants to merge 5 commits into
mainfrom
copilot/connect-to-milady-ai-repos

Conversation

Copilot AI commented Mar 13, 2026

Copy link
Copy Markdown

The previous session introduced a non-standard activeShipper feature and left scoring-engine.ts on v2 config values while milady-ai/milady/.github/trust-scoring.cjs had already advanced to v3 — causing the dashboard to compute materially different scores than the actual gating system.

Algorithm changes

Config synced to v3 upstream:

Parameter v2 (broken) v3 (fixed)
close base points -10 -5
diminishingRate 0.2 0.08
recencyHalfLifeDays 45 60
initialScore 35 40
dailyPointCap 35 80
velocity.softCapPRs 10 80
velocity.hardCapPRs 25 200
velocity.penaltyPerExcess 0.15 0.03

Removed: non-standard activeShipper half-life boost.

Added v3 features:

  • supersededPRs — close/selfClose followed by approve on same PR within 24h reduces penalty to -2 instead of full -5
  • Negative event diminishing returns — close/reject penalties also scale down with repetition
  • approveRateBonus — ≥90% merge rate applies 1.5× multiplier on positive points (tiers at 80/70/60%)
  • volumeBonusmin(10, √approvalCount × 1.5) flat bonus for sustained contribution

Kept from previous session: category: prefix label normalization (e.g. category:securitysecurity) since milady-ai labels use this scheme.

Files changed

  • src/lib/scoring-engine.ts — all of the above; removed activeShipper from TrustScoringConfig; added approveRateBonus / volumeBonus to ScoreBreakdown
  • reference-trust-scoring.js — fully re-synced; both files now produce identical output for all scenarios
  • scripts/verify-scoring-sync.ts — expanded from 7 → 11 scenarios covering superseded PRs, velocity soft cap, approval-rate bonus, and category label normalization
  • src/components/contributor/score-breakdown.tsx — new "Approval-rate bonus" and "Volume bonus" step rows
  • src/app/scoring/page.tsx — updated to 10 scoring components, corrected all formula text and the event type table
  • src/components/contributor/velocity-gauge.tsx / contributor page — velocity display now reads from DEFAULT_CONFIG instead of hardcoded 10/25

📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Copilot AI and others added 2 commits March 13, 2026 06:57
… recency protection

Co-authored-by: Dexploarer <211557447+Dexploarer@users.noreply.github.com>
Co-authored-by: Dexploarer <211557447+Dexploarer@users.noreply.github.com>
Copilot AI changed the title [WIP] Update scoring system for milady-ai repositories Add MMORPG skill tagging, fix label normalization, protect active-shipper recency Mar 13, 2026
Copilot AI requested a review from Dexploarer March 13, 2026 06:58
Copilot AI and others added 2 commits March 13, 2026 17:31
…activeShipper

Co-authored-by: Dexploarer <211557447+Dexploarer@users.noreply.github.com>
…lues

Co-authored-by: Dexploarer <211557447+Dexploarer@users.noreply.github.com>
Copilot AI changed the title Add MMORPG skill tagging, fix label normalization, protect active-shipper recency Sync scoring engine to upstream v3 algorithm Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants