Repository navigation
fix(codex): preserve sandboxed process inspection and setup errors - #174284
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 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. |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b9580b3b25
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Codex review: needs real behavior proof before merge. What this changesThis PR shares native Darwin process inspection across Codex and cleanup, and surfaces Codex setup errors instead of silently selecting another provider. Example: A macOS Bun runtime has an existing Codex login and a sandbox that denies /bin/ps execution.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 9 items remain Keep this maintainer-authored PR open: it addresses a current sandbox failure, but introduces an overly broad setup stop and breaks wrapper extraction and census fixtures. Priority: P1 Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherThe process owner supplies topology, start identities, and command observations to Codex registration and containment; setup detection and activation consume backend results to select inference or report recovery guidance. flowchart TD
A[Automatic setup] --> B[Backend detection and activation]
B --> C[Codex transport]
C --> D[Shared Darwin inspector]
E[Process group cleanup] --> D
D --> F[Bun libproc and proc safe]
D --> G[Node bounded ps]
Technical reviewBest possible solution: Keep shared native inspection, narrow the setup stop to inspection failures, and preserve working fallbacks and retained registrations. Do we have a high-confidence way to reproduce the issue? Current-main source directly reaches ps for Darwin Codex inspection and discards discovery failures, establishing the reported path when a sandbox rejects execution; no target code was run. Is this the best way to solve the issue? A shared Darwin owner fits the existing architecture, but setup must distinguish inspection failures from ordinary candidate rejection and migrate affected tooling consumers. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d441bfc6e025. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: No concrete authorization bypass was established, but native process-signal authorization needs boundary proof. EvidenceSecurity concerns:
What I checked:
Likely related people:
PR surfaceSource +322, Tests +318, Docs +29. Total +669 across 23 files. Added test files: 1. View PR surface stats
LabelsLabel 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 Reviewed October 16, 2026, 10:35 AM ET / 14:35 UTC. |
|
Merged via squash.
|
* commit '14e993fff3ecb84eb1d7c9724c4ceda235d797e4': (110 commits) fix(decisions): align accounting ratchet evidence feat(memory): activate PostgreSQL memory search and lifecycle (#174374) fix: join process shutdown and isolate runtime fixtures (#174359) refactor(ui): scope native gateway observation to Solid (#174367) refactor(ui): own canvas widget lifetime in Solid (#174370) perf(control-ui): keep agent avatar faces stable across agent publications (#174239) perf(models): release unused account catalog instructions (#174361) refactor(ui): own composer command menus in Solid stores (#174321) refactor(ui): separate sidebar filter state from view lifecycle (#174352) test(release): make artifact qualification deadlines deterministic fix(codex): preserve sandboxed process inspection and setup errors (#174284) fix(gateway): stop worker processes before draining their queues (#174312) refactor(agents): reuse prepared tool facts (#174349) test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331) refactor(ui): replace MCP retirement host adapters with a factory (#174375) refactor(logging): remove redundant native success traces (#174330) refactor(test): remove dead control-plane fixture branches (#174377) refactor(mcp): remove test-only session runtime seams (#174347) feat(matrix): account-root state databases follow the selected engine (#174315) refactor(discord): collapse private interaction and factory seams (#174322) ...
* commit '14e993fff3ecb84eb1d7c9724c4ceda235d797e4': (110 commits) fix(decisions): align accounting ratchet evidence feat(memory): activate PostgreSQL memory search and lifecycle (#174374) fix: join process shutdown and isolate runtime fixtures (#174359) refactor(ui): scope native gateway observation to Solid (#174367) refactor(ui): own canvas widget lifetime in Solid (#174370) perf(control-ui): keep agent avatar faces stable across agent publications (#174239) perf(models): release unused account catalog instructions (#174361) refactor(ui): own composer command menus in Solid stores (#174321) refactor(ui): separate sidebar filter state from view lifecycle (#174352) test(release): make artifact qualification deadlines deterministic fix(codex): preserve sandboxed process inspection and setup errors (#174284) fix(gateway): stop worker processes before draining their queues (#174312) refactor(agents): reuse prepared tool facts (#174349) test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331) refactor(ui): replace MCP retirement host adapters with a factory (#174375) refactor(logging): remove redundant native success traces (#174330) refactor(test): remove dead control-plane fixture branches (#174377) refactor(mcp): remove test-only session runtime seams (#174347) feat(matrix): account-root state databases follow the selected engine (#174315) refactor(discord): collapse private interaction and factory seams (#174322) ...
* commit '0c6c7ee5837ed93f6fb09ca58b280e76878c21f1': (109 commits) feat(memory): activate PostgreSQL memory search and lifecycle (#174374) fix: join process shutdown and isolate runtime fixtures (#174359) refactor(ui): scope native gateway observation to Solid (#174367) refactor(ui): own canvas widget lifetime in Solid (#174370) perf(control-ui): keep agent avatar faces stable across agent publications (#174239) perf(models): release unused account catalog instructions (#174361) refactor(ui): own composer command menus in Solid stores (#174321) refactor(ui): separate sidebar filter state from view lifecycle (#174352) test(release): make artifact qualification deadlines deterministic fix(codex): preserve sandboxed process inspection and setup errors (#174284) fix(gateway): stop worker processes before draining their queues (#174312) refactor(agents): reuse prepared tool facts (#174349) test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331) refactor(ui): replace MCP retirement host adapters with a factory (#174375) refactor(logging): remove redundant native success traces (#174330) refactor(test): remove dead control-plane fixture branches (#174377) refactor(mcp): remove test-only session runtime seams (#174347) feat(matrix): account-root state databases follow the selected engine (#174315) refactor(discord): collapse private interaction and factory seams (#174322) refactor(feishu): reuse streaming merge in dispatcher tests (#174371) ...
* commit '14e993fff3ecb84eb1d7c9724c4ceda235d797e4': (110 commits) fix(decisions): align accounting ratchet evidence feat(memory): activate PostgreSQL memory search and lifecycle (#174374) fix: join process shutdown and isolate runtime fixtures (#174359) refactor(ui): scope native gateway observation to Solid (#174367) refactor(ui): own canvas widget lifetime in Solid (#174370) perf(control-ui): keep agent avatar faces stable across agent publications (#174239) perf(models): release unused account catalog instructions (#174361) refactor(ui): own composer command menus in Solid stores (#174321) refactor(ui): separate sidebar filter state from view lifecycle (#174352) test(release): make artifact qualification deadlines deterministic fix(codex): preserve sandboxed process inspection and setup errors (#174284) fix(gateway): stop worker processes before draining their queues (#174312) refactor(agents): reuse prepared tool facts (#174349) test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331) refactor(ui): replace MCP retirement host adapters with a factory (#174375) refactor(logging): remove redundant native success traces (#174330) refactor(test): remove dead control-plane fixture branches (#174377) refactor(mcp): remove test-only session runtime seams (#174347) feat(matrix): account-root state databases follow the selected engine (#174315) refactor(discord): collapse private interaction and factory seams (#174322) ...
* commit '0c6c7ee5837ed93f6fb09ca58b280e76878c21f1': (109 commits) feat(memory): activate PostgreSQL memory search and lifecycle (#174374) fix: join process shutdown and isolate runtime fixtures (#174359) refactor(ui): scope native gateway observation to Solid (#174367) refactor(ui): own canvas widget lifetime in Solid (#174370) perf(control-ui): keep agent avatar faces stable across agent publications (#174239) perf(models): release unused account catalog instructions (#174361) refactor(ui): own composer command menus in Solid stores (#174321) refactor(ui): separate sidebar filter state from view lifecycle (#174352) test(release): make artifact qualification deadlines deterministic fix(codex): preserve sandboxed process inspection and setup errors (#174284) fix(gateway): stop worker processes before draining their queues (#174312) refactor(agents): reuse prepared tool facts (#174349) test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331) refactor(ui): replace MCP retirement host adapters with a factory (#174375) refactor(logging): remove redundant native success traces (#174330) refactor(test): remove dead control-plane fixture branches (#174377) refactor(mcp): remove test-only session runtime seams (#174347) feat(matrix): account-root state databases follow the selected engine (#174315) refactor(discord): collapse private interaction and factory seams (#174322) refactor(feishu): reuse streaming merge in dispatcher tests (#174371) ...
…penclaw#174284) * fix(codex): preserve sandboxed process inspection and setup errors * test(codex): match Node process mock callback types * style(codex): satisfy process inspection lint checks * fix(codex): preserve census and setup fallback contracts
* fix(process): backport native Darwin group inspection Backport the process census and supervisor tests from #174147. The independent Doctor diagnostics and runtime-pin migration changes are excluded. (cherry picked from commit 6d50f72) * refactor(process): backport the shared Darwin inspection owner Backport the process owner, SDK exports, Codex consumer and their tests from #174284. The independent credential detection and onboarding changes are excluded. Preserve the release branch's unrelated diagnostic documentation. (cherry picked from commit 4959773) * refactor(process): share native macOS census across runtimes Backport #175368. Retain fs-safe 0.26.5 and adapt native census fixtures to the release branch. Carries the approved DarwinProcess uid-to-owner SDK migration; the following package pin completes the exit-window repair. (cherry picked from commit f236b19) * fix(codex): retry post-kill observations through the native exit window Backport #176576. Keep custody while retrying observations after our own SIGKILL within the existing containment deadline. (cherry picked from commit 5f94dfb) * fix(process): preserve macOS cleanup while unrelated processes exit Backport #176612. Pin proc-safe 0.4.2 and its exact native package exclusions, retain the real exiting-process regression, and align the SDK summary with native inspection on both runtimes. Retain the release branch's other dependency pins and exemptions. (cherry picked from commit 727c607) * test(process): reuse the process group inspection helper
What Problem This Solves
Fixes Codex turns failing when a macOS sandbox refuses to execute
/bin/ps, and zero-config setup silently treating Codex detection or process-inspection errors as absence and selecting Ollama.User Impact
Sandboxed Bun runtimes can reuse an existing Codex login without allowing
psexecution. Setup keeps detection and inspection failures visible. Genuine absence, sign-in-required behavior, and fallback after ordinary model failures remain covered. Shipped v2026.10.4 contains the old snapshot path, so existing users under rejecting sandboxes are affected. No credential migration or proc-safe release is needed.Why This Change Was Made
One core Darwin owner now supplies Codex snapshots and process-group census through the documented
openclaw/plugin-sdk/process-runtimecontract. Bun uses libproc for topology/start identity and the pinned proc-safe reader for arguments. Node has no FFI and the pinned package has no Darwin census API, so Node retains boundedpsinspection and its topology-only group projection. Normalized UTC start identities remain compatible with persisted Codex registrations.Darwin restricts full start-time records across UIDs. Collect complete short-record topology, then read full identities only for relevant Codex roots/descendants and the observer. Relevant denials stay errors. The retained PR-tooling inventory includes the new core dependency.
Evidence
/bin/ps; the real Codex plain turn returns exactHR_OK, exit 0, in 41.421 s. No physical loose CLI entry is present.Codex sign-in detection failedwith its permission error through the realopenclaw.setup.autoRPC. No primary model is selected and no Ollama inference is attempted. Real loose Node v26.12.0 also returns exactHR_OKin 22.375 s.openclaw/ci-gate. CI caught and verified repairs for the retained wrapper import, export-name collision, and Node census projection.Local limitations are retained: repository-wide max-lines, wrapper-shadowing, and dead-export findings reproduce on the inspected clean-main snapshot. One macOS-only PR-tooling warm/sparse test exceeds its existing 120-second deadline both in the full file and in isolation; 15 other provisioning cases pass. No timeout or baseline was weakened. All OpenClaw proof state is isolated; real Codex auth uses
homeScope=userREUSE with no OAuth copies.Related: #174147.