claude_runner 1.3.1

CLI for executing Claude Code via builder pattern; YAML schema constants for command registration
Documentation
# Parameter :: `--pid`

Edge case coverage for the `--pid` parameter. See [068_pid.md](../../../../docs/cli/param/068_pid.md) for specification.

## Test Case Index

| ID | Test Name | Category |
|----|-----------|----------|
| EC-1 | `clr ps --pid <running-pid>` shows only that session | Behavioral |
| EC-2 | `clr ps --pid <pid1>,<pid2>` shows exactly those two sessions | Behavioral |
| EC-3 | `clr ps --pid <unknown-pid>` shows empty-state message, exits 0 | Behavioral |
| EC-4 | `clr ps --pid bogus` exits 1 with error about non-numeric PID | Validation |
| EC-5 | `clr ps --pid <pids> --mode interactive` — mode and pid filters combined | Interaction |
| EC-6 | `clr ps --pid <running-pid> --inspect` — pid and inspect combined | Interaction |
| EC-7 | `clr ps --help` output contains `--pid` | Documentation |
| EC-8 | `CLR_PS_PID=<running-pid> clr ps` — env var fallback | Env Var |

## Test Coverage Summary

- Behavioral: 3 tests (EC-1, EC-2, EC-3)
- Validation: 1 test (EC-4)
- Interaction: 2 tests (EC-5, EC-6)
- Documentation: 1 test (EC-7)
- Env Var: 1 test (EC-8)

**Total:** 8 edge cases

---

### EC-1: Single PID filter shows only that session

- **Setup:** ≥2 fake `claude` processes running (PID A and PID B)
- **Command:** `clr ps --pid <PID-A>`
- **Expected behavior:** Exit 0; stdout contains PID A; stdout does NOT contain PID B
- **Exit:** 0
- **Source:** [068_pid.md]../../../../docs/cli/param/068_pid.md

---

### EC-2: Multiple PID filter shows exactly those sessions

- **Setup:** ≥3 fake `claude` processes running (PID A, PID B, PID C)
- **Command:** `clr ps --pid <PID-A>,<PID-B>`
- **Expected behavior:** Exit 0; stdout contains PID A and PID B; stdout does NOT contain PID C
- **Exit:** 0
- **Source:** [068_pid.md]../../../../docs/cli/param/068_pid.md

---

### EC-3: Unknown PID shows empty-state message

- **Setup:** No active `claude` processes (or PID not a claude process)
- **Command:** `clr ps --pid 99999999`
- **Expected behavior:** Exit 0; stdout contains `No active Claude Code sessions.`
- **Exit:** 0
- **Source:** [068_pid.md]../../../../docs/cli/param/068_pid.md

---

### EC-4: Non-numeric PID value exits 1

- **Command:** `clr ps --pid bogus`
- **Expected behavior:** Exit 1; stderr contains error message referencing non-numeric or invalid PID value
- **Exit:** 1
- **Source:** [068_pid.md]../../../../docs/cli/param/068_pid.md

---

### EC-5: `--pid` and `--mode` filters are anded

- **Setup:** 2 fake `claude` processes: PID A (interactive), PID B (print-mode, has `-p` in args)
- **Command:** `clr ps --pid <PID-A>,<PID-B> --mode interactive`
- **Expected behavior:** Exit 0; stdout contains PID A; stdout does NOT contain PID B (excluded by mode filter)
- **Exit:** 0
- **Source:** [068_pid.md]../../../../docs/cli/param/068_pid.md

---

### EC-6: `--pid` and `--inspect` combined

- **Setup:** ≥2 fake `claude` processes running (PID A, PID B)
- **Command:** `clr ps --pid <PID-A> --inspect`
- **Expected behavior:** Exit 0; stdout contains `pid:` and `mode:` key:value lines; stdout contains PID A value; stdout does NOT contain PID B; table headers (`PID`, `Elapsed`, `CPU%`) are NOT present
- **Exit:** 0
- **Source:** [068_pid.md]../../../../docs/cli/param/068_pid.md

---

### EC-7: Help output contains `--pid`

- **Command:** `clr ps --help`
- **Expected behavior:** Exit 0; stdout contains `--pid`
- **Exit:** 0
- **Source:** [068_pid.md]../../../../docs/cli/param/068_pid.md

---

### EC-8: `CLR_PS_PID` env var fallback

- **Setup:** ≥2 fake `claude` processes running (PID A, PID B)
- **Command:** `clr ps` with `CLR_PS_PID=<PID-A>` in env
- **Expected behavior:** Exit 0; stdout contains PID A; stdout does NOT contain PID B
- **Exit:** 0
- **Source:** [068_pid.md]../../../../docs/cli/param/068_pid.md