Skip to content

fix(publication): restore production publisher capacity - #1097

Closed
brokemac79 wants to merge 1 commit into
mainfrom
codex/csw-117-publication-capacity-rollback
Closed

brokemac79 wants to merge 1 commit into
mainfrom
codex/csw-117-publication-capacity-rollback

Conversation

@brokemac79

@brokemac79 brokemac79 commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Problem

Production publication admission was reduced to an adaptive 8/32/40 range. With all 128 exact-review workers leased, that left only 32 publisher slots at the normal demand tier and constrained verdict publication during backlog drain. The Actions budget is 194, so 128 reviewers plus 50 publishers still preserves the enforced 16-slot control-plane reserve, with no additional unreserved headroom.

Implementation

  • set EXACT_REVIEW_PUBLICATION_MIN_CONCURRENT, BASE_CONCURRENT, and MAX_CONCURRENT to 50 in dashboard/wrangler.toml
  • update the matching production-config assertions and assert that 128 active review leases still admit 50 publication workers
  • update config/documentation-sync.json so docs: add deterministic drift checks #1096's deterministic drift gate owns the restored values
  • update only the affected capacity statements in README.md, docs/scheduler.md, docs/live-dashboard.md, and docs/limits.md

Goal B's durable acknowledgement/retry and shared-installation quota circuit behavior are deliberately out of scope.

Validation

  • pnpm run check:docs — passed
  • node --test test/check-docs.test.ts — 12/12 passed
  • node --test --test-name-pattern "production doubles exact review claims|full exact-review admission preserves production verdict publication capacity|exact-review publication controller adopts the staged base|direct publication keeps GitHub casing|fallback tuple publication normalizes mixed-case keys" test/dashboard-worker.test.ts — 5/5 passed
  • pnpm run check:limits — passed
  • tsc -p tsconfig.dashboard.json — passed
  • oxfmt --check config/documentation-sync.json dashboard/wrangler.toml test/dashboard-worker.test.ts — passed
  • git diff --check — passed
  • local-container broad gates: active-surface, dashboard queue boundary, docs, limits, build, all lint targets, and changed coverage passed

Real Behavior Proof

Claim: At full 128-review admission, production preserves 50 exact-review verdict publisher slots while retaining the 16-slot control-plane reserve inside the 194-slot Actions budget, and the drift gate requires the same values in active documentation.

Exercised surface: production Wrangler values, exactReviewPublicationCapacityForState with 128 leased review items, the #1096 docs-sync manifest/checker, and #1094 canonical casing/lifecycle regression tests.

Scenario: Crabbox synchronized the clean host worktree at exact committed head fd6c41b0130efb657e0ce738ba073714a2a00fec. The harness verified SHA-256 digests for all seven changed files, constructed 128 live review leases, evaluated production admission with 194 total Actions slots and fixed 50/50/50 publication settings, then ran the docs drift contract and affected regression gates.

Command/environment: Crabbox 0.40.0, provider=local-container, image mcr.microsoft.com/playwright:v1.60.0-noble, pnpm 11.10.0. Exact-head proof lease cbx_a9c303646f5a.

Observed result:

CSW117_SNAPSHOT_HEAD=fd6c41b0130efb657e0ce738ba073714a2a00fec
CSW117_SNAPSHOT_FILES=7
tests 5; pass 5; fail 0
documentation tests 12; pass 12; fail 0
Documentation checks passed.
CSW117_REVIEW_LEASES=128
CSW117_PUBLICATION_CAPACITY=50
lint: 0 warnings and 0 errors across all targets
CSW117_PROOF=PASS

Artifacts: local proof harness C:\clawsweeper-work\notes\csw-117-goal-a-proof.sh; Crabbox failure bundles are retained locally for diagnostic-only setup attempts.

Limits: No deployment, workflow dispatch/rerun, queue or DLQ operation, gate toggle, or production mutation was performed. Raw Windows-to-Linux workspace sync preserves CRLF, so the repository-wide Linux formatter aggregate was not used in the final container run; touched format-owned files passed both host and container checks, and hosted CI runs the full aggregate from a clean checkout. This proves configuration/admission and documentation-drift behavior, not live GitHub runner availability or production drain rate.

Review Closeout

  • dirty review of the complete rebased seven-file diff: no actionable findings; configuration, docs synchronization, budget arithmetic, and preserved lifecycle scope were consistent
  • committed review of origin/main..fd6c41b0130efb657e0ce738ba073714a2a00fec: no actionable findings; 50/50/50 and 128 + 50 + 16 = 194 verified
  • focused proof and exact-head Crabbox proof were rerun after the docs: add deterministic drift checks #1096 rebase and documentation synchronization

