Repository navigation
fix: keep PR identity checks working when GraphQL quota is exhausted - #153296
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 19, 2026, 10:34 PM ET / September 20, 2026, 02:34 UTC (Revision 5). ClawSweeper reviewWhat this changesMoves PR writer identification and reviewer assignment to validated REST requests and updates workflow and acknowledgement tests. Merge readiness✅ Ready for maintainer review The fix remains necessary on current main and in v2026.9.5. No actionable introduced defect was found, including in the acknowledgement-test follow-up. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s maintainer scripts identify the authenticated GitHub writer before preparing, claiming, or landing PRs. That identity feeds assignment, administrative authorization checks, and recovery records. flowchart TD
A[PR workflow request] --> B[Selected GitHub CLI]
B --> C[REST writer identity]
C --> D[Validate response and exit status]
D --> E[Reviewer assignment]
D --> F[Fresh administrative checks]
D --> G[Merge recovery record]
F --> H[Permitted dispatch]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +48, Docs +3, Other +29. Total +80 across 20 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Use one validated REST writer-identity owner while retaining fresh authorization checks and GraphQL operations whose contracts still require it. Do we have a high-confidence way to reproduce the issue? Yes, source establishes that exhausted GraphQL quota blocks current-main authentication preflight despite available REST quota. No runtime reproduction was executed during this read-only review. Is this the best way to solve the issue? Yes, the patch reuses the selected CLI and response-validation owners, migrates all five identity consumers, and verifies assignment without replacing authorization or merge contracts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 42dcea5312ff. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
Use included-header REST identity reads through the protected selected CLI, preserving the actual mutation writer and quota diagnostics. Verify reviewer assignment through the REST assignees response. Keep GraphQL contracts for queue state, squash previews, required-check app binding, and atomic publication. Refs #153199.
e1845dc to
3502ef4
Compare
|
Merged via squash.
|
…penclaw#153296) * fix(scripts): use REST for writer identity and reviewer claims Use included-header REST identity reads through the protected selected CLI, preserving the actual mutation writer and quota diagnostics. Verify reviewer assignment through the REST assignees response. Keep GraphQL contracts for queue state, squash previews, required-check app binding, and atomic publication. Refs openclaw#153199. * test: preserve acknowledgement worker owner checks
…quests (#152851) * fix(github): keep publication options responsive with many pending requests Stream and validate pending repository receipts on the existing shared-state worker, retaining the latest compact result. Revalidate current session and personal GitHub identity after the awaited read while preserving the non-repository fallback and canonical confirmation checks. * test(codex): isolate turn-event fixture clocks Use controlled clocks and an accepted-turn barrier for plan restoration and interrupted-completion fixtures. Keep the execution budget and assertions unchanged, and move the cases into a dedicated suite with the same database-worker routing. * test: preserve acknowledgement worker owner checks Carry only the delivery acknowledgement fixture correction from 883b2a9 (#153296). Preserve explicit null and undefined owner checks, use the acquired claim for cleanup, and keep omitted-owner acknowledgement idempotent after settlement.
…read (#152319) * refactor(skills): move usage and curator status SQL off the caller thread * fix(skills): preserve worker errors and await usage test persistence * fix: drain delivery queue maintenance during shutdown * fix: keep Workshop event reads off the Gateway request thread * test: isolate retired agent cleanup transport fixture (#153286) * test(gateway): align curator checks with canonical lifecycle fixtures Reuse the isolated cleanup fixture from #153286 and the held-terminal-write private completion fixture from #153226. Retain the curator cleanup await. The combined 36-case proof, targeted types/lint, and independent review pass; production is unchanged. * test(outbound): clean up ACK fixtures with their owner * test(outbound): clean up ACK fixtures with their captured owner Carry the exact reviewed cleanup line from #153367, now covered by main #153296. Preserve the negative null and undefined ownership assertions. The postimage matches the canonical reviewed fixture and all four focused cases pass. * test: join Doctor database cleanup before snapshots * refactor(skills): consolidate workshop worker dispatch
…quests (openclaw#152851) * fix(github): keep publication options responsive with many pending requests Stream and validate pending repository receipts on the existing shared-state worker, retaining the latest compact result. Revalidate current session and personal GitHub identity after the awaited read while preserving the non-repository fallback and canonical confirmation checks. * test(codex): isolate turn-event fixture clocks Use controlled clocks and an accepted-turn barrier for plan restoration and interrupted-completion fixtures. Keep the execution budget and assertions unchanged, and move the cases into a dedicated suite with the same database-worker routing. * test: preserve acknowledgement worker owner checks Carry only the delivery acknowledgement fixture correction from bee4ccd (openclaw#153296). Preserve explicit null and undefined owner checks, use the acquired claim for cleanup, and keep omitted-owner acknowledgement idempotent after settlement.
…read (openclaw#152319) * refactor(skills): move usage and curator status SQL off the caller thread * fix(skills): preserve worker errors and await usage test persistence * fix: drain delivery queue maintenance during shutdown * fix: keep Workshop event reads off the Gateway request thread * test: isolate retired agent cleanup transport fixture (openclaw#153286) * test(gateway): align curator checks with canonical lifecycle fixtures Reuse the isolated cleanup fixture from openclaw#153286 and the held-terminal-write private completion fixture from openclaw#153226. Retain the curator cleanup await. The combined 36-case proof, targeted types/lint, and independent review pass; production is unchanged. * test(outbound): clean up ACK fixtures with their owner * test(outbound): clean up ACK fixtures with their captured owner Carry the exact reviewed cleanup line from openclaw#153367, now covered by main openclaw#153296. Preserve the negative null and undefined ownership assertions. The postimage matches the canonical reviewed fixture and all four focused cases pass. * test: join Doctor database cleanup before snapshots * refactor(skills): consolidate workshop worker dispatch
Closes #153199.
What Problem This Solves
PR review and preparation stop at writer-identity preflight when GraphQL quota is exhausted, even if the same authenticated writer still has REST quota available.
User Impact
Writer checks and reviewer claims can proceed using REST/core quota. This does not make the entire landing workflow GraphQL-free: merge-queue state, squash previews, required-check app binding, and atomic publication keep their existing contracts.
Why This Change Was Made
One shared helper runs
gh api user --includethrough the selected protected CLI and validates the REST response and process result before exposing the login. Included headers preserve the native writer route; ordinary pooled or saved-login responses cannot establish writer authority. All five identity consumers use this owner, including administrative checks and merge recovery.Reviewer claims use the REST assignees endpoint and verify that GitHub actually returned the requested user. Existing credential selection, host binding, quota diagnostics, and merge-outcome handling remain intact. No custom HTTP client, credential extraction, or fallback to a different identity is added.
Evidence
7a168731a9e416cc3d1892bffbf8ee55988559c3, matching pre-rebase commite1845dc4aee27e94263bd4daef40f478a13e861b. The retained wrapper summary reportsexitCode: 0andrunStatus: succeeded; lease cleanup can make the linked Actions run show cancelled. The lease has been stopped.Local broad proof hit a five-second Git fixture setup deadline before the changed entry point. Isolated tracing showed the unchanged 1,247-file staging command varying from 1.96 to 8.24 seconds under host filesystem load; interleaved base/candidate setup checks behaved similarly. No assertion, timeout, or staging scope was weakened. The remote run provides the broader proof.
Hosted CI follow-up
The first hosted CI run failed in two unchanged test areas. The shared-worker cleanup failure also reproduced on main and is repaired by merged #153286. The transcript producer failure reproduced locally in the original file order, together with two neighboring startup polls; merged #153336 replaces those one-second startup polls with capture lifecycle completion. Its complete producer and shutdown run passed all 53 tests, and its scoped checks, hosted CI, and independent review passed.
Both repairs are included in refreshed base
26505c528b50ff0fadd4d4df6e3a53d879f3f2bf. Rebase commit3502ef47c05a4effc05b571cbe31881024682be8preserves the reviewed REST patch exactly, verified by Git range-diff and stable patch hashes.The refreshed CI run cleared both original failures and exposed only two stale acknowledgement-worker tests after #153083 deliberately prohibited claimless settlement of live claims. This PR now corrects their cleanup to use the captured owner and retains meaningful null/undefined transfer coverage by checking missing-row behavior. Production ownership checks are unchanged. All 36 acknowledgement-worker and storage tests, the complete scoped static gate, and independent P0–P2 review pass. Final-head CI passed for
514517d55841c3c6aa2795c37cd2236a711c0839. The native maintainer workflow merged this head as883b2a9441654a0f4ea988cc9bfd209ed9a1be46.