Repository navigation
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 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 prepares initial PR source payloads while the sandbox guest runs and verifies them before applying files. Example: Prepare an existing PR in a managed workspace containing 62,000 files and 1,100,004,000 bytes.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR addresses remaining initial-import freezes on main, reuses the existing staging owner, and introduces no concrete defect found in this review. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Gateway's GitHub preparation action receives a verified PR source, stages admitted source bytes through the workspace owner, and applies them to canonical and sandbox files while preserving guest Git state. flowchart TD
A[Verified PR source] --> B[Live guest source preparation]
B --> C[Existing staged payload owner]
C --> D[Reacquire workspace custody]
D --> E[Check guest state and payload identity]
E --> F[Apply and settle workspace transfer]
F --> G[Prepare sandbox review base]
Technical reviewBest possible solution: Keep immutable initial-source staging in the existing preparation owner while retaining pristine-workspace checks and the existing transfer recovery contract. Do we have a high-confidence way to reproduce the issue? Current main visibly performs immutable checkout, manifest, and staging work inside the paused integration callback; the PR also reports native attribution and a base-failing staging regression, but this read-only review ran no target code. Is this the best way to solve the issue? The patch follows the smallest complete fix: move immutable initial-import work into the existing live phase, reuse its staging implementation, and verify retained identities before applying files. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f19f6c02b97c. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +71, Tests +48, Docs +2, Other +90. Total +211 across 6 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:
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, 12:40 PM ET / 17:40 UTC. |
|
Closing per maintainer decision. On the 31k-file A/A + ABBA fixture, median frozen time did not improve (31.080→31.377 s), while process CPU increased 47.025→80.246 s. Consistency checks passed, but the measured benefit does not justify landing this change. The failed comparisons and diagnostics remain documented in the PR. |
Related: #197243
What Problem This Solves
Fixes long sandbox freezes when initially preparing an existing PR in a managed workspace, even after source downloads finish.
User Impact
The guest keeps running while OpenClaw prepares the initial PR's immutable source checkouts, manifests, and staged file payload. Pristine-workspace checks, file application, and interrupted-transfer recovery still pause the guest. Refreshes that merge existing guest work retain their current consistency contract. No configuration or migration is required.
A universal freeze deadline remains deliberately deferred: completing or undoing a partially applied transfer must preserve the existing recovery contract.
Why This Change Was Made
The initial import already knows both immutable source commits. Prepare their admitted payload in the existing live-guest source phase, then freshly observe the guest and verify the host identity, staged Git object, and accepted baseline before applying it. The staged object and baseline checks protect the real custody gap required by guest command admission. Working files and PR acceptance remain untouched during preparation.
Reuse the staging implementation for later merge-based refreshes and remove an initial-import index snapshot whose result was only consumed by noninitial refreshes. No new state store, cache, schema, dependency, or runtime configuration is introduced.
Evidence and current landing status
Held: the performance acceptance gate is not met. The source remains at
fad34886eeeee5e90ae5d4b557a54efde64e8407; no merge request is pending. Correctness, static review and exact-head CI pass, but moving preparation outside the pause has not yet produced a qualified total-frozen reduction on the measured shared host.The prospective contract requires two native local Docker fixture sizes (31,000 files / 550,002,000 bytes and 62,000 files / 1,100,004,000 bytes), each fetching 512 MiB of historical Git objects. At each size: A/A controls then ABBA, identical contents/HEAD/index/resume, both candidate frozen durations below both baselines, and median reduction approximately explained by moved preparation plus the removed snapshot within the larger of 25% of moved work or A/A spread. All outcomes are retained. This qualifies APFS/native Docker only, not btrfs or a 35 GiB agent database.
The completed 31k cohort fails that rule:
ABBA median frozen time changed 31.080→31.377 s, despite 11.999 s of expected moved preparation/deleted snapshot work. Median process CPU increased 47.025→80.246 s (+70.6%). All six arms passed contents, HEAD, canonical index, live fetch and resume checks. Candidate immutable preparation had zero frozen overlap and host snapshots dropped three→two. Base-refresh hashed exactly 62,020 files / 1,100,004,493 bytes in every arm; total counters varied only by existing short-path age memo reuse, with no added full-tree pass.
A separately declared quiet replication admitted each arm only below load 12. Its A1 measured 32.064 s frozen / 46.369 s CPU; B1 measured 90.874 s frozen / 132.958 s CPU. Load rose from about 10 to 40 during B1, so quiet admission did not maintain comparable conditions. All correctness checks passed. B2/A2 and the larger-size acceptance block were held, not silently retried or pooled.
A diagnostic-only A/B pair then instrumented existing worker execution and full idle GC without changing GC policy. It measured A 32.628 s frozen / 47.487 s CPU, B 33.219 s / 84.747 s. The increase was mostly system CPU (31.022→63.779 s), while user CPU rose 16.465→20.967 s. Explicit idle GC was only 25.842 ms total wall in A and 55.999 ms in B, ruling out those synchronous collections as the seconds-scale cause. CPU before moved preparation was nearly identical (4.494/4.540 s). Samples captured substantial activity outside the fixture process tree, including a separate compiler; this supports contention as a confounder but does not prove the complete CPU cause. A local native sampler stalled during symbolication and was terminated without usable stacks, so diagnostic B has unquantified capture overhead and is not acceptance proof. All temporary observer source was restored and hash-verified. No further benchmark is active.
The standard Blacksmith Testbox route returned a queued allocation, which was immediately stopped and verified completed; no remote payload ran. The timing gate remains two qualified fixture sizes. A quiet local window is needed before another declared cohort. No GC-policy or production change is justified by these diagnostics alone. Sampled allocation has not run; heap endpoints are not allocation evidence, process CPU excludes Git children, and worker/native allocation remains uncovered.
Completed validation:
3a6cc659because the guest is frozen, and passes with the candidate while preserving an index-only guest edit. A separate registered-action case rejects replacement of the shared staging ref across custody.ui/src.pnpm check:changed --base 3a6cc6597d1d1d32a4bef83fd3041fedf5f48e76 --timedpasses every gate except 57 production / 32 full-tree unused exports. Exact parent reproduces every finding; there are no candidate additions or newly appearing inherited failures. Introducers are below; no ignore/baseline was relaxed.fad34886, all 61 jobs complete. Final-head ClawSweeper has zero findings/open items. The earlier superseded run is not counted as approval.fad34886. Its separate newer-main manual MLX workflow called a script absent from both this target and exact parent, reproducing exit 2 before any MLX test. Introducer:42204208e993a4486d0414c36175f23137fc20c5/ fix(macos): preserve MLX model config cache reuse #187742. This is a main workflow compatibility regression, not test noise; normal PR CI verifies the newer combined context.Earlier evidence is retained separately: one 62k diagnostic attributed 31.427 s to immutable preparation within a 67.151 s consistency pause; unchanged full-size controls varied 63.91/135.88 s frozen and cannot support a comparison. Small native smoke passes with zero preparation overlap and three→two snapshots. Eight obsolete task-owned capsules were cleaned after preserving reconstructable overlays, recovering about 6.72 GiB. None of these observations substitutes for the unmet two-size gate.
Inherited main unused-export regressions
These are existing main regressions, not waived candidate failures. Exact-parent and candidate lists match. The earlier script finding was fixed by
b110c2259f07/ #197244.9b7dcdc7a66dc1bbcb0767b8109e798eb826954eb22f35f7ed76552778bc185cc65a6177e8ad8b02c7152f3bda8e52c24fc2fda83911e7e1c24fb0f2625945b7ae01d5eea91aba5285da1a327b2a5f9f80ba593b8b14bb3f5ddd6634a92805e04707b25c2c4e34a72f490c710bc155319fcabf872f482b3e5f2f21a7ee193fdd4aa8ac42a407eefc0490525537a3b162a0c58aaceb1634aaef726d0e178a529c56617cd00086481212d29745ed71f5feb8a40b9ef63e5cd0f6d38f1d0438978255d9e244183864c3cf1ae7bb6a729a7f13a28ca2ef9d6f108c00566f