• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

prisma-risk / tsoracle / 26379535391
95%

Build:
DEFAULT BRANCH: main
Ran 25 May 2026 02:12AM UTC
Jobs 1
Files 82
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

25 May 2026 02:07AM UTC coverage: 94.869% (+0.02%) from 94.846%
26379535391

push

github

web-flow
fix(client): decompose retry loop and stop redirects consuming the attempt budget (#376)

`issue_rpc`/`attempt` in retry.rs jointly owned five concerns (worklist +
visited-set dedup, three-tier deadline arithmetic, backoff scheduling, the
NOT_LEADER classification tree, and channel eviction), making the
most-churned file in the crate risky to change. Pull the orthogonal
concerns behind named, independently-testable types:

- `worklist::Worklist` owns the queue, the visited-set dedup, and the
  push-front-on-hint steering. `next()` folds the skip-already-visited
  short-circuit; `redirect_to()` is the front-insertion.
- `budget::Budget`/`PairBudget` own all three deadline tiers: the overall
  cap, the per-attempt cap (`next_attempt()` returns None once the overall
  deadline is reached), the backoff-vs-remaining clamp, and the
  connect/get_ts pair-split.
- The "transport-class failure ⇒ evict the cached channel" invariant
  (#239), previously duplicated at two RPC-failure sites in `attempt`, now
  lives in one auditable tail: a single `is_transport_failure` gate. The
  timeout arm's DeadlineExceeded is transport-class, so it evicts
  identically — behavior preserved.

Fold in the redirect-budget fix: replace the single attempt counter with
`failed_attempts`, incremented only on `AttemptOutcome::Err`. Leader-hint
redirects (LeaderHint/StaleLeaderHint/HintRejected) no longer consume the
`max_attempts` budget or inflate the backoff exponent, so a legitimate
failover redirect chain longer than `max_attempts` can still reach the
live leader instead of surfacing the last hint status. Redirects stay
bounded by the worklist visited-set and the overall deadline.

New direct unit tests cover the worklist dedup/redirect semantics and the
budget deadline math without sockets; a new integration test drives a
redirect chain longer than `max_attempts` through the real loop to a live
leader.

Closes #332
Closes #340

211 of 221 new or added lines in 3 files covered. (95.48%)

2 existing lines in 2 files now uncovered.

12278 of 12942 relevant lines covered (94.87%)

401400.96 hits per line

Uncovered Changes

Lines Coverage ∆ File
7
89.06
0.13% crates/tsoracle-client/src/retry.rs
2
95.0
crates/tsoracle-client/src/worklist.rs
1
99.01
crates/tsoracle-client/src/budget.rs

Coverage Regressions

Lines Coverage ∆ File
1
96.4
-0.19% crates/tsoracle-client/src/driver.rs
1
89.06
0.13% crates/tsoracle-client/src/retry.rs
Jobs
ID Job ID Ran Files Coverage
1 26379535391.1 25 May 2026 02:12AM UTC 82
94.87
GitHub Action Run
Source Files on build 26379535391
  • Tree
  • List 82
  • Changed 5
  • Source Changed 3
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26379535391
  • d1298e7d on github
  • Prev Build on main (#26379281817)
  • Next Build on main (#26379558328)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc