Skip to content

[codex] refill 128-worker review capacity - #392

Merged
steipete merged 1 commit into
mainfrom
codex/scheduler-refill-waves-128
Jul 3, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/scheduler-refill-waves-128

Conversation

@steipete

@steipete steipete commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Why

ClawSweeper's checked-in scheduler had been reduced to a 32-worker model. It also kept each scheduled background sweep behind one workflow-wide concurrency lock until the older run finished publishing, which could leave workers idle during a long tail.

This restores the intended 128-worker fleet without making exact review less responsive.

What changed

The central budget is now 128 workers. Its derived defaults become 89 normal-review shards, 44 hot-intake shards, 51 repair workers, and 6 commits per commit-review page. The existing exact-review admission limits remain 20 globally and 16 per target repository; imported cluster repair remains capped at 2.

Broad background workflow runs can overlap, but their planner jobs serialize per target repository. Each planner subtracts live shard jobs from the available budget. A run that has finished its shards and is only publishing counts as zero Codex workers, so the next wave can refill released capacity instead of waiting for the whole workflow to exit. Exact-item planners use run-scoped groups and do not wait behind broad planning.

Dashboard defaults, operator docs, limit examples, and regression tests now describe the same model.

Safety and validation

The scheduler still reserves 16 workers for interactive work and 8 for matrix expansion, leaving 104 quiet-system background slots. Background lanes continue to yield to active priority work.

pnpm run check passes, including build, lint, 558 unit tests, 575 repair tests, both coverage gates, limit drift checks, and formatting. Structured Codex autoreview reported no accepted or actionable findings.

@clawsweeper

clawsweeper Bot commented Jul 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 3, 2026, 3:54 PM ET / 19:54 UTC.

Summary
This PR raises ClawSweeper's worker budget and derived lane defaults to 128-worker values, changes broad sweep concurrency/planner capacity accounting, and updates dashboard docs and tests.

Reproducibility: Do we have a high-confidence way to reproduce the issue? Not applicable: this is an operational capacity PR, not a bug report; the behavior to prove is live scheduler capacity accounting in Actions, which is not shown yet.

Review metrics: 3 noteworthy metrics.

  • Worker budget: 32 -> 128. This quadruples the global Codex worker budget that derives review, repair, and commit-review defaults.
  • Changed surface: 17 files affected. The PR spans workflow behavior, config, dashboard defaults, docs, and regression tests, so upgrade proof matters.
  • Workflow behavior: 1 workflow changed. The single ClawSweeper workflow is the live automation entry point for review and planner concurrency.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🐚 platinum hermit
Result: blocked until real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Add redacted live Actions or terminal proof showing the new planner capacity behavior under an overlapping broad sweep.
  • Remove the CHANGELOG.md entry and keep release-note context in the PR body or commit message.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR body reports pnpm run check but does not include after-fix live scheduler proof; add redacted Actions logs, terminal output, or screenshots that show the 128-worker planner behavior, then update the PR body so ClawSweeper can re-review automatically or ask a maintainer to comment @clawsweeper re-review.

Risk before merge

  • [P1] Merging changes the live ClawSweeper workflow concurrency model and raises default fanout substantially; unit tests do not prove the GitHub Actions scheduler and Codex capacity behavior under a real overlapping wave.
  • [P1] The PR currently edits release-owned CHANGELOG.md, which conflicts with repository policy for normal PR work and should be moved back to PR-body or commit-message context.

Maintainer options:

  1. Require live scheduler proof (recommended)
    Before merge, have the branch demonstrate a broad normal or hot sweep planner in Actions with the 128-worker defaults, including capacity accounting while an older wave is publishing.
  2. Accept the operator risk
    A maintainer can intentionally land this as an operational tuning change after reviewing GitHub Actions capacity, Codex quota, and rate-limit headroom.
  3. Narrow the concurrency change
    If live proof is not practical, keep the 128-worker budget/docs/test updates and defer run-scoped broad workflow overlap to a smaller follow-up.

Next step before merge

  • [P1] Needs maintainer/operator review because the PR changes live automation fanout and concurrency, and contributor-supplied live behavior proof is still missing.

Security
Cleared: No concrete security or supply-chain issue was found; the workflow change reuses existing actions, permissions, and GitHub CLI calls without adding third-party execution.

Review findings

  • [P3] Remove the release-owned changelog entry — CHANGELOG.md:17
Review details

Best possible solution:

Land the scheduler refill only after live, redacted Actions proof shows the new planner accounting behaves as intended and the release-owned changelog entry is removed.

Do we have a high-confidence way to reproduce the issue?

