test(scoring): cover pure upstream-constant parsers in scoring/model.ts - #3303
Conversation
Closes JSONbored#2091. Co-authored-by: Cursor <cursoragent@cursor.com>
|
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 #3303 +/- ##
=======================================
Coverage 94.13% 94.13%
=======================================
Files 276 276
Lines 30236 30236
Branches 11016 11016
=======================================
Hits 28464 28464
Misses 1127 1127
Partials 645 645 🚀 New features to boost your workflow:
|
Avoid Record<string, number> type errors from DEFAULT_SCORING_CONSTANTS indexing. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-05 01:28:59 UTC
⏸️ Suggested Action - Manual Review Review summary Nits — 4 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 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 Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
…ts (#3303) * test(scoring): cover pure upstream-constant parsers in scoring/model.ts Closes #2091. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(test): use literal density constants in scoring-model test Avoid Record<string, number> type errors from DEFAULT_SCORING_CONSTANTS indexing. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
Adds a focused unit test file for the pure exports in
src/scoring/model.tsso parser/detector helpers reach dedicated branch coverage independent of fetch paths.Closes #2091.
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typechecknpx vitest run test/unit/scoring-model.test.tsnpm run test:coveragelocally;codecov/patchrequires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
npm run test:ciwas started locally (~7 min); the new test file passes in isolation. Remaining unchecked boxes will be validated by CI on this PR (test-only diff undertest/**, nosrc/**changes).Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.UI Evidence
Not applicable — test-only change.
Notes
parsePythonNumberConstants,findUnmodeledConstantKeys,findUnmodeledUpstreamConstants,detectActiveModel,scoringSnapshotStalenessWarning, andisTimeDecayEnabledwithout exercising network fetch paths.Made with Cursor