fix(queue-trends): return null review velocity when observedDays is zero - #1756
Conversation
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-06-30 07:52:52 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.
|
1b6768d to
8028431
Compare
4870599 to
70637df
Compare
d467467 to
ba31b9e
Compare
Summary
buildWindow: once a baseline is found (fetchedAt <= latest - windowDays),observedDaysis always at least the requested window span, so ready windows divide safely.fetchedAttimestamps still yield finitereviewVelocityPerDayand that ready windows always haveobservedDays >= windowDays.Why not null on zero observedDays?
The gate flagged the prior approach as a dead fix:
baselinemust be at or beforetargetMs, soobservedDays <= 0cannot occur on any readybuildWindowresult. A null-velocity guard would never run on the real path and contradicted the PR title.Scope
type(scope): short summaryConventional Commit format.src/services/queue-trends.ts+ tests only.Validation
npm run test:cigreennpm run test:coveragegreenTest plan
test/unit/queue-trends.test.ts— duplicate latestfetchedAt→ noInfinity; ready windows →observedDays >= windowDaysand finite velocity.Files changed
src/services/queue-trends.tstest/unit/queue-trends.test.tsPR body note (important)
Update the open PR title and description to match this summary. Remove any claim about “return null when observedDays is zero” — that was incorrect for the ready-window path.