Risks / Rollout

  • Production becomes fixed at 50 publishers rather than adaptive within 8/32/40. Under 128 active reviews, 128 + 50 + 16 = 194, so there is no additional unreserved Actions headroom.
  • docs: add deterministic drift checks #1096's drift manifest and all affected active capacity guidance are synchronized to 50/50/50; future config drift fails pnpm run check:docs.
  • Bay/dashboard impact is limited to the existing read-only capacity projection reflecting 50; there is no UI, API, schema, or persistence change.
  • Normal dashboard deployment after merge applies the Wrangler configuration. Monitor publication pending depth, active publishers, GitHub pressure/cooldown telemetry, and control-plane health after merge.

Related

@clawsweeper

clawsweeper Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added merge-risk: 🚨 availability 🚨 Merging this PR could cause crashes, hangs, restart loops, stalls, or process outages. P1 Urgent regression or broken agent/channel workflow affecting real users now. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 10, 2026
@clawsweeper

clawsweeper Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 12, 2026, 2:24 AM ET / 06:24 UTC.

ClawSweeper review

What this changes

The PR changes production exact-review publication capacity from adaptive 8/32/40 to fixed 50/50/50, with matching tests and operational documentation.

Regression provenance

Possible regression — probable (reviewed change; known regression link). No predecessor PR is attributed.

Merge readiness

⛔ Blocked until real behavior proof from a real setup is added - 8 items remain

The PR is still needed only if reworked: its fixed 50/50/50 policy reintroduces the loss of GitHub-pressure downshifting that current main deliberately preserves.

Priority: P1
Reviewed head: fd6c41b0130efb657e0ce738ba073714a2a00fec

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The patch has focused configuration coverage but retains a P1 availability regression and lacks real pressure-path proof.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: The supplied Crabbox trace covers configuration and in-memory admission assertions, not a Worker/Durable Object publication path receiving GitHub pressure and reducing capacity. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The supplied Crabbox trace covers configuration and in-memory admission assertions, not a Worker/Durable Object publication path receiving GitHub pressure and reducing capacity. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 5 items PR removes the downshift floor: The proposed production configuration makes minimum, base, and maximum publisher capacity all 50.
Current controller honors the configured minimum after failure: On GitHub rate-limit feedback, the controller halves capacity but clamps it with the configured minimum; a minimum of 50 therefore cannot reduce a 50-slot ceiling.
Current-main policy and regression coverage: Current production settings are 8/32/40, and the queue-policy suite explicitly verifies that a prior fixed-50 controller is normalized to the staged range.
Findings 1 actionable finding [P1] Retain a rate-limit downshift below 50 publishers
Security None None.

How this fits together

Exact-review runs enqueue verdict publication into a Durable Object queue. Production Wrangler settings and GitHub failure feedback determine how many publisher workflows may run before results are sent to GitHub.

flowchart LR
  A[Exact-review runs] --> B[Durable publication queue]
  B --> C[Capacity controller]
  D[Production capacity settings] --> C
  E[GitHub pressure feedback] --> C
  C --> F[Publisher workflows]
  F --> G[GitHub verdict publication]
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The supplied Crabbox trace covers configuration and in-memory admission assertions, not a Worker/Durable Object publication path receiving GitHub pressure and reducing capacity. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Retain a rate-limit downshift below 50 publishers (P1) - All three values are set to 50 here, but the current feedback controller clamps a rate-limit reduction to minimum; a 50 minimum therefore leaves the ceiling at 50 after a GitHub throttle. Current production uses an 8/32/40 range specifically to retain this containment. This repeats the unresolved prior finding at the same head; keep a lower floor and cover the throttled path.
  • Resolve merge risk (P1) - With a minimum of 50, rate-limit feedback cannot reduce publisher concurrency below 50, undermining the existing quota-containment path.
  • Resolve merge risk (P1) - The PR head is marked dirty against current main, so it needs a rebase and fresh proof before merge.
  • Complete next step (P2) - The draft has a concrete P1 defect, is dirty against current main, and needs contributor-owned real behavior proof before a fresh review.
  • Improve patch quality - Rebase the dirty branch onto current main.
  • Improve patch quality - Restore a capacity floor below 50 and add a rate-limit regression.
  • Improve patch quality - Add redacted Worker/Durable Object runtime output showing throttle reduction and recovery.

Findings

  • [P1] Retain a rate-limit downshift below 50 publishers — dashboard/wrangler.toml:58-60
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Patch scope 7 files changed, 36 added, 37 removed One production configuration change is synchronized across its test and active operational documentation.

Merge-risk options

Maintainer options:

  1. Restore pressure-sensitive capacity (recommended)
    Keep a production floor below 50, retain 50 for healthy full-admission demand, and add a rate-limit regression before merging.

