Keep recovered services alive when the watchdog oneshot exits (KillMode=process) #401

Merged
weichen merged 3 commits from feature/svc-autorecover into main 2026-10-11 22:21:27 +00:00
Owner

Follow-up to #396/#400: systemd oneshot units default to KillMode=control-group, which killed the daemon recover had just revived the moment the oneshot exited (observed live: recover ok at 22:13:40, process gone by 22:13:42). The generated watchdog unit now sets KillMode=process.

Why: auto-recovery must leave the recovered service running.
Evidence: test_watchdog_print_plan asserts KillMode=process; suite 10/10 + make test-governance rerun on the task card; live host re-demo after merge.
Impact: scripts/svc.sh wd_service_text + one test assertion.

Follow-up to #396/#400: systemd oneshot units default to KillMode=control-group, which killed the daemon recover had just revived the moment the oneshot exited (observed live: recover ok at 22:13:40, process gone by 22:13:42). The generated watchdog unit now sets KillMode=process. Why: auto-recovery must leave the recovered service running. Evidence: test_watchdog_print_plan asserts KillMode=process; suite 10/10 + make test-governance rerun on the task card; live host re-demo after merge. Impact: scripts/svc.sh wd_service_text + one test assertion.
weichen added 1 commit 2026-10-11 22:15:42 +00:00
Keep recovered services alive when the watchdog oneshot exits
ci / test-pg (pull_request) Successful in 1m1s
ci / test (pull_request) Successful in 2m34s
5e9083cff4
Why: systemd's default KillMode=control-group kills every process in
the unit's cgroup when the oneshot finishes -- the daemon recover just
started died seconds after the recover ok event (observed live on the
host: revived at 22:13:40, gone by 22:13:42).

Evidence: unit text now carries KillMode=process (asserted in
test_watchdog_print_plan); suite 10/10 and make test-governance rerun
recorded on the card; live re-demo on the host after merge.

Impact: scripts/svc.sh wd_service_text only.

Refs: .task/feature-svc-autorecover.md
weichen added 2 commits 2026-10-11 22:19:58 +00:00
Why: include the current integration baseline before verification.

Evidence: fetched origin/main=77391479a0645f06b631bc64ac9e55554f7e4f4e.

Impact: integrate upstream changes without rewriting task history.

Refs: task-sync
Record the sync checkpoint
ci / test-pg (pull_request) Failing after 58s
ci / test (pull_request) Successful in 2m38s
35802214e3
Why: bind the task validation checkpoint to the latest integration baseline.

Evidence: SELF recursive component checks; sync_base=77391479a0645f06b631bc64ac9e55554f7e4f4e; candidate=c08cf35abaf651e8373abfc51ffaba65abc546d2.

Impact: task metadata only.

Refs: .task/feature-svc-autorecover.md
weichen merged commit d99482fcaa into main 2026-10-11 22:21:27 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-System-Dev#401