Skip to content

test(queue): cover RetryableJobError delay clamping - #2373

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
bohdansolovie:test/retryable-job-error-clamp
Jul 2, 2026
Merged

test(queue): cover RetryableJobError delay clamping#2373
JSONbored merged 1 commit into
JSONbored:mainfrom
bohdansolovie:test/retryable-job-error-clamp

Conversation

@bohdansolovie

@bohdansolovie bohdansolovie commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add unit tests for RetryableJobError retry delay clamping (1s–1h, 5m default) and type guards.

Test plan

  • npx vitest run test/unit/retryable.test.ts

Exercise the 1s–1h clamp, 5m default, and retryable type guards.

Co-authored-by: Cursor <cursoragent@cursor.com>
@bohdansolovie
bohdansolovie requested a review from JSONbored as a code owner July 1, 2026 13:37
@dosubot dosubot Bot added the size:XS label Jul 1, 2026
@loopover-orb

loopover-orb Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-02 04:11:47 UTC

1 file · 1 AI reviewer · no blockers · readiness 48/100 · CI green · clean

⏸️ Suggested Action - Manual Review

Review summary
This adds focused unit coverage for RetryableJobError defaults, lower/upper delay clamps, pass-through delay, and the helper/type-guard path. The expectations match the current retryable helper behavior, and the added test file follows the repository's existing Vitest unit-test style. No reachable production defect is introduced because this PR only adds tests.

Nits — 5 non-blocking
  • nit: test/unit/retryable.test.ts:5 bundles default, non-finite, lower-bound, pass-through, and upper-bound cases into one assertion block, so a failure will be less diagnostic than a table-driven set of named cases.
  • nit: test/unit/retryable.test.ts:7 covers Number.NaN but not +/-Infinity, even though the production clamp explicitly uses Number.isFinite.
  • test/unit/retryable.test.ts:5 could use it.each with a short label per retryAfterMs input to make boundary failures point at the exact case.
  • test/unit/retryable.test.ts:7 should include Infinity and -Infinity if you want the test to fully document the non-finite branch.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
Related work ⚠️ 3 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High review scope from cached public metadata (size label size:XS; no linked issue context).
Validation posture ❌ 5/25 Preflight is holding this PR: the review lane is unavailable, so it is not ready for automated review.
Contributor workload ✅ 10/10 Author activity: 140 registered-repo PR(s), 68 merged, 11 issue(s).
Contributor context ✅ Confirmed Gittensor contributor bohdansolovie; Gittensor profile; 140 PR(s), 11 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
Contributor next steps
  • Explain no-issue PR.
  • Review top overlaps.
  • Add a concise scope and risk note.
  • Await review-lane availability.
  • Triage stale or unlinked PRs.
  • Refresh registry data or choose a registered active repo.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
  • Check active issues and PRs before submitting.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 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.

  • Re-run Gittensory review

@loopover-orb loopover-orb Bot added gittensor gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. labels Jul 1, 2026
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.71%. Comparing base (17d70b2) to head (9907b3e).
⚠️ Report is 63 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2373   +/-   ##
=======================================
  Coverage   95.71%   95.71%           
=======================================
  Files         222      222           
  Lines       24661    24661           
  Branches     8949     8949           
=======================================
  Hits        23605    23605           
  Misses        433      433           
  Partials      623      623           
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dosubot dosubot Bot added the lgtm label Jul 2, 2026
@JSONbored
JSONbored merged commit d008401 into JSONbored:main Jul 2, 2026
9 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants