ratewait

command
v0.168.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2026 License: BSD-3-Clause Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command ratewait blocks until the GitHub budget a caller names is at or above a threshold it states, and exits 0 only then.

⛔ WHY THIS EXISTS, and it is not convenience. The hourly budget is PER USER and roughly twenty-five sessions share it, so a write program meets a 403 it did nothing to cause. fleet.Throttled answers false for "API rate limit exceeded" on purpose -- "that budget will not refill inside any backoff this package would sleep" -- so the fleet's retry policy correctly gives up at once, and that leaves nobody able to WAIT. Measured 2026-11-15: the budget was spent at 13:52 and again at 22:06 CET; both times the only fleet-legal way to come back at the reset was a shell until-loop, which the shell-loop guard refuses, or a blind sleep, which is a guess about somebody else's traffic.

⛔ IT SLEEPS TO THE RESET THE API REPORTS, not on an interval. A poll loop spends the budget it is waiting for; the reset is a fact GitHub hands over with every reading, and rate_limit itself costs nothing.

⚠ IT IS BLIND TO THE SECONDARY LIMIT AND SAYS SO ON EVERY SUCCESS. That is not modesty, it is internal/fleet/budget.go's measurement: on 2026-10-10 gh answered 403 on every call while rate_limit reported 5000/5000 remaining. A tool that printed "the budget is fine" and stopped there would read as "safe to call" in exactly the case where it is not.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL