Skip to content

fix(queue): make publication capacity recovery reachable under periodic rate-limit bursts - #638

Merged
steipete merged 1 commit into
mainfrom
fix/publication-recovery-gate
Jul 17, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/publication-recovery-gate

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Why

Live observation tonight: publication capacity_control pinned at mode=throttled, ceiling=4 (minimum) for hours while the publication backlog doubled (194 -> 408 pending, oldest >22h). Root cause is the recovery ladder introduced in #626: raising the ceiling one step requires 50 consecutive clean publications, but every failure resets the counter to zero and halves the ceiling with a cooldown. Under the current environment — a rate-limit failure burst every hour, three days running — 50 clean runs never fit between bursts at 4-way concurrency, so the ceiling is mathematically unable to leave the floor while inflow exceeds drain.

The multiplicative-decrease side is sound; only the additive-increase gate is unreachable under periodic failures.

What

The gate becomes env-tunable EXACT_REVIEW_PUBLICATION_RECOVERY_SUCCESSES (clamped 1-1000) with a default of 10. Between hourly bursts a healthy lane now re-climbs 4 -> 12 -> 20 -> 24 within minutes of clean throughput, while bursts still throttle it exactly as before. docs/limits.md documents the override and the pinning failure mode.

Proof

  • Updated the gradual-recovery test to the new default (10 successes -> exactly one +8 step, counter resets); with the old fixture the lane correctly climbed to max under the new gate, confirming the ladder works when reachable. 127/127 dashboard-worker tests green; check:limits, format:check, lint green.
  • Autoreview (Codex Sol, xhigh) clean on first pass.
  • cc @masonxhuang — this tunes Adapt result publication capacity to GitHub pressure #626's recovery gate based on tonight's production observation; the throttle/cooldown behavior is untouched.

@steipete
steipete merged commit 6830ff2 into main Jul 17, 2026
8 checks passed
@steipete
steipete deleted the fix/publication-recovery-gate branch July 17, 2026 00:34
azaj01 pushed a commit to azaj01/clawsweeper that referenced this pull request Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant