← Back to Pull requests

fix(reaper): declare and detect the Linux 4.7 waitid capability #49

Closed
unknown closed this pull request without merging on Nov 21, 2026 05:22 UTC
View on GitHub
unknown unknown commented on Nov 17, 2026 13:59 UTC
Author

Fixes #48.

Linux kernels before 4.7 reject the __WALL waitid option required to observe non-SIGCHLD children. Report that limitation as unsupported-platform, document it, and expose childObservationSupported() so callers can check the capability before using strict observation. Reaping retains its existing behavior unless its own wait mask is rejected.

The probe observes the actual wait capability without consuming child status or caching per-thread restrictions. Denied waits remain typed access-denied errors from operations; the nonthrowing probe returns false. Existing PID validation, libuv child ownership, and full wait semantics remain unchanged. No retry or reduced-semantics fallback is added.

Regression proof uses an isolated child with seccomp returning EINVAL or EACCES only for explicit __WALL waits, on both the main thread and a Worker. The same harness also checks invalid PIDs. Existing real Node/libuv adoption and reaping proof remains enabled.

Local lint, TypeScript, build, focused tests, and independent P2 review pass. Fresh native Linux baseline/candidate proof and the full platform CI matrix are running. Contributor credit is preserved; no release or version bump is included.

Native Linux proof passed at 037512e50854819e47ed8afa5c926f37ead46302: the original implementation reproduces operation-failed for the rejected mask; the candidate passes PROC_SAFE_NATIVE=require pnpm check (144 tests, 15 platform/capability skips), Cargo formatting/Clippy/tests, and root-only npm/pnpm native consumer smoke. The final follow-up only adds the probe signature to the API reference. Exact-head cross-platform CI remains the merge gate.

Diff: 210 lines (+157 / -53) across 2 files Reviewer: steipete Review duration: 5242m
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 210 lines diff across 2 files
0.36
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.320
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #49"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 36.5% (MEDIUM) · Higher = larger blast radius
36.5%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 14.4% · Safe to merge
14.4%