Skip to content

feat: stability hardening + CLI niceties#12

Merged
sebyx07 merged 3 commits into
mainfrom
feat/stability-hardening-cli
Jun 29, 2026
Merged

feat: stability hardening + CLI niceties#12
sebyx07 merged 3 commits into
mainfrom
feat/stability-hardening-cli

Conversation

@sebyx07

@sebyx07 sebyx07 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • PID-identity verification before SIGTERM — guards against signaling a recycled PID (stops stale check, marks run stopped without signal)
  • CLI --help / --version dispatch
  • Tests: stale-PID path (stop + status) covered; all 332 pass

Changes

  • src/session/process-identity.ts/proc/<pid>/stat fingerprint + verifyIdentity
  • src/cli/control.tsserverAlive guards stale/gone; stale path skips signal
  • src/cli/control.test.ts — identity-mismatch tests (Linux-guarded)
  • src/session/state-file.test.ts — round-trip + markStatus terminal-state preservation

sebyx07 and others added 3 commits June 29, 2026 17:14
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>
@sebyx07 sebyx07 added the claudetm Claude Task Master label Jun 29, 2026
@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 29 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d38c9576-3ccd-46dc-b1aa-dac9192a6b8b

📥 Commits

Reviewing files that changed from the base of the PR and between 4dfc10d and 724da39.

📒 Files selected for processing (8)
  • src/cli/control.test.ts
  • src/cli/control.ts
  • src/cli/help.ts
  • src/main.ts
  • src/session/process-identity.test.ts
  • src/session/process-identity.ts
  • src/session/state-file.test.ts
  • src/session/state-file.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/stability-hardening-cli

Comment @coderabbitai help to get the list of available commands.

@sebyx07 sebyx07 merged commit b622365 into main Jun 29, 2026
2 checks passed
@sebyx07 sebyx07 deleted the feat/stability-hardening-cli branch June 29, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claudetm Claude Task Master

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant