Repository navigation
fix(review): avoid admission delays when Actions quota is exhausted - #1598
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 16, 2026, 11:13 PM ET / September 17, 2026, 03:13 UTC (Revision 4). ClawSweeper reviewWhat this changesMoves the pre-review admission check into the shared workflow CLI so eligible throttled reads can use one scoped App-token fallback while preserving existing admission decisions. Merge readiness✅ Ready for maintainer review This PR remains useful: current main still defers admission when the Actions credential is throttled. The reviewed patch has no actionable correctness findings, and the supplied current-head transport proof supports the intended recovery. Priority: P2 Review scores
Verification
How this fits togetherExact-review admission checks a claimed GitHub item before ClawSweeper spends review capacity. GitHub state and credential availability determine whether the workflow proceeds, defers, or completes without a review. flowchart TD
A[Claimed review item] --> B[Admission check]
B --> C[GitHub read]
C --> D{Eligible public throttle?}
D -->|Yes| E[One scoped App fallback]
D -->|No| F[Evaluate item state]
E --> F
F --> G[Proceed, defer, or complete]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep admission on the shared bounded read owner while retaining private-target credential requirements and existing queue outcomes. Do we have a high-confidence way to reproduce the issue? Yes. Current-main source directly defers on the mandatory Actions-token throttle, and the supplied frozen-main transport trace demonstrates that path; this read-only review did not rerun it. Is this the best way to solve the issue? Yes. Reusing the existing read owner avoids a competing credential policy, and the preserved decisions plus composed transport evidence support this narrow integration. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4057a611890e. LabelsLabel 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) |
What Problem This Solves
Fixes exact reviews being deferred for 20 minutes when the repository Actions quota is exhausted even though the existing target App credential can perform the admission read.
User Impact
Eligible public reviews can continue after one successful fallback read. Private targets retain their App credential requirement; later optional reads still warn and follow the existing admission behavior.
Why This Change Was Made
The live-item workflow now uses the existing workflow CLI and GitHub read owner in one process, so its single fallback allowance covers the whole admission. The pure scheduled no-op classifier moves into the compiled source owner and its obsolete script wrapper is removed. Branch, missing-item, locked-item, and oversized-PR decisions retain their existing contracts.
The proof runtime owns its dependency copies and removes them on success or failure. Rename-aware production/workflow growth is seven lines; that establishes the shared admission lifetime without adding another token-selection policy.
This branch now includes main through 4057a611890e, including the dispatched-credential attribution fix in #1600. No additional production composition change was needed. Both operational changelog entries are preserved.
OpenClaw Bay Impact
No Bay change is needed. Admission outputs, retry kinds, publication records, and dashboard schemas are unchanged. The proof checks the existing output and decision contracts.
Documentation Impact
Reviewed
docs/target-dispatcher.mdanddocs/github-egress-telemetry.md. Existing provisioning, credential scopes, and durable queue contracts remain accurate. Added an operational changelog entry.Evidence
387af5acf9a9ba503239b2ff9b06e1f46c0b4228; tree185aba260b16045d0a7b7a8f47b53f29756a9d66; qualification base4057a611890e04cf3fc106ce6ce7a168ddbfa148.run_8563a18d575epassed the paired 65-case workflow proof andcorepack pnpm run check: 6,281 passed, 19 platform skips, zero failures or cancellations (6,300 tests total). Format, lint, builds, static checks, and coverage gates passed.bccb5d8baeb07e5bec484c4ede7c80174e059bd50bf666b95182a0f343792024). The inherited scanner finding from the precommit integration review is explicitly dispositioned below. Runtime proof was executed separately on the isolated AWS lease.Real Behavior Proof
Claim/surface: execute the frozen main live-item YAML command and the candidate compiled workflow CLI through the existing GitHub read/retry owner, preserving one admission-wide App fallback and the admission decision contracts.
Paired workflow proof: 65 scenarios passed on the integrated tree. Baseline Actions issue HTTP 429 produces the existing 20-minute defer. Candidate Actions issue 429 → App issue success → Actions pull 429 → Actions comments 429 returns
proceed=trueand both optional-read warnings without a second App fallback. Coverage also includes public missing-App reads, private missing-App rejection despite an ambient token, repository-access/404 distinctions, five-minute branch deferral, paginated comments, closed/locked/no-op decisions, and oversized artifacts.Command/environment:
node scripts/e2e/exact-review-noop-read-scope.mjs --build --baseline-capsule .artifacts/exact-review-admission-baseline-composed-20260917.json --output .artifacts/exact-review-admission-proof-composed-20260917.json, followed bycorepack pnpm run check, on one isolated AWS Crabbox lease with Node 24.18.1, pnpm 12.4.1, and Bash 5.3.9. Its physical dependency install usedcorepack pnpm install --frozen-lockfile. The baseline capsule was verified against main4057a611890e04cf3fc106ce6ce7a168ddbfa148; a normal Git checkout can use--baseline 4057a611890e04cf3fc106ce6ce7a168ddbfa148.Real GitHub CLI transport proof
Native AWS Crabbox run
run_aef70d479036passed at 2026-09-17T03:07:10.504Z using unmodified GitHub CLI 2.46.0, the compiled candidate, and the exact frozen baseline shell. Exit 0; command 4,425 ms, total 4,554 ms, sync skipped. The source, compiled files, and dependencies remained unchanged.proceed=false,admission_retry=true,retry_kind=throttle; 20-minute deferproceed=true,admission_retry=false; optional PR-metadata warning; exactly one App fallback; later failure attributed torepository_actionsproceed=false,admission_retry=true,retry_kind=throttle; 20-minute defer attributed totarget_appThe six GETs used synthetic item 41 on a loopback TLS fixture. Method, host, TLS SNI, endpoint, credential role, order, request count, native error text, and the absence of a second fallback were asserted. All three children exited naturally with stdout/stderr EOF. Each tunnel had both natural read EOF and write completion, zero queued bytes, and no socket error before the scenario was accepted.
Fixture lifecycle qualification: a separate deterministic canary used the same tunnel owner. The server sent EOF first; only after receiving that EOF did the client send its 59,392-byte tail. Exact prefix/tail bytes and hashes matched, and both tunnel halves plus all scenario sockets closed naturally. The fixture preserves independent half-closes and treats socket errors, premature close, or a two-second settlement timeout as fatal.
Isolation/command:
crabbox run --id <owned-lease> --no-sync --no-hydrate --keep --timing-json --script <reviewed-proof-script>. A separate network namespace exposed only loopback and no external routes. The real-gh CONNECT proxy accepted only api.github.com:443 and connected only to the local TLS fixture. It used fake tokens, a cleared environment, a read-only source mount, and an invocation-scoped fixture CA with certificate validation enabled. The private fixture and owned children were removed/closed after proof.Exact proof identities and source binding
.artifacts/exact-review-admission-proof-composed-20260917.json: 111,716 bytes; SHA-256a3eba1b4bc11a91d7ca6dcf47564d32ba37a6c69d42aec0863cd05ddd70a286a..artifacts/exact-review-admission-real-gh-halfclose-20260917.json: 17,289 bytes including final LF; SHA-2563fce4352e2b327497cbad921227fc7f9be1fdb64442c2344f1a037afb61aaec0.679c32870674197dd4d40f70497178b7f0e0e83d8b80276b86e116b0e483cc90.c76df7d4266faf9dc78c3a47943cb00b91026820cfdc0e8eb57e3abe5991a70f.80671b8dab3e41893f3e338fb104c997a390b0a51fafc34eb30048e2df99ab54.5b05a34bbdf901d7dda104e221320b9a78dd90474e22fb4d20c803df5c3be624; runtime config digest:0fe6611b9697a790fcb8f998ac274071e259d8be17a351db60db2eac2d0d4863; compiled digest:0b33e8604379131879be8c997f971dab0b5db168979415135a5081314ad3322d.79c98f9192de1320c4ce82918ecac6bbd6a0aaa6ca5117fa0cc91ba4ba6676c3; capsule:8b444242e975b97f10f870b0ce37e70d7cd75495aa3869ba7f7e31c6cd3b1d89.571492daeae0350a00dc3de5db5b7b44fac6b0e314f48257594f0706f9062839; workflow CLI:19947a163d9b1d00f33905fd0e41506ce6539cbd09a7e02c1c5ea7416b9d4c90.The bound owner inputs include
src/repair/github-cli.ts(a955c4cb0680b1856d67dd1226ea866894d65b127fb8e1d1649df759d7facc4b) andsrc/github-retry.ts(cd988d2e48c23847d5bbe95b0a4bea7f04c5344b7cb29e66cffedcaf66aecd51), so the proof covers the credential-attribution composition from #1600.The receipts truthfully identify the precommit integration tree. Signed commit
387af5acf9a9ba503239b2ff9b06e1f46c0b4228has exactly that tree; all tracked proof input hashes were checked against its committed blobs.Failed-fixture disposition: preceding composed run
run_5af80d6fc3d9stopped on the fixture proxy's EPIPE before accepting a scenario; it is not proof or evidence of a vendor quota failure. The reviewed successor repaired the fixture-owned half-close and peer-destruction lifecycle, added the deterministic canary, and passed once with strict error and cleanup guards retained. No production code was changed for this fixture repair.Limits: the real client received controlled TLS responses; this was not live GitHub quota exhaustion or a production-capacity measurement. Installed gh 2.46.0 lacks
--slurp, so the additional real-client proof does not exercise paginated comments; the 65-case workflow proof covers their argument/decision contract. The full suite retains 19 platform-specific skips. This qualification did not change production queues or deploy services.Review Finding Disposition
The precommit integration review found an inherited scanner issue: after a Git-metadata proof masks an index OID, replaying an otherwise approved URI finding from that same patch section can fail with
material_not_reviewed. The reviewed reproduction classified the URI alone, then required metadata proof for mixed findings, then refused the replay because the masked patch no longer supplied the original witness.This belongs to the scanner proof owner and is being handled in a separate scanner-qualification follow-up.
src/agent-input-scan.tshas the same Git blob3a0f67ea3d9453b893378bb50001a327f15a5967in main4057a611890e04cf3fc106ce6ce7a168ddbfa148and this branch; its masking/replay path at lines 725–729 is outside the admission delta. The scanner, patch-witness, and fixture modules have no diff against that main. Keeping the repair separate avoids expanding this admission change or treating the inherited finding as silently resolved.