Repository navigation
Conversation
Object-only refetches spend time abbreviating requested object names for an unused summary after indexing. Run hydration quietly while preserving repair support and the existing object, authority, and cancellation contracts. Add a reproducible fragmented-clone owner benchmark; stale-batch deduplication remains separate.
|
🦞👀 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. What this changesThis PR makes workspace object hydration fetch quietly while preserving automatic fetch repair. Example: Preparing a fragmented partial clone requires fetching 58,523 objects.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it removes a source-verified Git bottleneck with a focused production change and no identified correctness defects; the author explicitly keeps it in draft. Priority: P2 Before mergeNone. FindingsNone. Provenance
Tests
Agent review detailsHow this fits togetherManaged workspace sizing and snapshot preparation share the object hydrator, which passes missing object IDs to the existing Git execution and repair owners. flowchart TD
A[Workspace preparation] --> C[Shared object hydrator]
B[Snapshot preparation] --> C
C --> D[Git execution and repair]
D --> E[Promisor remote]
E --> F[Local checkout objects]
Technical reviewBest possible solution: Retain quiet fetching in the shared hydrator and its existing repair parser, then complete the declared performance acceptance campaign. Do we have a high-confidence way to reproduce the issue? Current main invokes the native Git path that computes unused abbreviations, and the body reports matching exploratory measurements; this read-only review did not execute a reproduction. Is this the best way to solve the issue? The patch removes the unnecessary work at the shared owner and preserves repair eligibility; the measurement tooling extends existing fixtures without introducing production state or a competing implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e04e7ee3226f. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource 0, Tests 0, Other +176. Total +176 across 5 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. LabelsLabel 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 11, 2026, 1:40 AM ET / 06:40 UTC. |
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. |
|
Merged via squash.
|
Object-only refetches spend time abbreviating requested object names for an unused summary after indexing. Run hydration quietly while preserving repair support and the existing object, authority, and cancellation contracts. Add a reproducible fragmented-clone owner benchmark; stale-batch deduplication remains separate.
What Problem This Solves
Fixes an avoidable pause after Git finishes downloading the objects needed to prepare a workspace in a fragmented partial clone.
User Impact
Workspace preparation skips unused fetch-summary work. Object selection, checkout completeness, fetch repair, cancellation, and promisor behavior are unchanged.
Why This Change Was Made
Git computes unique object-name abbreviations for its fetch summary even for an object-only fetch that ultimately prints no useful summary. With tens of thousands of requested objects and many pack indexes, this can dominate the fetch after indexing finishes. Run explicit hydration with
--quiet, and admit that flag through the existing repair parser. Production LOC delta: 0; no new cache, configuration option, background task, or schema.This change does not deduplicate stale missing-object inventories. Default-base preparation already shares pending requests; lower-level stale-batch replays can still transfer the same objects. It also does not establish the cause of a particular production network stall.
Evidence
Acceptance rule, recorded before the controlled owner campaign: use the actual
hydrateCommitObjectsowner with native Git and a local synthetic remote; 62,000 target paths, approximately 1.14 GB logical baseline, 600,000 historical blobs, 13,000 session refs and 1,503 packs. Compare 85- and 58,523-OID batches, including immediate identical replays. Run five counterbalanced A/B pairs and five A/A pairs per shape, serially. Require identical requested/transferred objects and bytes, reduced large-batch wall/native CPU, and no unexplained >20% owner regression. Report JS CPU/exact V8 allocation separately from native Git CPU/RSS. Fixture setup, imports and copying are excluded.Exploratory native diagnostic: 58,523-object fetch 26.071 → 7.406 s, immediate identical replay 21.119 → 3.946 s, with the same transfers. Trace2 places about 18 seconds of the original fetch after transfer and ref consumption. These are diagnostic samples, not the final acceptance distribution.
Focused owner tests: 105 passed across capacity, base-ref, git-fetch and relevant snapshot/removal cases. The new repair case fails on the parent with exit 128, and passes with quiet-fetch repair support. Test lines are unchanged. No Control UI imports of the changed production modules were found. Codex autoreview is scoped-clean through P2.
Controlled campaign completed: five counterbalanced A/B pairs and five A/A pairs per shape. Each sample performs initial hydration plus an identical stale-inventory replay. Values below are median / p95 (five samples, so p95 is the maximum); CPU and allocation cover the pair. Native CPU includes the local Git server.
All samples transferred identical object counts and bytes: small 170 objects / 53,778,672 bytes per pair; large 117,046 objects / 4,887,822 bytes. Both versions perform two fetches. Small peak native RSS increased 5.6% at the median / 11.7% at p95; large RSS and V8 allocation stayed approximately flat. The acceptance threshold passed. This is a large-batch CPU improvement, not proof of production network latency.
Reproduce on macOS with Git 2.56 and Node 26: save the parent's
src/agents/worktrees/object-hydration.ts, runpython3 scripts/perf/worktree-hydration-refetch-measure.py --prepare <fixture>, then--measure <fixture> --output <results> --base-file <saved-owner> --pairs 5. Raw timings, native CPU/RSS receipts and Trace2 transfers are emitted per sample.pnpm check:changedfailed only the unused-export check: the exact parent84a72ed32320a44ac161e1e0be4f858d44861b3creproduces the identical 56 production / 31 full-tree / 0 script findings. All other changed-file guards, types, lint and format passed. The separate standalone-command unused-file check reports zero production findings and three identical parent findings. Newly identified main regressions: knowledge exports (#196767,9b7dcdc7a66dc), rebind/tunnel exports (#196388,5f2f21a7ee19), sidebar export (#196456,65c2e61b164e), and missing Knip entrypoint registration (#196685,8743f1bfafa4; #196501,09723cdcad18). These aggregate checks are not claimed green.Local file://, macOS/APFS proof does not reproduce production network latency, btrfs, or a large agent database; the measured Git phase does not read that database.