Repository navigation
feat(inspect): add Darwin process census and PID selection - #19
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 changes before merge. What this changesAdds an optional pids selection to Windows process census calls while retaining complete enumeration checks and explicit unknown facts. Example: On Windows, inspect running PID 4072 with pids: [4072, 4072].
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this PR open: it adds useful Windows selection support absent from main, preserves census safety contracts, and has no actionable introduced defect. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe inspect subpath validates application options, invokes native Windows enumeration and retained-handle inspection, and returns frozen process observations. flowchart LR
A[Application options] --> B[TypeScript validation]
B --> C[Complete Windows enumeration]
C --> D[Selected PID filter]
D --> E[Retained handle observations]
E --> F[Frozen process rows]
Technical reviewBest possible solution: Land the focused Windows selection extension when the author considers the draft ready, retaining existing census defaults and safety checks. Do we have a high-confidence way to reproduce the issue? This is a capability addition rather than a reported bug; current-main signatures and native code establish that selecting PIDs before per-process inspection is unavailable. Is this the best way to solve the issue? Filtering inside the existing native census avoids unnecessary foreign-process reads while preserving enumeration validation, observation semantics, and the existing API owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against cb91f900a68d. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Review metrics
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, 9:28 PM ET / October 17, 2026, 01:28 UTC. |
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. |
Darwin callers can now enumerate processes through
@openclaw/proc-safe/inspect, including parent PIDs, process groups, ownership, and kernel state. Topology remains available for foreign-owner processes whose birth identity is denied, and retained zombies remain visible rather than being mistaken for missing PIDs.ProcessSnapshotadds independentparentPid,processGroupId, andstatefields plus the exportedProcessStateunion. Darwin reads short BSD records for topology and ownership, full records for optional birth identity, and the existing SDK kernel-record bridge for libproc-excluded zombies. Birth identity brackets optional combined observations against PID reuse. Both Darwin and Windows acceptpidsselections after validating a complete enumeration; Windows also exposes its already-known parent PID. Native deadlines and unknown-fact semantics remain intact. Linux and FreeBSD census stays unsupported.Validation includes real setsid, stopped, zombie, foreign-owner, missing-PID, and native-deadline observations on the main thread and Workers under Node and Bun. The Windows selection proofs also cover process-ACL and caller-token denial. Local macOS arm64 checks pass:
pnpm check, native build, native-required inspection tests (23 tests per runtime), identity/lifecycle proof, and Cargo clippy. CI covers macOS and Windows on both architectures, plus the existing Linux and FreeBSD matrix. Import benchmarks confirm the entry point remains lazy.Exact-head CI passed all 24 checks, including FreeBSD ARM64 on Node 22 and 24. Independent isolated review is clean through P2.