You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Update API groundwork: update scope, failed-auth rate limit and single-flight guard (rigforge#684 1/3) #699
#684 adds update routes to the control server, but the server has no rule for which tokens may update a rig, no request rate limiter (util/control-server.py has MAX_BODY and MAX_PENDING only) and no guard against two updates at once. None of this depends on pithead#4013, so it can land before the routes.
What it impacts
Nothing user-visible on its own. It is the base for the update routes in #684, which the Pithead v2.0.5 per-rig update needs.
How I found it
Split from #684 while grooming v1.20.0 on 2026-11-17. #684 is too large for one PR and its routes are blocked on pithead#4013; this part is not.
How important is it
High for v1.20.0. It is the first step of #684 and the only part that can start before pithead#4013 lands.
Acceptance criteria
Only the control token may call a route marked update-scoped. A derived read token is always refused. A named consumer token is refused unless it is explicitly granted an update scope.
A missing or wrong token gets 401. Failed-auth attempts are rate limited and logged, the limit (global or per source) is stated in the docs, and a request over it gets 429.
A single-flight guard returns 409 while an update request is in flight.
Unit tests cover each rule and status code. This change exposes no update route to users yet.
Possible solutions
Extend the existing ACCESS_TOKENS and derive_read_token scope checks in util/control-server.py with an update scope.
Keep a small in-memory failure counter per source with a time window.
Hold a lock in the spool action while an update runs.
Needs an operator action (do it, then remove the operator-action label):
The runner stopped a respawn loop after 3 fresh workers reached error within six hours. Inspect the repeated outcome, then remove this label to release one new worker.
Owner decision (2026-11-27): the USB stick rig's remote update path is a priority, so this goes back to work now. Releasing one new worker. #700 follows once this one is under way, and #701 starts after pithead#4013 merges.
Activity
pithead-developer commentedon Nov 23, 2026
Needs an operator action (do it, then remove the
operator-actionlabel):The runner stopped a respawn loop after 3 fresh workers reached
errorwithin six hours. Inspect the repeated outcome, then remove this label to release one new worker.pithead-architect commentedon Nov 27, 2026
Owner decision (2026-11-27): the USB stick rig's remote update path is a priority, so this goes back to work now. Releasing one new worker. #700 follows once this one is under way, and #701 starts after pithead#4013 merges.