Repository navigation
fix(publication): contain retries and normalize canonical slugs - #1094
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 10, 2026, 5:23 AM ET / 09:23 UTC. ClawSweeper reviewWhat this changesThe PR lowers exact-review publication capacity to 8/32/40, persists that policy across a prior fixed-capacity state, and normalizes mixed-case repository slugs at direct and fallback canonical-record validation boundaries. Merge readinessThe patch is technically sound and its final-head Worker/Durable Object boundary proof is sufficient. Keep it open for an explicit maintainer decision on the production 8/32/40 capacity policy and its throughput tradeoff. Priority: P1 Review scores
Verification
How this fits togetherExact-review publication sends completed reviews through a Durable Object queue into lowercase canonical record storage while retaining GitHub’s displayed repository casing for queue and lifecycle identities. The adaptive controller limits how many publication jobs proceed, and stored records feed lifecycle and dashboard readers. flowchart LR
A[Completed reviews] --> B[Publication queue]
B --> C[Adaptive capacity controller]
C --> D[Worker validation]
D --> E[Canonical record storage]
E --> F[Lifecycle and dashboard readers]
Decision needed
Why: The source and local boundary proof establish correctness, but selecting a production concurrency envelope and rollout tolerance is an operational ownership decision. Before merge
Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Adopt the focused normalization and persisted-controller repair, then monitor a full quota window to confirm lower retry amplification and acceptable fresh-publication latency. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main preserves a fixed 50/50/50 policy and compares mixed-case derived slugs against canonical paths without normalization. The PR also records an after-fix local Worker/DO boundary run on its exact head. Is this the best way to solve the issue? Yes for the code defects: normalization is limited to canonical storage identity while GitHub-facing casing remains intact, and the persisted fixed policy is reset without a migration. The chosen production capacity values still need owner approval. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 2cc2c0df8d53. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
|
@clawsweeper re-review |
1 similar comment
|
@clawsweeper re-review |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Summary
50/50/50override to staged containment values8/32/40, including normalization of the persisted fixed-policy controllersteipete/CodexBarandopenclaw/Peekaboo, including direct acceptance, fallback acceptance, dedupe, storage continuity, and collision preventionProblem
CSW-115 found two independent publication degradation cohorts after #1088:
steipete/CodexBarandopenclaw/Peekaboocould sync their GitHub comment and then retry or dead-letter during canonical publication.PR #1088 did not introduce either behavior. The capacity override came from temporary emergency PR #729, and PR #1091 added diagnostics for the mixed-case rejection without fixing it.
Implementation
Staged capacity containment
Production bindings now use:
83240This preserves more healthy throughput than the historical
4/24/48rollback while restoring meaningful downward movement under pressure. A controller persisted by the fixed 50/50/50 policy now reopens with the new maximum ceiling of 40 and the new base demand of 32, and the normalized state is durably written on refresh. Batch size, batch workflow concurrency, dispatch cooldown, retry budgets, and queue inventory are unchanged.Canonical repository identity
canonicalTargetKey,fenceKey, lifecycle identity, and displayed repository casing remain unchanged.Validation
Passed:
pnpm run build:allnode --test --test-name-pattern="production doubles|full review admission does not inflate|exact-review publication scales bounded|direct publication keeps GitHub casing|fallback tuple publication normalizes" test/dashboard-worker.test.tsnode --test test/dashboard-worker.test.tspnpm exec oxfmt --check dashboard/exact-review-direct-publication.ts dashboard/wrangler.toml test/dashboard-worker.test.tspnpm run lint:dashboardpnpm run lint:scriptsgit diff --checkAggregate Windows limits:
pnpm run checkreached repository-wideformat:check, which reports 647 pre-existing checkout/line-ending differences on this Windows worktree. The three touched files pass the focused formatting check.pnpm run test:coverage:no-buildexercised the suite but failed in unrelated platform baselines: hosted Bash workflow fixtures with no WSL/bin/bash, Windows temp cleanupEPERM, and five action-ledger path assertions expecting/while receiving Windows\. No platform policy or unrelated fixtures are changed here; hosted Linux CI remains authoritative for those surfaces.Real Behavior Proof
Claim: Mixed-case GitHub repository identities publish into one lowercase canonical Worker namespace through both direct and fallback paths, while the staged capacity range permits selection below the base target.
Exercised surface: The actual Worker/DO request handlers, publication validation, canonical storage, delivery fingerprinting/dedupe, record reads, and production Wrangler bindings.
Scenario and observed result:
steipete/CodexBar#2831andopenclaw/Peekaboo#364publications using lowercase canonical paths were accepted.steipete-CodexBar/2831was accepted intorecords/steipete-codexbar/....steipete-codexbar/2831deduped at revision 1.8/32/40; capacity selection accepted a current ceiling of 16 rather than being clamped to the base or the former minimum of 50.Environment: Windows host, Node
v24.13.0, pnpm11.16.0, in-memory SQLite-backed Worker/DO stores; plus Docker-backed Crabboxlocal-containerwith Nodev24.19.0, pnpm11.10.0, Wrangler4.107.0, a real local Worker HTTP boundary, and the realExactReviewQueueDurable Object. Candidate commit1767e1eea72d89c709e497d86a637c1488e05931.Artifacts/traces: TAP output from the focused five-scenario command and complete 325-test dashboard Worker file; audit contract retained locally as
C:\clawsweeper-work\notes\CSW-115-real-behavior-proof.md.Docker-backed runtime proof: Crabbox provider
local-container, imagenode:24-bookworm, leasecbx_751790f30d07. To bypass the host's broken rsync transport without changing providers, the no-sync harness cloned the pushed branch inside the container and verified exact SHAa39f19e369632d5cbcc091399637888d4d758cf6. It installed pnpm11.10.0, completedpnpm run build:all, and passed all five focused Worker/DO scenarios (5 passed, 0 failed). Timing: checkout 2.944s, install 3.827s, build 5.964s, behavior 1.393s, total 15.390s. Exit code 0; the one-shot lease stopped automatically. Earlier leasescbx_92bcc6fceaa4andcbx_184ab5d8f57cdocumented the host rsync failure; setup-only leasescbx_150081ab7ab7andcbx_55f28fb33afcidentified and corrected container Corepack/PATH harness setup before the passing run.Local Wrangler boundary proof: Crabbox provider
local-container, imagenode:24-bookworm, leasecbx_a9dca16e1b96, exact SHA1767e1eea72d89c709e497d86a637c1488e05931. Wrangler4.107.0first opened disposable local Durable Object state under the old fixed50/50/50policy and exposed/persistedceiling=50,demand_capacity=50. A second Wrangler process reopened that same state under8/32/40and exposedceiling=40,demand_capacity=32. Across signed loopback HTTP routes, a mixed-case direct batch publication forsteipete/CodexBar#2831returned accepted then deduped, preserved the GitHub-cased target/fence keys, and read the stored lowercase record back with revision/digest continuity. A fallback tuple keyed asopenclaw-Peekaboo/364returned accepted, then deduped when retried asopenclaw-peekaboo/364; the lowercase record read back at revision 1, the uppercase namespace returned 404, and uppercase direct/fallback paths returned 400. Result: all controller and 31 route assertions passed, exit 0; checkout 2.726s, install 3.937s, old-policy seed 11.827s, staged-policy restart 2.184s, HTTP behavior 0.285s, total 21.774s; lease stopped automatically. No request targeted production or external GitHub.Limits: This proof does not deploy the Worker, mutate a live GitHub target, replay queues, or demonstrate organic post-deployment quota recovery.
Codex review closeout
codex review --uncommittedcodex review --base origin/main2cc2c0df8d533677c5ff82cf3b86a148dd8695541767e1eea72d89c709e497d86a637c1488e05931OpenClaw Bay impact
No Bay schema, API response shape, route, or UI rendering changes. Mixed-case reviews will now reach the same lowercase canonical records that Bay already reads, reducing retry/DLQ gaps in lifecycle projection. The lower publication capacity may temporarily leave more cards in Applying while a backlog drains, but the Bay stage mapping and public contract are unchanged.
Risks and rollout
After deployment, monitor at least one complete 60-minute quota window:
tuple_protocol_invalidfailuresRollback is a normal code/config revert. It does not require queue or record migration.
Follow-up
This containment does not yet short-circuit remaining members after the first same-installation rate-limit response or connect every batch throttle receipt to adaptive capacity feedback. Those should remain a separate, measured follow-up.
Links
Release-note context: publication now treats GitHub repository casing consistently and applies a lower staged concurrency range during backlog recovery.
CHANGELOG.mdis intentionally untouched because release notes are release-owned.