test(scoring): cover activeModelWarnings both-saturation-and-density branch#9357
Conversation
…branch Exercises the "both present" branch of activeModelWarnings end-to-end through refreshScoringModelSnapshot, mirroring the existing "neither present" test pattern.
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-27 14:07:01 UTC
Review summary Nits — 2 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.
|
Closes #9321
Summary
The
activeModelWarningsfunction insrc/scoring/model.tshas three branches, but only the "neither saturation nor density constants present" branch was exercised end-to-end throughrefreshScoringModelSnapshot. This adds the missing test for the "both present" branch, mirroring the existing sibling test pattern.No production code changes — this is a pure test-coverage gap fix, as called out in the issue.
Scope
test/unit/scoring.test.tsValidation
npx turbo run build --filter=@loopover/engine— greennpx turbo run build --filter=@loopover/mcp— greennpx turbo run build:tsc build:verify --filter=@loopover/miner— greennpx vitest run --changed=upstream/main --passWithNoTests— 90/90 passednpm test(full unsharded suite) — 1220/1226 test files passed; the 6 failing tests (check-ui-kit-package.test.ts,salvageability.test.ts,selfhost-metrics.test.ts,selfhost-pg-retention.test.ts×2,worker-entry-boundary.test.ts) are pre-existing and unrelated — verified by re-running those same files with this diff stashed out, reproducing identical failures on the unmodified tree.Safety
UI Evidence
Not applicable — this change only adds a unit test in
test/unit/scoring.test.ts; no UI, route, or component files were touched.Notes
New test stubs a
constants.pyresponse containingSRC_TOK_SATURATION_SCALE,MIN_TOKEN_SCORE_FOR_BASE_SCORE, andMAX_CODE_DENSITY_MULTIPLIERtogether, callsrefreshScoringModelSnapshot, and asserts the exact warning text: "Scoring constants include both exponential saturation and density-era indicators; using exponential saturation as the active model."