fix(selfhost): backpressure scheduled regate sweeps - #1933
Conversation
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-06-30 23:46:57 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 5 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.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1933 +/- ##
=======================================
Coverage 95.55% 95.55%
=======================================
Files 218 218
Lines 24195 24243 +48
Branches 8772 8791 +19
=======================================
+ Hits 23119 23165 +46
Misses 438 438
- Partials 638 640 +2
🚀 New features to boost your workflow:
|
ed3939c to
aa79af0
Compare
Summary
What changed
snapshot()on the SQLite and Postgres self-host queues.SWEEP_MAX_PRSfrom 6 to 3 to cut scheduled REST demand at the source.Why
The self-host queue can recover from rate-limit cooldowns and immediately rebuild a large scheduled re-gate backlog. That backlog competes with live webhook reviews and can push the installation REST bucket back into exhaustion. This change makes scheduled work observe the queue before adding more re-gate pressure, while preserving live webhook processing and fail-open behavior when introspection is missing.
Validation
npx vitest run test/unit/queue.test.ts -t "queue introspection throws|prior regate work"npm run test:cinpm audit --audit-level=moderateNotes
npm run test:cicompleted successfully, including coverage, workers, MCP packaging, REES tests, OpenAPI checks, UI lint/typecheck/tests, and UI build.npm audit --audit-level=moderatefound 0 vulnerabilities.