Repository navigation
Expand file tree
/
Copy pathconfig.ts
More file actions
51 lines (47 loc) · 3.12 KB
/
Copy pathconfig.ts
File metadata and controls
51 lines (47 loc) · 3.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Scoring tunables — every constant that shapes the 300–850 developer credit
// score, in one place. This is the transparent half of the model: what we read
// off a GitHub profile and how much each signal counts.
//
// Deliberately NOT in this open repo: how a score maps to a dollar credit line
// or exposure limit. That mapping is a lender-side risk decision and is not
// part of the score itself — see README ("What this repo is / isn't").
// ── Score saturation constants ──────────────────────────────────────────────
// Each countable signal is normalized with sat(x, k) = 1 - e^(-x/k): early
// progress counts a lot, grinding the long tail is low-ROI. `k` is the scale at
// which a signal reaches ~63% of its weight. Maxing the contribution component
// should take a serious OSS record (dozens of external merged PRs across many
// repos), not one good quarter.
export const SAT_AGE_REF_MONTHS = 60
export const SAT_EXT_PRS = 40
export const SAT_EXT_REPOS = 25
export const SAT_REVIEWS = 50
// ── Adverse gate ────────────────────────────────────────────────────────────
// A multiplicative gate applied AFTER the response curve, so a sybil's crushing
// survives every transform. Fresh accounts and accounts with zero externally
// accepted work are heavily discounted; each anomaly flag compounds; the whole
// gate is floored so recovery stays possible.
export const FRESH_ACCOUNT_MONTHS = 3
export const FRESH_ACCOUNT_MULT = 0.3
export const NO_EXT_CONTRIB_MULT = 0.5
export const ANOMALY_MULT = 0.8
export const ADVERSE_FLOOR = 0.05
// ── Calibration ─────────────────────────────────────────────────────────────
// Bump SCORE_VERSION whenever the formula changes so downstream caches know a
// stored breakdown is stale.
// v3: GitHub-only P/C/W model (LinkedIn/X/ecosystem/breadth removed; LLM
// work-quality judge added). v4: tougher top end (raised contribution sats +
// asymptotic compression above 0.8). v5: current calibration.
export const SCORE_VERSION = 5
// Concave response on Q (see score.ts): the sat() curves bunch real profiles in
// the low-mid range; a mild concave lift restores resolution there without
// touching the top. The adverse gate multiplies AFTER this curve.
export const SCORE_CURVE = 0.7
// Top-end compression: above this point the curved Q approaches 1 only
// asymptotically, so 800+ requires near-perfection on every axis at once — a
// literally maxed profile (hundreds of external PRs, perfect judge read, a
// decade of dense history) lands ≈820, and 850 is an asymptote.
export const TOP_COMPRESS_START = 0.8
export const TOP_COMPRESS_SCALE = 0.15
// Recompute cooldown — the score is slow by design, and each compute fans out
// several GitHub API calls. Operational only (rate control), not a score input.
export const SCORE_REFRESH_COOLDOWN_MS = 24 * 60 * 60 * 1000