Watch
0
0
Fork
You've already forked hyperhive
0

review-classifier: a rule against a hand-rolled retry or backoff

A retry or backoff policy written out by hand (a capped doubling wait, a
jitter from the clock, a try count with a sleep) goes against the workspace's
own dependency on backon. The rule flags a diff that adds one; the controller
test lists the rule name.
This commit is contained in:
argus 2026-11-30 21:55:32 +01:00
commit ac7d6d1c44
2 changed files with 15 additions and 0 deletions

View file

@ -163,3 +163,17 @@ classifications:
makes the question not applicable.
polarity: negative
threshold: 70
- name: no-hand-rolled-backoff
description: >-
The diff adds its own retry or backoff policy in Rust: a wait that is
doubled, multiplied or stepped up after each failure and capped, a
jitter drawn from the clock or a random number, or a retry count with
a sleep between tries, written out by hand. The workspace already
depends on `backon` (`ExponentialBuilder`, `ConstantBuilder` and
`Retryable`), so such a policy is built from it. A fixed pause in a
poll loop, a timeout, a deadline or a per-key not-before time that is
stored as data, and a test that only fakes the clock, are not a retry
policy. A diff that adds no retry or backoff makes the question not
applicable.
polarity: negative
threshold: 70

View file

@ -1452,6 +1452,7 @@ classifications:
"option-in-the-wrong-namespace",
"docs-describe-current-state",
"closes-only-finished-issues",
"no-hand-rolled-backoff",
]
);
}