Repository navigation
Conversation
Reuse resident history in partial-clone comparisons and managed ref-tip repair. Keep local availability probes offline and preserve bounded recovery for missing ancestors. Native regressions cover negotiated acquisition, offline contracts, and both repair transports.
|
🦞👀 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 Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR negotiates missing Git commits before reading their trees while keeping local availability checks offline. Example: Repair a missing commit in an unshallowed blobless clone containing 80,000 commits.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it addresses remaining history-download amplification on current main, and no actionable patch defect was found; CI still needs resolution. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherRepository comparison scripts resolve revisions before inspecting trees, while managed worktree and project-refresh owners repair missing objects through their existing Git transports. flowchart TD
A[Comparison scripts] --> B[Git revision owner]
B --> C[Local commit probe]
C --> D[Negotiated origin fetch]
E[Managed project refresh] --> F[Missing object repair]
F --> D
F --> G[Bounded corruption fallback]
D --> H[Resident Git object store]
G --> H
Technical reviewBest possible solution: Use the existing revision and repair owners for negotiated acquisition, preserving offline probes and bounded corrupt-ancestry recovery. Do we have a high-confidence way to reproduce the issue? Current-main source exposes the unnegotiated acquisition paths, and the PR supplies native before/after production-owner measurements and regression results; this read-only review ran no target code. Is this the best way to solve the issue? The patch addresses acquisition before tree reads, removes the old private resolver, and reuses existing repair inventory without adding a cache or competing owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 41b677a0131f. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +11, Tests +155, Docs +9, Other +158. Total +333 across 25 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 10, 2026, 6:12 AM ET / 11:12 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…6618) Reuse resident history in partial-clone comparisons and managed ref-tip repair. Keep local availability probes offline and preserve bounded recovery for missing ancestors. Native regressions cover negotiated acquisition, offline contracts, and both repair transports.
Backport of 0ebc9d5. Release adaptation: only resident-tip negotiation and availability retry in repair owner plus its worktree/project regression. Exclude CI, release, installer and performance changes. Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 47ed5b471cf71f9b37c60c12a67c058b586d120c)
What Problem This Solves
Fixes repeated full-history downloads when repository tools or managed repair acquire missing Git commits in full-history partial clones. Related: #194577.
User Impact
Missing commit acquisition reuses resident history before comparisons or checkout read trees. Local-only readiness probes preserve their existing failure/delegation contracts. Recovery from corrupt ancestry remains supported. No configuration, cache, schema, or migration is added.
Why This Change Was Made
Git's native promisor lazy fetch does not negotiate common history, so requesting a missing commit can download its complete reachable commit/tree closure. Comparison tools now share negotiated acquisition through the existing Git revision owner. Installer and evidence helpers reach their explicit fetches; local-only probes stay offline.
Managed repair uses a physically present commit from its existing inventory, including inside temporary metadata without refs. It checks only the requested missing IDs afterward and retains one unnegotiated fallback when incomplete ancestry prevents repair. Cancellation, timeout, uncertain cleanup, and authority failures remain terminal.
The
scripts/prcheckout and hosted-CI owners already received this fix in #194577 and remain unchanged. CI'sensure-base-commitdeliberately uses depth/deepen recovery, which would be inappropriate for shared full-history worktrees. Existing frozen-tooling inventories already include the shared revision module; no parallel helper or inventory was introduced.Evidence
Native regressions fail before the fixes and pass afterward. All 22 repair tests, 255 installer/evidence tests, 202 acquisition-consumer tests, and 14 selected local-probe tests passed (counts overlap). The existing PR checkout regression also passes. Independent review identified the missing-ancestor case; its native regression now verifies the retained fallback. No simulator run is claimed for the one-line iOS Git change.
Five interleaved pairs exercise actual project refresh/repair on an explicitly unshallowed blobless fixture with 80,000 commits and 560,000 trees:
Five A/A pairs show 0.019% wall drift. JS thread CPU median changes 53.84→54.60 ms; observed p95 changes 54.89→65.57 ms. The extra command verifies only requested IDs to preserve corruption recovery. Native CPU includes the local server; RSS is not cumulative native allocation.
The committed raw-restore workload separately proves 640,009 objects / 34,737,773 bytes → 9 objects / 530 bytes when a negotiated commit fetch precedes restore. Packet traces show the subsequent restore wants only a blob. An isolated single-pair check on actual OpenClaw history confirms 1,014,940 objects / 291,582,168 bytes → 28 objects / 205,372 bytes. These local macOS fixtures establish the mechanism and owner costs, not WAN, database, btrfs, or whole-Gateway latency.
Production growth is 50 lines: one shared acquisition owner replaces the old private resolver, remaining entry points use it, and bounded verification preserves corrupt-ancestry repair. The 148 ratcheted regression lines plus 7 installer-fixture lines prove native negotiation and local-only contracts; the shared scalar remains unchanged. Benchmarks extend existing workloads.
Final combined independent Codex review is clean through P2. Changed-check formatting, typechecks, script/core lint, and other guards pass; the final check retains inherited export findings and two extension test max-lines failures. Both line-limit errors reproduce on exact parent
d553516036b6a44707c51f86a7c3922e2dd52b3c: Crabbox 1062 lines and Tlon 1024 lines. Threshold-crossing commits aredbcbb79c5c96e(#188802, 937→1010; #188981 later raises it to 1062) and5b46d3b7dde8(#177536, 795→1028; #189510 later reduces it to 1024). Before/after introducing-commit source replay passes/fails the unchanged 1000-line rule respectively. These remain main regressions for follow-up, not passing checks. The unused-export failure reproduces identically on exact parentd553516036b6a44707c51f86a7c3922e2dd52b3c(34 production / 13 full-tree findings). These are main checker regressions; causal groups include #192552, #196207, #196252, #191326, #139911, #190205, #132716, #129184, #190544, #191513, #196472, anda7436c8b4a93b. Five sidebar exports remain live through computed consumers and need Knip projection repair, not blind deletion. No changed owner is among the findings.Exact-head CI run 42803057639 completed with one failing test:
sessions.create fences clone Git effects when its identity is allowedat the authorization assertion inserver.sessions.create.clone-identity.e2e.test.ts:176. The same case fails on exact main parentd553516036b6a44707c51f86a7c3922e2dd52b3cusing its own built runtime (1 failed / 5 skipped; 58.39 seconds). #196206 (97e91a16d636c) introduced default managed-worktree preparation after authenticated clone without carrying the selected project credential into the default-base remote probe. Those owners and the test are identical at CI's main parentc6fc5bd784b5b; the missing-object repair path is not reached by this healthy clone. This is a newly identified main regression requiring follow-up. The CI aggregate retains its failure; all other primary CI jobs passed or were intentionally skipped.Separate CodeQL/security and precise-scan workflows hit GitHub installation API limits during setup/upload. Only their failed jobs were retried after diagnosing those logs; both attempt 2 runs passed. ClawSweeper reviewed final head
300cb03df826772fe122db56e1492a41d2261030with zero findings and zero open items (review). Native pinned admin admission landed this exact head as0ebc9d5ccd9c7b240356ba276f613e348057c3b7with the documented inherited-only test exception; failed CI remains recorded as failed (completion receipt).