Repository navigation
fix: unblock large repository review checkouts - #1519
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 9, 2026, 9:19 PM ET / September 10, 2026, 01:19 UTC. ClawSweeper reviewWhat this changesReduce GitHub tree metadata captured during PR checkout preparation while preserving the fields needed to validate checkout size and completeness. Merge readiness✅ Ready for maintainer review This remains a useful, focused fix: current main still captures the oversized checkout metadata response. No actionable defects were found, and the supplied production-path trace sufficiently demonstrates the repaired behavior. Priority: P2 Review scores
Verification
How this fits togetherClawSweeper prepares a private checkout before reviewing a PR. GitHub metadata supplies missing blob sizes, which checkout admission checks before fetching objects and materializing the pinned revision. flowchart TD
A[Pinned PR revision] --> B[GitHub recursive tree]
B --> C[Project required metadata]
C --> D[Validate completeness and sizes]
D --> E[Check checkout budgets]
E --> F[Fetch missing objects]
F --> G[Private review checkout]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Admit valid large pinned checkouts within the existing resource limits while continuing to reject incomplete or malformed metadata. Do we have a high-confidence way to reproduce the issue? Yes: current main captures the full recursive-tree response through an 8 MiB buffer, and the supplied replay documents ENOBUFS for a 10.7 MB response. This review verified the source path without executing it. Is this the best way to solve the issue? Yes: projecting unused metadata before capture is a narrow repair that preserves the existing validator and budgets; the real transport trace supports the intended result. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against cd76da8aa7b0. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Related: openclaw/openclaw#143547
What Problem This Solves
Fixes valid large-repository reviews failing before model execution with “remote blob size metadata is unavailable.” The complete tree response for the linked OpenClaw PR is 10.7 MB, exceeding the existing 8 MiB GitHub CLI output capture. The resulting
ENOBUFSis reported as a checkout metadata failure.Why This Change Was Made
Project the recursive-tree response inside
gh --jqbefore capturing it. Keep the truncation flag and every entry's type, SHA, and size, which are the facts the existing checkout admission consumes. Preserve malformed container and entry shapes so the validator still rejects them. The CLI capture, private-workspace, file-count, deadline, and disk limits are unchanged.User Impact
Reviews can prepare valid large repositories without unused paths and URLs filling the metadata response buffer. Incomplete, truncated, malformed, or oversized source remains rejected.
OpenClaw Bay Impact
Bay is unaffected. This changes internal source-preparation transport only; lifecycle, review publication, status, telemetry, and observer data contracts stay the same.
Documentation Impact
The active README review overview now describes the metadata projection and unchanged admission guarantees. The existing Unreleased changelog records the fix. No workflow or operator configuration changes are required: new sweep runs build the checked-out source with
build:all.Evidence
ghOncecapture limit, real jq evaluation, and real partial-clone Git materialization, preserving every required metadata fact.pnpm run checkpassed: 5,943 tests passed, 32 platform skips, and no failures, plus 13 passing changed-coverage tests.e0f926b1543aeb5d8aef0f5b53e2a0b9a1ba54cdare both clean, with no actionable findings.Real Behavior Proof
On Node 24.20.0/macOS, the built
createContextHydration(...).materializePullRequestReviewTree(...)path ran against the actual public OpenClaw head70842b03a5aa392ede6a0a14e7e1b758a499a5d3, using the real GitHub CLI/API and Git transport. The standalone command wasnode live-proof.mjsafterpnpm run build; the harness called the production owner and runtime directly and compared the captured response to the complete pinned GitHub tree.The fixture had complete history and an explicitly chosen warm-base cache containing only blobs from
b30ff87b771b694e67ab7ba4c860386ac18db708. This follows the hosted sequence of preparing a base checkout before private PR materialization; the seed is pinned rather than an assertion about current-main cache contents. Twelve changed-head objects were genuinely missing. The trace was:{ "sourceSha256": "bb11b8544fc2138aaada0adf083e1038952b6d11edebadb1212d185d1c9253ec", "missingBlobsBefore": 12, "metadataRequests": 1, "metadataBytes": 3258092, "metadataEntries": 42225, "allTypeShaSizeAndTruncatedFactsPreserved": true, "materializedHead": "70842b03a5aa392ede6a0a14e7e1b758a499a5d3", "cleanWorkingTree": true, "trackedFiles": 40292, "durationMs": 15581 }The original full response was 10,686,262 bytes,
truncated=false, with valid metadata for all 40,292 blobs. Its captured replay fails withENOBUFSat the unchanged 8 MiB limit. The fixed real request captured 3,258,092 bytes and completed the exact-head checkout. No model, target code, Gateway, or publication operation ran during this proof. Earlier shallow-history and wholly cold bare-cache fixtures hit unchanged setup/fetch deadlines; those failures were retained, and this is not a claim of cold-cache checkout success. The real tree payload is not committed.