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: needs maintainer review before merge. What this changesThe branch disables automatic Git maintenance in owned local agent, worker, and Codex shells while preserving existing Git parameters and environment filtering. Example: An agent fetches a missing partial-clone blob
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR remains useful on current main and resolves the earlier Git-parameter preservation finding. No remaining actionable patch defect was identified. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherOpenClaw prepares command environments and passes them to local execution adapters. Those adapters combine operator settings with host policy before launching agent commands or native Codex shells. flowchart TD
A[Agent command] --> B[Prepared execution environment]
B --> C{Owned local execution?}
C -->|Yes| D[Append maintenance settings]
C -->|No| E[Existing transport environment]
D --> F[Git or native Codex shell]
F --> G[Fetch without automatic maintenance]
Technical reviewBest possible solution: Keep maintenance policy in the prepared execution owner and compose it at owned local boundaries, with managed-repository upkeep remaining under the existing cleanup owner. Do we have a high-confidence way to reproduce the issue? Yes: the real filtered-clone fixture provides a concrete path, and the contributor reports its intended failure on original production source. This read-only review did not rerun it. Is this the best way to solve the issue? Yes: composing the policy at existing execution boundaries covers existing worktrees without repository edits or a competing maintenance scheduler. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7e80556f503d. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +149, Tests +334, Docs +8. Total +491 across 28 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
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 HistoryReview history (4 earlier review cycles)
Reviewed October 8, 2026, 7:25 PM ET / 23:25 UTC (Revision 5). |
Pull request was converted to draft
Compose the host maintenance policy at owned local execution boundaries, preserving existing Git parameters and native environment filtering without promoting inherited credentials into request or thread configuration. Share the policy with worker identity preparation and cover real partial-clone fetches, worker Git configuration, and native fresh/resumed shell execution.
|
The Git-parameter preservation finding is fixed in e578bf2. The host now supplies an append fragment, and each owned local execution adapter composes it after applying its existing environment policy. Native author/transport values, explicit empty values, clear-env rules, and include/exclude ordering are preserved. Inherited parameters stay private to the process rather than being serialized into thread configuration. Configured workers now receive the same policy as unconfigured workers. The regression fails on the earlier source and passes on the correction. Real partial-clone fetching still changes automatic-maintenance children from 1 to 0. Final correction proof includes 76 core/worker tests, 67 Codex tests (including four actual native fresh/resume scenarios), 53 authenticated GitHub RPC tests, 38 Docker/Podman fixture tests, 20 closure tests, a full build, all production/extension types, all 27 core test type graphs, remaining lint/structural guards, and a fresh independent review clean through P2. The full changed gate retains its documented inherited Knip failure on the unchanged ClientVoiceToolEffect export; it is not reported as green. |
| GIT_CONFIG_PARAMETERS: fixture.parameters, | ||
| OPENCLAW_GIT_ENV_DROP: "fixture", | ||
| }, | ||
| clearEnv: ["OPENCLAW_GIT_ENV_DROP", ...(fixture.clear ? ["GIT_CONFIG_PARAMETERS"] : [])], |
| clearEnv: options.clearEnv.filter( | ||
| (name) => | ||
| (process.platform === "win32" ? name.trim().toUpperCase() : name.trim()) !== | ||
| "GIT_CONFIG_PARAMETERS", |
| params.host === "gateway" && params.localGitConfigParameters | ||
| ? { | ||
| GIT_CONFIG_PARAMETERS: [ | ||
| resolveEnvironmentValue(preparedEnv, "GIT_CONFIG_PARAMETERS") ?? |
| ? { | ||
| GIT_CONFIG_PARAMETERS: [ | ||
| resolveEnvironmentValue(preparedEnv, "GIT_CONFIG_PARAMETERS") ?? | ||
| resolveEnvironmentValue(env, "GIT_CONFIG_PARAMETERS"), |
Pull request was converted to draft
Admit the initialization turn through the same production environment owner as the action turn, with separate closed run authorities. This keeps the preserved native thread on one writer-owned process when Git defaults are prepared, without changing writer locks or process-cache identity.
|
Fixed the CI failure in 75a0645. The settled-turn fixture initialized its native thread with a lightweight host, then switched to production capabilities for the action turn. The new prepared Git policy changed the process key at that transition, so the preserve-native-model case tried to resume a thread still owned by the first process. Both turns now use separate production host admissions with consistent process policy; writer ownership and production code are unchanged. This was attributable to the PR, not an inherited failure: the unchanged CI main baseline passed all nine native tests, while the prior PR head reproduced the exact active-writer error in isolation. The corrected native and adjacent unit suites passed 31 tests in 94.43 s. The required single-worker native run passed all nine tests in 81.53 s; focused extension-test types and lint passed, and fresh independent review is clean through P2. The only local changed-gate failure remains the separately documented, baseline-reproduced Knip export. The prior CI run otherwise had no failed test jobs or cancellations. |
…7443) * perf(git): prevent agent-triggered automatic maintenance * fix(git): preserve agent shell settings while disabling maintenance Compose the host maintenance policy at owned local execution boundaries, preserving existing Git parameters and native environment filtering without promoting inherited credentials into request or thread configuration. Share the policy with worker identity preparation and cover real partial-clone fetches, worker Git configuration, and native fresh/resumed shell execution. * test(codex): keep settled-turn fixture on production host policy Admit the initialization turn through the same production environment owner as the action turn, with separate closed run authorities. This keeps the preserved native thread on one writer-owned process when Git defaults are prepared, without changing writer locks or process-cache identity.
…7443)" This reverts commit 9284c76 on the release branch. It adds GIT_CONFIG_PARAMETERS to the Codex app-server environment only on the turn path, and the shared-client cache key hashes that environment, so /codex resume, fork preparation and catalog continuation acquire a second app-server for the same thread and Codex rejects it ("thread ... already has an active writer"). Native live gateway backends and the Docker live Codex lanes failed deterministically on every 2026.10.5 candidate and on main since 2026-10-09, while 2026.10.4 passed them with the same Codex pin. Restores the 2026.10.4 behavior; the main fix is to keep the variable out of the cache key or apply it to every acquisition path.
The precise host-env rule matches a removal list nested in a test object. Scope the exception to that unchanged fixture line; keep the rule, inputs, assertions, and production behavior unchanged. Reproduced with OpenGrep 1.32.0 on the exact base and introducing commit 9284c76 (#167443); the candidate scan passes.
The precise host-env rule matches a removal list nested in a test object. Scope the exception to that unchanged fixture line; keep the rule, inputs, assertions, and production behavior unchanged. Reproduced with OpenGrep 1.32.0 on the exact base and introducing commit 9284c76 (#167443); the candidate scan passes.
* fix(codex): avoid Gateway freezes during app-server launch Run native app-server spawn and bounded stdio forwarding in a tracked worker while preserving direct-parent registration and containment. Keep shared-client reuse and catalog refresh policy unchanged. Prove the blocked-spawn regression red on the original transport and green with the worker; verify the public Gateway catalog and concurrent health RPCs. Record the resource tradeoff and inherited line-cap failures in the PR. * test(codex): document Git env removal scanner fixture The precise host-env rule matches a removal list nested in a test object. Scope the exception to that unchanged fixture line; keep the rule, inputs, assertions, and production behavior unchanged. Reproduced with OpenGrep 1.32.0 on the exact base and introducing commit 9284c76 (#167443); the candidate scan passes. * test(codex): account for worker lifecycle regressions Allocate exactly the 166 net regression-test lines for blocked-spawn responsiveness, launch authority after worker startup, and native kill with caller stdin open. Keep the shared scalar unchanged and prune only the retired transport-spawn mock baseline entry. Both focused ratchets and Codex autoreview pass. * refactor(codex): let the stdio worker own pipe selection * fix(codex): report worker failure once and repair UI test consumers Preserve null native exit facts after worker startup errors, with a real-worker red/green regression. Allocate exactly 34 additional test lines for this distinct lifecycle failure. Disambiguate inline rename errors from toast alerts and use the existing trusted-pointer widget helper without weakening outcome assertions. * test(ui): settle denied handshake before stopping the clock Keep pumping the virtual clock until the login gate is visible with exactly one connect attempt. The mock records requests before delivering queued responses; a delayed-response diagnostic reproduces the old deadlock. Preserve denial, retry pacing, and explicit reconnect assertions.
…192543) * fix(codex): avoid Gateway freezes during app-server launch Run native app-server spawn and bounded stdio forwarding in a tracked worker while preserving direct-parent registration and containment. Keep shared-client reuse and catalog refresh policy unchanged. Prove the blocked-spawn regression red on the original transport and green with the worker; verify the public Gateway catalog and concurrent health RPCs. Record the resource tradeoff and inherited line-cap failures in the PR. * test(codex): document Git env removal scanner fixture The precise host-env rule matches a removal list nested in a test object. Scope the exception to that unchanged fixture line; keep the rule, inputs, assertions, and production behavior unchanged. Reproduced with OpenGrep 1.32.0 on the exact base and introducing commit c5bd4bd (openclaw#167443); the candidate scan passes. * test(codex): account for worker lifecycle regressions Allocate exactly the 166 net regression-test lines for blocked-spawn responsiveness, launch authority after worker startup, and native kill with caller stdin open. Keep the shared scalar unchanged and prune only the retired transport-spawn mock baseline entry. Both focused ratchets and Codex autoreview pass. * refactor(codex): let the stdio worker own pipe selection * fix(codex): report worker failure once and repair UI test consumers Preserve null native exit facts after worker startup errors, with a real-worker red/green regression. Allocate exactly 34 additional test lines for this distinct lifecycle failure. Disambiguate inline rename errors from toast alerts and use the existing trusted-pointer widget helper without weakening outcome assertions. * test(ui): settle denied handshake before stopping the clock Keep pumping the virtual clock until the login gate is visible with exactly one connect attempt. The mock records requests before delivering queued responses; a delayed-response diagnostic reproduces the old deadlock. Preserve denial, retry pacing, and explicit reconnect assertions.
* fix(codex): avoid Gateway freezes during app-server launch Run native app-server spawn and bounded stdio forwarding in a tracked worker while preserving direct-parent registration and containment. Keep shared-client reuse and catalog refresh policy unchanged. Prove the blocked-spawn regression red on the original transport and green with the worker; verify the public Gateway catalog and concurrent health RPCs. Record the resource tradeoff and inherited line-cap failures in the PR. * test(codex): document Git env removal scanner fixture The precise host-env rule matches a removal list nested in a test object. Scope the exception to that unchanged fixture line; keep the rule, inputs, assertions, and production behavior unchanged. Reproduced with OpenGrep 1.32.0 on the exact base and introducing commit 9284c76 (#167443); the candidate scan passes. * test(codex): account for worker lifecycle regressions Allocate exactly the 166 net regression-test lines for blocked-spawn responsiveness, launch authority after worker startup, and native kill with caller stdin open. Keep the shared scalar unchanged and prune only the retired transport-spawn mock baseline entry. Both focused ratchets and Codex autoreview pass. * refactor(codex): let the stdio worker own pipe selection * fix(codex): report worker failure once and repair UI test consumers Preserve null native exit facts after worker startup errors, with a real-worker red/green regression. Allocate exactly 34 additional test lines for this distinct lifecycle failure. Disambiguate inline rename errors from toast alerts and use the existing trusted-pointer widget helper without weakening outcome assertions. * test(ui): settle denied handshake before stopping the clock Keep pumping the virtual clock until the login gate is visible with exactly one connect attempt. The mock records requests before delivering queued responses; a delayed-response diagnostic reproduces the old deadlock. Preserve denial, retry pacing, and explicit reconnect assertions. Backport to 2026.11.6: retain existing node exec-server framing; omit unrelated UI/performance edits and future cloud app-server callers absent from this branch. Regenerate runtime entrypoint assets without changing dependency pins. Source-commit: 649dbeb Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
Plain agent-run Git commands can start automatic maintenance in shared partial clones. A fetch can enter reflog traversal, lazily fetch more missing objects, and recursively start maintenance again, tying up the repository and leaving aborted pack files.
User Impact
OpenClaw-owned local agent shells, worker-local exec, and owned local Codex app-server shells disable automatic Git maintenance and legacy auto-GC. The policy applies on the next run in existing worktrees without changing repository configuration. Explicit maintenance remains available, and the Gateway cleanup owner remains the managed-repository maintenance owner. Sandboxes, node transports, proxy/remote-root connections, and externally started peers retain their environment owners.
Why This Change Was Made
The prepared execution-environment owner supplies one append fragment, composed at each owned local execution boundary. Existing author and transport parameters survive; inherited values stay in the private child environment, never promoted into tool-request overrides or persisted native-thread configuration. The Codex adapter preserves explicit native values, clear-env behavior, inheritance and include/exclude ordering, fresh/resumed threads, and MCP app-session preparation. The same constant covers configured and unconfigured worker identities.
Clone provisioning would miss existing worktrees, while the generic spawn broker should not own repository policy. No repository-config edits, schema changes, new cache, scheduler, or user option are introduced. The pure identity builder moves to a narrow module with all callers migrated and no compatibility re-export.
Production LOC: +197/−48, net +149. Growth is necessary to preserve the existing native shell-environment contract and credential boundary while carrying the policy through owned process/thread lifecycles; a constant replacement would discard operator-authored Git settings. The original replacement implementation has been removed.
Evidence
The real filtered-clone/linked-worktree fixture observes 1 automatic-maintenance child before → 0 after, with blob contents and repository config bytes preserved. This is a process-spawn regression, not a production throughput benchmark.
Initial proof used Blacksmith Testbox (
blacksmith-testbox), leasetbx_01m4ef46d25sr7p0s6jk5mbk5z(stopped): the regression failed on original production source at the maintenance trace assertion; 183 relevant tests, production types, and all 27 test type graphs passed. The changed gate stopped on inherited Knip exportsrc/talk/client-voice-session-store.ts: ClientVoiceToolEffect; restoring the complete patch to unchanged base6070074dabf6b45f74d4039590cd307640317862reproduced it. These results describe the initial candidate only.Correction validation uses the authorized Linux rig fallback after Testbox
tbx_01m4em90s2b1wsn2m1qs73v5g6queued without a runner and both AWS and Hetzner admission returned fleet capacity HTTP 429. The queued Testbox was stopped; no direct-provider lease was created. The isolated Linux rig uses Node 26; commands run withnice -n 10 ionice -c3and task-ownedTMPDIR.The parameter-preservation regression fails on the first pushed head, then passes on the correction: inherited author and HTTP transport options survive and automatic-maintenance children remain zero. Final correction regression test body: 239 ms. Remote validation also exposed an existing fixture portability bug: extensionless Docker/Podman fake CLIs used CommonJS inside an ESM temp directory. A fixture-local CommonJS package marker fixes the actual cause; all 38 Docker/Podman tests passed afterward.
Final correction proof:
maintenance.autoandgc.autoare absent, then passes after using the shared policy constant. Seven core/worker sibling files: 76 tests passed in 90.32 s.appServer.envfields never reached typed process options; moving those cases to the real supported boundary fixed the proof without changing production.pnpm buildpassed in 6m 11.6s, including core/package declarations, bundled plugin artifacts, CLI bootstrap and SDK export validation. It emitted a non-fatal startup-JS size warning for unchanged UI assets (365.2 KiB versus 364.7 KiB target).node scripts/check-changed.mjs --staged: exit 1 only on the same inheritedClientVoiceToolEffectKnip export. Production types, all 27 core test graphs (1871.84 s), extension types (84.75 s), extension test types (135.99 s), and the preceding guards passed. Every remaining planned lint/structural check passed separately; the affected authenticated GitHub RPC suite passed 53 tests in 73.05 s. Final exact-head CI run37860039581 passed with 50 successful jobs and no failures on75a0645b79b180671e249c2341004b37b08d99a2; merged as9284c76dea58496d0c02c925fa72f7aafad78ad0. The last lint batch caught two lexical/style issues in the new transport helper; renaming the shadowed callback variable and sorting the fresh key array withtoSorted()resolved them. Earlier behavior/type/build proof remains applicable; the final source received a fresh scoped-clean review after these changes.CI on
e578bf2132fbdde49b8d64fe46c9049bdc3be655exposed one attributable native-fixture failure: initialization used a lightweight host, then the action turn switched to production host capabilities. Adding the Git policy at that transition selected a second process while the first retained the thread writer. The unchanged CI main baseline114d443b2f8e6d7459491b627f363a8a2a631f22passed all nine tests; the published candidate reproduced the exactthread/resumeactive-writer error in isolation. This failure is not classified as inherited. The fixture now uses separate production host admissions for both turns, closes initial authority after settlement, and preserves all writer/cache contracts. The corrected native and adjacent unit suites passed 31 tests in 94.43 s, including the failing case in 1569 ms. Its focused changed-file gate passed extension-test types and all preceding checks, stopping only on the same unrelated Knip export; final changed-file lint passed.pnpm test extensions/codex/src/app-server/settled-turn-finalizer.native.test.ts --maxWorkers=1passed all nine cases in 81.53 s wall time (79.11 s Vitest time); this is measured remote test cost, not a claimed production latency change. Fresh independent review after the fixture correction is scoped-clean through P2.Final remote commands
The first command verifies the negative control and then the complete sibling command verifies the candidate. Test wall times include wrapper preparation; these are the reproducible CI test costs, not a claimed production latency improvement.
No live Gateway, production data, or production repository configuration was changed. No production load benchmark or native Windows execution was performed.
Final staged gate timing summary (isolated Linux rig)
The full gate remains inherited red; these timings do not relabel it green.
At merge, ClawSweeper’s latest clean maintainer-review verdict covered
e578bf2132fbdde49b8d64fe46c9049bdc3be655; production code was unchanged afterward. The final test-only commit received a fresh full-candidate independent review through P2, while its ClawSweeper refresh had not yet published.