feat: stability hardening + CLI niceties#12
Conversation
stop/status trusted a bare PID. If the server died and the OS recycled its PID, stop could SIGTERM an unrelated process and still mark the run stopped. Capture the server's OS process start time (/proc/<pid>/stat field 22) as an `identity` in state.json, then re-check it before treating a PID as alive or signaling it: mismatch -> stale, never signal; only a vanished PID (ENOENT/ESRCH) is the benign race. Non-Linux has no /proc -> unverifiable -> bare-liveness fallback (no regression). - new src/session/process-identity.ts: capture/verify + /proc stat parser - state.json gains required `identity`; control.ts gates isAlive + stop - tests: parser + match/stale/gone/unverifiable outcomes Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Added help.ts with runHelp() and runVersion() functions - Updated main.ts to dispatch --help/-h and --version/-v before config load - Both exit cleanly with exit code 0 - Integrates with existing subcommand dispatch pattern (init, status, stop) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Tests the path where stop/status detect a recycled PID via /proc startTicks: - stop with stale PID marks run stopped without signaling + logs "without signaling" - status with stale PID shows "not running (PID reused)" Both tests guard against non-Linux platforms where /proc is unavailable. Co-Authored-By: Claude <noreply@anthropic.com>
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 29 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Summary
stalecheck, marks run stopped without signal)--help/--versiondispatchChanges
src/session/process-identity.ts—/proc/<pid>/statfingerprint +verifyIdentitysrc/cli/control.ts—serverAliveguardsstale/gone; stale path skips signalsrc/cli/control.test.ts— identity-mismatch tests (Linux-guarded)src/session/state-file.test.ts— round-trip +markStatusterminal-state preservation