Repository navigation
fix(update): don't abort the process census on one unparseable process environment - #178705
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. |
|
Codex review: needs maintainer review before merge. What this changesThis PR converts an individual Darwin incomplete-command inspection into unknown custody so process enumeration can continue. Example: Darwin command inspection for PID 4102 throws an incomplete-environment error before a later runtime holder at PID 4103.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it fixes a source-confirmed census failure still present on main, preserves conservative custody decisions, and introduces no actionable defect found in this review. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherDoctor and update recovery consume native process observations to determine whether retained artifacts remain in use; the census returns holder PIDs, uncertainty warnings, or enumeration errors. flowchart TD
A[Doctor and update recovery] --> B[OpenClaw process census]
B --> C[Native process topology]
C --> D[Per process command inspection]
D --> E[Custody classification]
E --> F[Holder PIDs and warnings]
F --> G[Existing cleanup owner]
Technical reviewBest possible solution: Keep the narrow per-process error conversion in the existing census owner while preserving unknown custody and strict enumeration failures. Do we have a high-confidence way to reproduce the issue? Current-main source shows a typed incomplete error escaping individual Darwin command inspection into the global census catch; the earlier cleanup PR records the same native failure, and this PR reports a red-on-base regression. Is this the best way to solve the issue? This is the smallest complete application-side fix: reuse existing unknown custody, retain topology for ancestry handling, and avoid weakening proc-safe parsing or introducing a second classifier. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0061cdde5f9a. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +17, Tests +26, Docs 0. Total +43 across 4 files. Added test files: 0. View PR surface stats
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 October 20, 2026, 3:30 PM ET / 19:30 UTC. |
…s environment (openclaw#178705) A single proc-safe incomplete observation (for example an unterminated Darwin environment) aborted the whole retained-runtime census. That process now becomes unknown custody (blocking exactly as other unknowns do) and enumeration continues; other errors propagate as before. Upstream proc-safe parser follow-up is described in the PR.
What Problem This Solves
One unparseable Darwin process environment aborts the retained-runtime census before it can inspect later processes.
User Impact
Doctor and update cleanup continue the census and report a warning for an unparseable process. That PID retains unknown custody, so potentially held runtimes remain protected.
Why This Change Was Made
At OpenClaw's proc-safe boundary, only a typed
ProcSafeErrorwith codeincompletefrom an individual command inspection becomes an observed process with unavailable command data. Native topology is retained. Unknown ancestors cannot receive a launcher exemption, but they no longer abort all observations. Enumeration failures, unrelated errors, and ordinary process disappearance retain their existing behavior.The proc-safe Darwin parser was inspected at commit
8a610a06e5baca3336a84e64bdc2c9887687da3c.native/src/inspect.rsdeliberately refuses an alignedpfz=ambiguity and an environment buffer without an independent terminating boundary, as documented indocs/inspect.md. This is not evidence that those parser guards should be removed. An upstream improvement would represent argv and environment availability independently: preserve successfully parsed argv and mark requested environment fields unavailable when their boundary cannot be proven. It must never silently turn an unreadableOPENCLAW_SERVICE_MARKERinto an absent marker. This PR changes no proc-safe source or dependency.Evidence
0 cycle(s).git diff --check: clean.HOME/OPENCLAW_STATE_DIR, a lane-owned/bin/sleepchild, and two runtime-directory queries. Both returnpidswith no global error; the owned holder is found. Unreadable environments emit custody warnings and can conservatively retain that PID for an unrelated runtime. The child is terminated and joined infinally.check:changedSQLite inventory was skipped under the campaign's local gate budget; PR CI supplies broad proof.Commands ran with
HOME="$PWD/.artifacts/home"andOPENCLAW_STATE_DIR="$PWD/.artifacts/state". Focused/consumer tests usednode scripts/run-vitest.mjs <test files> --maxWorkers=1; types usednode scripts/run-tsgo.mjs -p .artifacts/tsconfig.followup-{prod,tests}.jsonwith changed-file roots; lint usednode_modules/.bin/oxlint --tsconfig tsconfig.json <changed TypeScript files>; format usednode_modules/.bin/oxfmt --check <changed files>; cycles usednode --import ./scripts/tsx.mjs scripts/check-madge-import-cycles.ts.Native retained-runtime command:
env HOME="$PWD/.artifacts/home" OPENCLAW_STATE_DIR="$PWD/.artifacts/state" node_modules/.bin/tsx .artifacts/census-native-proof.ts. Output:holdingError=null,unrelatedError=null,ownHolderFound=true; unknown custody conservatively retained the holder for the unrelated query as well. The checked-in native handoff census test also passed.Exact focused and consumer test commands
The first run found the final old wait-message assertion; the second run verifies its correction. All other first-run cases passed. The earlier 68-file importer list was selected by production basenames, preserving search order. Proof ran on the combined candidate; the two independent fixes are published on separate branches.