Technical review

Best possible solution:

Rebase onto current main and preserve 50 healthy-capacity admission only with a lower pressure floor, then prove a rate-limited Durable Object path reduces capacity and later recovers.

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

Yes: the PR sets the controller minimum to 50, while current source clamps rate-limit reductions to that minimum; the resulting no-downshift behavior follows directly from the current code.

Is this the best way to solve the issue?

No: fixed 50/50/50 restores healthy capacity but removes the existing pressure safeguard; retain a lower floor while allowing the healthy target to reach 50.

Full review comments:

  • [P1] Retain a rate-limit downshift below 50 publishers — dashboard/wrangler.toml:58-60
    All three values are set to 50 here, but the current feedback controller clamps a rate-limit reduction to minimum; a 50 minimum therefore leaves the ceiling at 50 after a GitHub throttle. Current production uses an 8/32/40 range specifically to retain this containment. This repeats the unresolved prior finding at the same head; keep a lower floor and cover the throttled path.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.99

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P1: The patch can regress publication recovery during GitHub quota pressure in the production verdict path.
  • merge-risk: 🚨 availability: Fixed publisher concurrency prevents the existing controller from reducing work after a rate-limit signal.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦪 silver shellfish.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The supplied Crabbox trace covers configuration and in-memory admission assertions, not a Worker/Durable Object publication path receiving GitHub pressure and reducing capacity. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • PR removes the downshift floor: The proposed production configuration makes minimum, base, and maximum publisher capacity all 50. (dashboard/wrangler.toml:58, fd6c41b0130e)
  • Current controller honors the configured minimum after failure: On GitHub rate-limit feedback, the controller halves capacity but clamps it with the configured minimum; a minimum of 50 therefore cannot reduce a 50-slot ceiling. (dashboard/exact-review-queue.ts:11299, a1795973a9e6)
  • Current-main policy and regression coverage: Current production settings are 8/32/40, and the queue-policy suite explicitly verifies that a prior fixed-50 controller is normalized to the staged range. (test/dashboard-worker-queue-policy.test.ts:1680, a1795973a9e6)
  • Quota-containment provenance: The current rate-limit circuit and feedback behavior appears to date to the merged GitHub-quota containment work. (dashboard/exact-review-queue.ts:11300, cd4892391195)
  • Prior review continuity: The latest completed ClawSweeper review at this same head raised the unresolved P1 finding to retain a rate-limit downshift below 50 publishers. (fd6c41b0130e)

Likely related people:

  • Martin Cleary: Authored the merged GitHub-quota containment commit that added the relevant publication-pressure behavior. (role: introduced quota-containment behavior; confidence: high; commits: cd4892391195, 50f90eac14f7; files: dashboard/exact-review-queue.ts, dashboard/wrangler.toml)
  • Peter Steinberger: Authored several recent current-main queue refactors and performance changes around the affected controller. (role: recent queue maintainer; confidence: high; commits: 6bf7f483fb03, d8471a64e56b; files: dashboard/exact-review-queue.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

History

Review history (4 earlier review cycles)
  • reviewed 2026-08-10T12:40:15.806Z sha 86cf2f1 :: needs real behavior proof before merge. :: [P1] Migrate the persisted controller to the restored target | [P1] Preserve GitHub-pressure downshifting | [P2] Align the operational capacity documentation
  • reviewed 2026-08-10T12:45:07.925Z sha 86cf2f1 :: needs real behavior proof before merge. :: [P1] Preserve GitHub-pressure downshifting | [P2] Synchronize configuration-derived capacity documentation
  • reviewed 2026-08-10T12:54:09.632Z sha fd6c41b :: needs real behavior proof before merge. :: [P1] Retain a rate-limit downshift below 50 publishers
  • reviewed 2026-08-11T12:13:57.940Z sha fd6c41b :: needs real behavior proof before merge. :: [P1] Retain a rate-limit downshift below 50 publishers

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 10, 2026
@brokemac79
brokemac79 force-pushed the codex/csw-117-publication-capacity-rollback branch from 86cf2f1 to fd6c41b Compare August 10, 2026 12:49

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

Copy link
Copy Markdown
Contributor Author

Closing as superseded. The fixed 50/50/50 publication-capacity rollback is no longer planned; current work is pursuing adaptive, quota-aware containment instead. This PR was not merged or adopted, and no current quota-control or adaptive-scheduler work depends on it.

@brokemac79 brokemac79 closed this Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 availability 🚨 Merging this PR could cause crashes, hangs, restart loops, stalls, or process outages. P1 Urgent regression or broken agent/channel workflow affecting real users now. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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