Repository navigation
Fix nomad certificate backoff overflow - #1023
Conversation
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The bounded calculation preserves expected behavior and is adequately covered by regression tests.
Review effort: Balanced
Findings: None
What changed in this PR
Fixes certificate retry backoff overflow by safely clamping exponential growth.
Changes:
- Replaces floating-point backoff calculation with bounded bit shifting.
- Adds regression and boundary tests.
- Documents the patch in a changeset.
| File | Description |
|---|---|
certificates/providers/nomad/nomad.go |
Prevents backoff duration overflow. |
certificates/providers/nomad/nomad_test.go |
Tests backoff limits and edge cases. |
.changeset/fix_certificate_backoff_overflow.md |
Records the bug fix. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Claude Code Review
Claude Code Review is paused for this repository. To reconnect it, an admin of this repository's GitHub organization (or the account owner, for personal repositories) who can also manage your Claude organization's Code Review settings needs to re-link GitHub in Code Review settings. This is a one-time step.
Tip: disable this comment in your organization's Code Review settings.
This PR fixes an overflow in the backoff algo in the certificate provider. It's hard to reach though, but I found that we fixed a similar issue in
2151fb7in the connectivity manager so figured we probably want to harden this here as well. Found out through SiaFoundation/indexd#1119 which fixes a similar overflow.