fix(queue): time-bound queue-health history for the 30-day trend window - #10262
Conversation
…ow (JSONbored#10020) Read queue-health snapshots through listRecentSignalSnapshotsForTargets with the same trendSince window as totals, sized by QUEUE_TREND_SNAPSHOT_LIMIT.
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-31 15:11:15 UTC
Review summary Nits — 4 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.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10262 +/- ##
==========================================
+ Coverage 80.60% 81.16% +0.55%
==========================================
Files 283 286 +3
Lines 59101 61193 +2092
Branches 7000 7691 +691
==========================================
+ Hits 47641 49667 +2026
- Misses 11167 11178 +11
- Partials 293 348 +55
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Summary
queue-healthhistory throughlistRecentSignalSnapshotsForTargetswith the sametrendSincewindow already used for totals (QUEUE_TREND_HISTORY_DAYS), instead of unboundedlistSignalSnapshots(hard 100-row cap ≈ 25 days at 4 rows/day).QUEUE_TREND_SNAPSHOT_LIMIT = QUEUE_TREND_HISTORY_DAYS * 4as the per-target backstop, and raiselistRecentSignalSnapshotsForTargets' internal clamp from 100 → 500 so that backstop is not silently truncated.duplicateTrendandstalePullRequestRateDelta.Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Validation
git diff --checknpm run actionlintnpm run typechecknpm 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:
src/queue/signal-snapshot.ts+src/services/queue-trends.tsviatest/unit/signal-snapshot-queue-trend-history.test.tsandtest/unit/queue-trends.test.ts(including both arms of the?? []map miss). Fulltest:ci/ UI / MCP packs deferred to CI for this queue/src-only change.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
N/A — no visible UI/frontend/docs changes.
Notes
#9699slop/duplicate trend reader pattern insrc/api/routes.ts.Made with Cursor