fix(scoring): inject server-side time decay into score breakdown paths - #881
Conversation
|
Note Gittensory Gate skippedPR closed before full evaluation. No late first comment was created.
💰 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. |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
gittensory · advisory review Reviewed 3 changed file(s) — two independent AI reviewers. Changed files: Suggested action: 🛠️ Request changes. (reviewers split: request changes / merge) Address the suggestions below before merging. Reviewer A · Suggestions
Worth double-checking
Reviewer B · Suggestions
Worth double-checking
|
31a01a2 to
b237381
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #881 +/- ##
=======================================
Coverage 96.71% 96.71%
=======================================
Files 108 108
Lines 14641 14643 +2
Branches 5298 5298
=======================================
+ Hits 14160 14162 +2
Misses 102 102
Partials 379 379 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Motivation
applyTimeDecayinjection, causing aged PRs to be reported without the time-decay multiplier and returning inflatedeffectiveEstimatedScorevalues.SCORING_TIME_DECAY_ENABLED) used by existing preview endpoints so breakdowns remain accurate and consistent.Description
applyTimeDecay: isTimeDecayEnabled(c.env)before callingbuildScorePreviewin the/v1/scoring/explain-breakdownroute (src/api/routes.ts).applyTimeDecay: isTimeDecayEnabled(this.env)before callingbuildScorePreviewin the MCPexplainScoreBreakdowntool (src/mcp/server.ts).test/integration/api.test.tsthat enablesSCORING_TIME_DECAY_ENABLED, sends an aged PR input (prAgeHours), and asserts the breakdown'seffectiveEstimatedScorematches the preview's decayed estimate, including minimal type assertions to satisfy TypeScript.Testing
npm run typecheckand it succeeded.npx vitest run test/integration/api.test.ts -t "serves deterministic signal endpoints" --reporter=verboseand the test passed (1 passed, 36 skipped).git diff --checkas part of the workflow and there were no whitespace/format issues.Codex Task