Repository navigation
fix(automerge): preserve quota retry classification - #1168
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 14, 2026, 6:46 AM ET / 10:46 UTC. ClawSweeper reviewWhat this changesThis PR preserves quota retry metadata across an apply yield so exact-event publication reports GitHub throttling as a retryable failure. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep open: current main does not recognize a rate-limit-backed clean apply yield at exact publication, while this focused PR restores the established retry classification with strong real-behavior proof. Priority: P2 Review scores
Verification
How this fits togetherThe apply lane processes reviewed GitHub items and can stop cleanly when its API budget is exhausted. Exact-event publication converts that apply result into workflow outputs and a durable batch outcome used to schedule retry behavior. flowchart LR
A[GitHub quota response] --> B[Apply lane]
B --> C[Clean runtime-budget yield]
C --> D[Exact event publication]
D --> E[Retryable workflow result]
D --> F[Durable batch result]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the focused classification repair after the current-head check gate completes, retaining the 403/429 transport fixture as regression coverage. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible with high confidence: the existing 403/429 exact-publication fixture exercises this boundary, and current main lacks its rate-limit-yield classification. Is this the best way to solve the issue? Yes. Reconstructing the existing typed quota error at the publication boundary is the narrowest solution and preserves its established retry handler and metadata contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against bf762f3f6f9e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
What broke
The inherited failure in automerge e2e run 31791711359 is a production classification regression, not a stale request-count fixture.
PR #1166 correctly changed close-mode quota exhaustion from a thrown error into a clean apply yield. The exact-event apply now records two
skipped_runtime_budgetactions: one for item42and one continuation sentinel for item0.publish-event-resultdid not recognize that clean-yield proof, threw an untyped error, and converted the intended retry intopermanent_failure/unknown_failure.The request-count assertion was already correct. In the red 403 case it expected 1 request and observed 1 request, with 0 DELETEs; the failing assertion was
retryable_failureexpected versuspermanent_failureactual. The 429 case was unreachable after that first assertion aborted. After the fix, 403 and 429 each observe exactly 1 authenticated GET and 0 DELETEs.Fix
The apply yield now preserves the bounded retry deadline plus credential scope and reset provenance. The exact-publication boundary recognizes a rate-limit-backed
skipped_runtime_budgetresult and reconstructs the existingGitHubRateLimitError, so the established completion path emitsretryable_failure/github_rate_limitto both workflow outputs and the durable batch result.No fixture count was changed.
CHANGELOG.mdwas intentionally left untouched per the work order.Behavior proof
publish-event-resultCLI and real GitHub CLI HTTP transport over the fixture's owned Unix socket.provider=local-container; committeddocs/proof/fix-automerge-quota-fixture/run-proof.shat runtime heade1b0e27e5fd8045ce65da1fdcdcfc6c145d1e8d0.[403,429], requests[1,1], publisher exits[1,1], completion kindsretryable_failuretwice, failure kindsgithub_rate_limittwice, durable batch kindsretryable_failuretwice, cleanup deletes[0,0].docs/proof/fix-automerge-quota-fixture/container-receipt.json; leasecbx_c6ed44beacf2(crimson-prawn-01cd), stopped and absent from the provider list.git cat-file; staticjqvalidated the receipt.OpenClaw Bay is unaffected because this restores an internal exact-publication failure classification; no lifecycle, queue, status, telemetry, dashboard, or public observer contract changes.
Validation
pnpm run check: 3,463 tests; 3,455 passed, 8 skipped, 0 failed.origin/main: clean, no accepted/actionable findings.Proof is sufficient for the claimed loopback publication behavior. No review finding is unresolved.