You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
src/scoring/model.ts has no dedicated test file; its pure parser/detector functions are only incidentally exercised. Add a focused unit test that drives every branch of the pure exports so they reach 100% branch-counted patch coverage independent of the fetch paths.
Deliverables
Create test/unit/scoring-model.test.ts
parsePythonNumberConstants: underscore separators in integer AND fractional parts (1_000_000, 0.000_001, 3.14_15), exponents (1e-9, 5.8e1), knownOnly:true filtering vs knownOnly:false, and non-matching lines (skip via continue)
findUnmodeledConstantKeys / findUnmodeledUpstreamConstants: assert known + NON_SCORING_UPSTREAM_CONSTANT_NAMES (e.g. EMISSION_SHARE_TOLERANCE, DEFAULT_PROGRAMMING_LANGUAGE_WEIGHT) are excluded and result is sorted
detectActiveModel: pending_saturation_model, current_density_model, and unknown branches (both hasSaturationConstants and hasDensityConstants sides)
scoringSnapshotStalenessWarning: exactly-at-window boundary (null) vs past-window (warning string), with explicit now arg
isTimeDecayEnabled: each truthy token (1/true/yes/on, case-insensitive) and the falsey/undefined arm
Do NOT test fetchText/fetchJson/getOrCreateScoringModelSnapshot network paths — scope to the pure exports
src/scoring/model.ts has no dedicated test file; its pure parser/detector functions are only incidentally exercised. Add a focused unit test that drives every branch of the pure exports so they reach 100% branch-counted patch coverage independent of the fetch paths.
Deliverables
References
src/scoring/model.ts:208src/scoring/model.ts:220src/scoring/model.ts:270src/scoring/model.ts:285src/scoring/model.ts:289size: S · gittensor:bug