Skip to content

Adapt result publication capacity to GitHub pressure - #626

Merged
hxy91819 merged 1 commit into
mainfrom
feature/adaptive-publication-capacity
Jul 16, 2026
Merged

hxy91819 merged 1 commit into
mainfrom
feature/adaptive-publication-capacity

Conversation

@hxy91819

Copy link
Copy Markdown
Member

Summary

  • scale exact-review result publication from a base of 24 up to 48 based on ready backlog
  • reduce admission on validated GitHub rate-limit or 5xx pressure, then recover gradually after cooldown
  • expose the adaptive ceiling and throttle reason in status APIs and the dashboard

Why

A fixed publication concurrency of 24 leaves the result backlog draining too slowly, while raising it unconditionally risks amplifying GitHub API pressure. This adds bounded demand scaling with explicit feedback-based backoff.

Behavior

  • every 250 ready publication items adds 8 slots, up to 48
  • GitHub rate limiting halves the current ceiling for 15 minutes
  • GitHub 5xx pressure lowers the ceiling by 8 for 5 minutes
  • repeated pressure can reduce admission to 4
  • every 50 successful publications after cooldown restores 8 slots
  • running jobs are never cancelled when the ceiling shrinks
  • permission 403s and non-GitHub publication failures do not reduce global capacity

Validation

  • pnpm run check (Node 24.15.0)
  • pnpm run build:dashboard
  • node --test test/dashboard-worker.test.ts test/sweep-workflow.test.ts (191 passed)
  • autoreview clean after addressing both accepted findings
  • gitleaks scan of the commit: no leaks found

@hxy91819
hxy91819 requested a review from a team as a code owner July 16, 2026 08:27
@hxy91819
hxy91819 merged commit e582737 into main Jul 16, 2026
6 checks passed
@hxy91819
hxy91819 deleted the feature/adaptive-publication-capacity branch July 16, 2026 08:28
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