Skip to content

Commit 14d4dc9

Browse files
committed
docs: add task briefs for t1534, t1535 Linux scheduler bugs
1 parent 0beb5d5 commit 14d4dc9

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

todo/tasks/t1534-brief.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# t1534: Fix worker-watchdog.sh --install crashes on Linux (launchd-only)
2+
3+
## Origin
4+
Pulse session 2026-03-16. Filed as GH#5084.
5+
6+
## What
7+
Add Linux (cron) support to `worker-watchdog.sh` scheduler management commands (`--install`, `--uninstall`, `--status`). Currently only macOS launchd is supported — `launchctl` calls crash on Linux.
8+
9+
## Why
10+
Linux users who dispatch workers have no automated stuck-worker detection. A hung worker sits indefinitely consuming resources.
11+
12+
## How
13+
1. Add OS detection (`uname -s`) to `cmd_install()` (line ~862), `cmd_uninstall()`, and status display
14+
2. macOS path: existing launchd plist logic (unchanged)
15+
3. Linux path: add cron entry via `crontab -l | ... | crontab -` pattern (reference `cron-helper.sh sync_crontab()`)
16+
4. Cron entry: `*/2 * * * * /bin/bash ~/.aidevops/agents/scripts/worker-watchdog.sh --check >> ~/.aidevops/logs/worker-watchdog.log 2>&1 # aidevops: worker-watchdog`
17+
5. Replace hardcoded `LAUNCHD_LABEL` references in status with OS-appropriate output
18+
19+
## Acceptance Criteria
20+
- `--install` succeeds on Linux, adds cron entry
21+
- `--uninstall` removes cron entry on Linux
22+
- `--status` shows correct scheduler type on both OS
23+
- Core `--check` functionality unchanged
24+
- ShellCheck clean
25+
- Bash 3.2 compatible (no associative arrays, no mapfile)
26+
27+
## Context
28+
- File: `.agents/scripts/worker-watchdog.sh`
29+
- Issue: GH#5084 (full reproduction steps and root cause analysis)
30+
- Related: GH#5085 (same class of bug in pulse-session-helper.sh)

todo/tasks/t1535-brief.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# t1535: Fix aidevops pulse start silently succeeds on Linux without scheduler installed
2+
3+
## Origin
4+
Pulse session 2026-03-16. Filed as GH#5085.
5+
6+
## What
7+
Add scheduler verification to `pulse-session-helper.sh` so `aidevops pulse start` warns when no scheduler (launchd/cron) is configured, and replace hardcoded "launchd" strings with OS-appropriate terminology.
8+
9+
## Why
10+
On Linux, `pulse start` reports success but the pulse never fires — no cron entry exists. User has no indication anything is wrong. Output says "launchd" on a system that doesn't have launchd.
11+
12+
## How
13+
1. Add `check_scheduler()` function that detects OS and checks for the appropriate scheduler entry
14+
2. In `cmd_start()` (line ~170-212): call `check_scheduler()`, warn if missing, provide install command
15+
3. In `cmd_status()` (line ~445): replace "launchd cycle" with OS-appropriate term
16+
4. Replace hardcoded "launchd" at lines 207, 209, 445 with a variable set from `uname -s`
17+
5. Reference `onboarding-helper.sh` which already correctly checks both launchd and crontab
18+
19+
## Acceptance Criteria
20+
- `pulse start` on Linux without cron entry shows warning with install instructions
21+
- `pulse start` on macOS without launchd plist shows warning
22+
- `pulse status` shows OS-appropriate scheduler name
23+
- All output strings use correct OS terminology
24+
- ShellCheck clean
25+
- Bash 3.2 compatible
26+
27+
## Context
28+
- File: `.agents/scripts/pulse-session-helper.sh`
29+
- Issue: GH#5085 (full reproduction steps and root cause analysis)
30+
- Related: GH#5084 (same class of bug in worker-watchdog.sh)
31+
- Related: GH#2927/PR#2935 (session-based pulse control design)

0 commit comments

Comments
 (0)