Repository navigation
fix: backport native macOS process cleanup to 2026.10.10 - #182215
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. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Codex Review SummaryThis 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: stale review; fresh review needed. Summary Next step Review history (1 earlier review cycle)
|
|
@RomneyDa — final bounded-proof update for The original six commits preserve authorship. The minimal group is: process-only #174147 supplies the missing census owner (TS2307 without it); process/SDK/Codex #174284 supplies the Darwin adapter and four missing exports (TS2305 controls); #175368 replaces the Doctor/supervisor/Codex ps and Bun FFI census; #176576 retries post-kill observations within the existing deadline; #176612 pins proc-safe 0.4.2 and adds the real exit-window regression. The sixth commit removes a duplicate test helper exposed by lint. Unrelated prerequisites, lock-policy improvements and fs-safe changes are excluded. Plugin SDK: the approved The six original backport commits remain unchanged ancestors. The conflict-free release-tip merge includes Exact-head CI run 40072785179 completed FAILURE: 171 successful jobs, 21 skipped, two failed. Build Artifacts, production/test types, lint, dependency/static checks and selected Android checks pass. macOS/Windows runtime jobs were not selected; they are not platform passes. These are the terminal results of the exact-head build/test CI run. PR metadata automations triggered by handoff edits are separate from that proof. The formerly failing The pinned release baseline's CI run 40067188264 has 232 successes, 15 skips, and an unrelated real-Gateway UI failure plus aggregate. Its shard selection does not establish the Feishu outcomes. Feishu attribution: accepted by the coordinator as an existing timing-sensitive failure. No candidate-caused regression is established. An immediately granted AWS Linux lease replayed both exact trees with frozen installs, five rounds each of the streaming-card and app-registration failing cases, one file at a time with The entire Feishu subtree, HTTP cancellation owner and tests are byte-identical. The streaming eager import closure has no changed file. Registration does reach changed process modules through a media barrel, so “no changed module is reachable anywhere” would be false; these HTTP cases do not call the process operations and Darwin enumeration is platform-gated. The unchanged reader starts Local functional proof, macOS 27.0.1 arm64: the functional load gate was removed. Both resumed Three isolated real Focused Node / Bun 1.4.4 attempts (the first Node file used 26.12.1; subsequent launchers use release-supported Node 24.22.1) ran serially, one file and one worker each, without the load gate or retries: 2/5 completed command passes, 3 watchdogs, 0 other non-passing attempts; 23 remaining planned commands not completed. After three 900-second runner watchdogs across the native runtime pair and another focused configuration, local proof stopped at those existing limits. The next Bun census command had already started and was stopped before a verdict; the other 22 planned commands were not run. No incomplete command is counted as a pass. Detailed verdicts follow. Watchdogs and setup failures are not test passes.
Retained completed proof: frozen candidate/base installs; core production typecheck; 747 dependency specs across 203 manifests, nine patch guards and 105 npm lock mirrors. The final-head real fixture ( Five-process cold-import medians: Node 26.12.1 identity 14.503 ms / inspect 10.294 ms; Bun 1.4.4 identity 25.943 ms / inspect 13.296 ms. Final macOS capacity attempt: one AWS EC2 Release-owner handoff: @RomneyDa owns integration and landing. Source review is complete; the bounded local-proof outcome and all incomplete commands are recorded, and the exact-head CI cancellation red and the incomplete live Doctor/local proofs remain explicit above. This is not a green release qualification or permission to waive those gaps. The release owner decides integration and supplies the SDK acknowledgement, canonical release-branch |
Merge release/2026.10.10 at 8d18f82, including the Responses EOF fixture repair and release validation fixes. Preserve all six existing backport commits and their original authorship. Complete the imported Darwin tree contract when a requested root is an ancestor of the observer: traverse the observer before adding it as an unconditional result. Exercise the ancestor query in the existing real process fixture on the main thread and a Worker.
What Problem This Solves
Fixes
doctor --fixreporting a cleanup failure after successful repairs on macOS when the process-group census cannot complete through/bin/ps.Related: #180351. Approved backport target:
release/2026.10.10.User Impact
Doctor, supervisor cleanup, and Codex containment use the native Darwin census on both Node and Bun. The proc-safe 0.4.2 update also preserves an exiting descendant during the libproc/kernel observation race. Existing deadlines remain unchanged.
Plugin SDK migration: the approved Darwin process contract uses
DarwinProcess.owner("same" | "different" | "unknown") instead of the intermediate main API's numericuid. This release baseline had no Darwin inspection SDK exports, so it gains the final contract directly. Plugins using the intermediate API must migrate toowner; there is no compatibility alias.Why This Change Was Made
The ordered dependency group preserves the original commits' authorship and provenance:
6d50f72d970c86c02a97b20583e30b9487a48e4d).4959773fa7fb0db1cc1a36172ee278be32d25519).f236b1969015ce930bf01e5b6679af3ce9a26111).5f94dfbafe617f2528d2aadfd7d0b9a01fb54ccd).727c6073370789e331c2b8025eb128bf0ff28419).The release baseline lacks the shared Darwin owner and SDK exports. The first two scoped prerequisites supply those contracts; their independent Doctor diagnostics, runtime-pin migration, credential-detection, and onboarding changes are excluded. The temporary Bun FFI census in the prerequisite history is deleted by #175368. The final dependency change is only proc-safe 0.3.0 → 0.4.2; fs-safe remains 0.26.5. The root and all ten native packages retain exact-version release-age exemptions with the original expiry.
Compiler controls on the actual source slices report TS2307 without the earlier census owner and four TS2305 missing-export errors when the Codex consumer uses the baseline SDK barrel. The assembled candidate's production core typecheck passes.
#175118 and #178076 are recommended separate decisions, not included: Windows/Linux lock liveness and explicit lock recovery are independent of this Darwin census bundle. Later updater-environment, owner-exit cleanup, Linux parser, and monotonic-grace changes were likewise reviewed and excluded as independent baseline improvements.
Scoped backport ledger
Baseline:
6703272e086fbbae7b386ce5adf53f4959b278ea(2026.10.10-beta.4). Main scan end:8720a81fac398d9e8cd71d49427e1d6a6403d5e4. With no accepted cursor located, the scan starts at merge base459cad76530457e5c0a32bc21d4982920e9991e7.The inventory contains 7,190 main commits: 18 merges and 7,172 non-merge commits, of which 70 are patch-equivalent to the baseline and 7,102 are not. Selected process contracts and later same-owner companions were traced against the baseline. The original #175368 cannot apply independently because the owner module and its tests do not exist on this line; #174284 in turn depends on the earlier census owner. Conflicts were resolved within those contracts, fixtures, and exact dependency pins.
This is the approved bundle's dependency audit, not a whole-release clearance. Unrelated commits remain outside scope. Security reconciliation is pending with the release owner, and the stable-maturity query was truncated at 1,000 results. The existing release qualification harness and all gates remain unchanged; newer-main qualification optimizations are deliberately excluded.
Evidence
Head:
0a93ee3ddf6009588b1f584cc00fdb233ae97710; merged release tip:8d18f82dfcfce13bc782b85dc6444b4c47da1f86. The six original backport commits remain unchanged ancestors. The conflict-free release-tip merge includes6eff9d4dand fixes an imported observer-traversal omission found by independent review. Final autoreview is scoped-clean through P2; no product diff changed during this proof continuation. The observer-traversal fix has a main-line counterpart landing separately.Exact-head CI run 40072785179 completed FAILURE: 171 successful jobs, 21 skipped, two failed. Build Artifacts, production/test types, lint, dependency/static checks and selected Android checks pass. macOS/Windows runtime jobs were not selected; they are not platform passes. These are the terminal results of the exact-head build/test CI run. PR metadata automations triggered by handoff edits are separate from that proof.
The formerly failing
checks-node-changed-compact-small-4is green: all five Responses EOF cases pass on pinned Bun in 77–90 ms; the same job's Bun unit-fast group passes 19 files / 122 tests. The two remaining reds arechecks-node-changed-extensions-bundle-29-2(two streaming cancellation assertions, 579 passing tests including the previously failing registration case) and its derivativeopenclaw/ci-gate. Failed logs were fetched once; no rerun was requested to chase green.The pinned release baseline's CI run 40067188264 has 232 successes, 15 skips, and an unrelated real-Gateway UI failure plus aggregate. Its shard selection does not establish the Feishu outcomes.
Feishu attribution: accepted by the coordinator as an existing timing-sensitive failure. No candidate-caused regression is established. An immediately granted AWS Linux lease replayed both exact trees with frozen installs, five rounds each of the streaming-card and app-registration failing cases, one file at a time with
--maxWorkers=1: 20/20 commands and 30 targeted assertions passed. Neither tree reproduced a failure, so this is not a claim of observed flakes in both or of a repaired bug. Replay run; the lease is released.The entire Feishu subtree, HTTP cancellation owner and tests are byte-identical. The streaming eager import closure has no changed file. Registration does reach changed process modules through a media barrel, so “no changed module is reachable anywhere” would be false; these HTTP cases do not call the process operations and Darwin enumeration is platform-gated. The unchanged reader starts
reader.cancel()without awaiting it, while the streaming tests immediately assert server-side cancellation. Together with identical-Feishu candidate CI outcomes of 0/3/2 failures, this supports the timing attribution. No Feishu source, assertion, timeout or fallback was changed.Local functional proof, macOS 27.0.1 arm64: the functional load gate was removed. Both resumed
pnpm build cliStartupruns completed both compiler invocations, then reached the release workflow's 15-minute local-lane budget during external-plugin asset preparation. CI Build Artifacts remains the completed build proof. The release-maintainer skill routes to its validation reference, which says local proof is “bounded to 15 minutes per lane”; that limit was applied to local build preparation.Three isolated real
pnpm openclaw doctor --fix --non-interactive --yes --no-workspace-suggestionsattempts ran: natural-base: 45.572s, exit 124, slow-base: 45.086s, exit 124, slow-candidate: 45.293s, exit 124. All ended at the unchanged 45-second budget before Doctor completion, legacy approval migration, or a census event. The full #180351 post-repair baseline-exit-1 versus candidate-exit-0 scenario therefore remains unproven, rather than counted as a pass. A natural/bin/psprobe completed in 0.110s; host load alone did not reproduce slow ps. Separate external fault-injection controls suspended the real census child and correctly hit its original 1,000 ms timeout at about 1,003 ms, including through a pnpm script, without fabricating census data or modifying product source.Focused Node / Bun 1.4.4 attempts (the first Node file used 26.12.1; subsequent launchers use release-supported Node 24.22.1) ran serially, one file and one worker each, without the load gate or retries: 2/5 completed command passes, 3 watchdogs, 0 other non-passing attempts; 23 remaining planned commands not completed. After three 900-second runner watchdogs across the native runtime pair and another focused configuration, local proof stopped at those existing limits. The next Bun census command had already started and was stopped before a verdict; the other 22 planned commands were not run. No incomplete command is counted as a pass. Detailed verdicts follow. Watchdogs and setup failures are not test passes.
src/process/darwin-process-inspection.native.test.tssrc/process/darwin-process-inspection.test.tssrc/infra/openclaw-process-census.test.tssrc/process/supervisor/darwin-process-command.native.test.tssrc/process/supervisor/darwin-process-command.test.tssrc/process/supervisor/service-child-group-ownership.test.tssrc/process/spawn-broker/cleanup-group.test.tssrc/process/spawn-broker/cleanup-attached.test.tssrc/process/spawn-broker/cleanup.test.tssrc/process/orphaned-process.test.tsextensions/codex/src/app-server/transport-process-snapshot.test.tsextensions/codex/src/app-server/transport.process.test.tssrc/commands/doctor-maintenance.native-identity.test.tssrc/flows/doctor-plugin-source-captures.test.tsRetained completed proof: frozen candidate/base installs; core production typecheck; 747 dependency specs across 203 manifests, nine patch guards and 105 npm lock mirrors. The final-head real fixture (
node src/process/darwin-process-inspection.test-support.mjsand the same command under Bun, also withsandbox-exec/--seatbelt) passes Node 24.22.1 and Bun 1.4.4 on main and a Worker, with and without Apple ps denied; both pre-fix controls fail the ancestor assertion as expected (six expected outcomes). Earlier Node proof passed six Doctor identity tests, 211 other focused tests plus one Linux-only skip before its watchdog, and the real C exit-window regression. Earlier Bun selection had no complete verdict. Final formatting passes; local lint preparation hit its unchanged 300-second SDK declaration budget, while CI lint passes.Five-process cold-import medians: Node 26.12.1 identity 14.503 ms / inspect 10.294 ms; Bun 1.4.4 identity 25.943 ms / inspect 13.296 ms.
Final macOS capacity attempt: one AWS EC2
mac2.metalrequest failed immediately with HTTP 422: no available EC2 Mac Dedicated Host. The broker's configured regional attempts also found no usable host/image; no provider escalation, new dedicated-host allocation or second provisioning request was made. Failed leasecbx_285363aea9b7was stopped and verifiedreleasedwith cleanup complete. No instance, proof run URL or remote workload was created. Thus no remote frozen install, build, Doctor comparison or Node/Bun native/census tests ran. The full live #180351 proof and watchdogged-file verdicts remain gaps; the prepared payload is not evidence of execution.Release-owner handoff: @RomneyDa owns integration and landing. Source review is complete; the bounded local-proof outcome and all incomplete commands are recorded, and the exact-head CI cancellation red and the incomplete live Doctor/local proofs remain explicit above. This is not a green release qualification or permission to waive those gaps. The release owner decides integration and supplies the SDK acknowledgement, canonical release-branch
pnpm release:push, and full release qualification. This worker did not merge, push the release branch, publish packages/tags/releases or change npm settings. #175118 and #178076 remain recommended independent decisions, excluded from the bundle. The existing exact-version age exemptions expire October 26, 2026 at 00:51:31.079 UTC.