fix(api): debounce miner dashboard refresh jobs - #867
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 5 changed file(s) — two independent AI reviewers. Changed files: Suggested action: ✅ Safe to merge — both reviewers found no blocking issues. Reviewer A · Suggestions
Worth double-checking
Reviewer B · Suggestions
Worth double-checking
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #867 +/- ##
==========================================
- Coverage 96.71% 96.70% -0.01%
==========================================
Files 108 108
Lines 14641 14641
Branches 5298 5299 +1
==========================================
- Hits 14160 14159 -1
Misses 102 102
- Partials 379 380 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ddd0c14 to
38f87d7
Compare
Motivation
build-contributor-decision-packsjobs unconditionally, which can be abused by authenticated sessions to flood the queue and degrade availability.Description
tryEnqueueDecisionPackRebuild(env, login)from the/v1/app/miner-dashboard/refreshhandler instead of callingc.env.JOBS.senddirectly, and return a503when enqueueing fails./v1/app/miner-dashboard/refreshpath as anexpensiveroute inrouteClassForPathso it is subject to stricter rate limits.decision_pack.rebuild_enqueuedaudit event and updated the unit test to expect the refresh route classification.Testing
npx vitest run test/unit/auth.test.ts test/integration/api.test.ts --reporter=verboseand observed the updated tests passed.npm run typecheck(tsc --noEmit) and the typecheck completed successfully.Codex Task