Do we have a high-confidence way to reproduce the issue? Not applicable: this is an operational capacity PR, not a bug report; the behavior to prove is live scheduler capacity accounting in Actions, which is not shown yet.

Is this the best way to solve the issue?

Is this the best way to solve the issue? Unclear until live proof is posted: central config plus matching workflow/docs/tests is the right shape, but the overlapping planner behavior and changelog policy issue need resolution before merge.

Full review comments:

  • [P3] Remove the release-owned changelog entry — CHANGELOG.md:17
    AGENTS.md marks CHANGELOG.md as release-owned and says normal PR work should keep release-note context in PR bodies and commit messages instead. Please drop this unreleased entry and leave the context in the PR body or commit message.
    Confidence: 0.96

Overall correctness: patch is correct
Overall confidence: 0.82

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against f7e8b13d0eb3.

Label changes

Label changes:

  • add P2: This is a normal-priority automation throughput change with meaningful but bounded operational blast radius.
  • add merge-risk: 🚨 automation: The diff changes workflow concurrency and scheduler fanout, so a mistake could over-dispatch or under-dispatch ClawSweeper automation despite green unit tests.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body reports pnpm run check but does not include after-fix live scheduler proof; add redacted Actions logs, terminal output, or screenshots that show the 128-worker planner behavior, then update the PR body so ClawSweeper can re-review automatically or ask a maintainer to comment @clawsweeper re-review.

Label justifications:

  • P2: This is a normal-priority automation throughput change with meaningful but bounded operational blast radius.
  • merge-risk: 🚨 automation: The diff changes workflow concurrency and scheduler fanout, so a mistake could over-dispatch or under-dispatch ClawSweeper automation despite green unit tests.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body reports pnpm run check but does not include after-fix live scheduler proof; add redacted Actions logs, terminal output, or screenshots that show the 128-worker planner behavior, then update the PR body so ClawSweeper can re-review automatically or ask a maintainer to comment @clawsweeper re-review.
Evidence reviewed

What I checked:

  • Repository policy applied: AGENTS.md was read fully; lines 41-43 say CHANGELOG.md is release-owned and release-note context should stay in PR bodies and commit messages during normal PR work. (AGENTS.md:41, f7e8b13d0eb3)
  • Budget change: The PR head changes workers.max from 32 to 128, interactive reserve to 16, expansion reserve to 8, and minimum background to 16. (config/automation-limits.json:3, 4ed05a72bc4c)
  • Workflow concurrency change: The PR head makes broad intake/review workflow concurrency run-scoped and adds a per-target planner concurrency group with cancel-in-progress false. (.github/workflows/sweep.yml:142, 4ed05a72bc4c)
  • Capacity accounting change: The PR head counts active review shard jobs, distinguishes total shard jobs, and treats completed-shard publishing runs as consuming zero Codex slots. (.github/workflows/sweep.yml:981, 4ed05a72bc4c)
  • Regression coverage: The PR adds workflow tests that assert run-scoped broad review groups, planner serialization, and publish-only capacity refill markers. (test/sweep-workflow.test.ts:649, 4ed05a72bc4c)
  • Proof state: The PR body reports pnpm run check, but GitHub still showed pnpm check pending and no live scheduler or Actions capacity proof was attached at review time. (4ed05a72bc4c)

Likely related people:

What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. labels Jul 3, 2026
@steipete
steipete marked this pull request as ready for review July 3, 2026 20:49
@steipete
steipete requested a review from a team as a code owner July 3, 2026 20:49
@steipete
steipete merged commit 56431d2 into main Jul 3, 2026
10 checks passed
@steipete
steipete deleted the codex/scheduler-refill-waves-128 branch July 3, 2026 20:49

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4ed05a72bc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread dashboard/worker.ts
.map((value) => value.trim())
.filter(Boolean);
const budget = numberFrom(env.WORKER_BUDGET, 32);
const budget = numberFrom(env.WORKER_BUDGET, 128);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Paginate active-run fetches before raising budget

With the dashboard default now set to 128, a full fleet can exceed one GitHub Actions page of active workflow runs (for example 51 repair workers + 51 issue-implementation workers + 20 exact reviews). activeWorkflowRuns() still fetches only /actions/runs?status=...&per_page=100 once per status, so anything beyond the first page is dropped and active_codex_jobs/budget usage under-report during high-capacity runs. Please paginate the active status fetches before exposing 128 as the default.

Useful? React with 👍 / 👎.

azaj01 pushed a commit to azaj01/clawsweeper that referenced this pull request Sep 21, 2026
perf(scheduler): refill 128-worker review capacity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. P2 Normal priority bug or improvement with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant