cli: add felis daemon stop #153
No reviewers
Labels
No labels
priority/P0
priority/P1
priority/P2
release/v0.1.0
status/blocked
status/planned
type/bug
type/design
type/test-gap
type/tracker
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
natsukium/felis!153
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/daemon-stop-25"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #25.
Adds a portable way to stop a daemon and drain it, replacing the
pkilladvice that only ever worked on Unix.
Ops::Stop/Ops::StopReplypair with a closedStopMode(if-empty,when-empty,force) andStopOutcome, adrainingflag onOps::StatusReply, and anAttachFailure::DaemonDrainingso a client learns why a drained daemon refuses it.
Ops::Stopflips the pool into draining, the accept loop stopsadmitting new sessions, and the shutdown fires only after the reply is
written; the socket is unlinked on the way out.
felis daemon stopwith the mode flags and machine output, plus theminor-version gate that refuses the verb against an older daemon.
Doc cascade:
docs/reference/cli.md,docs/reference/ipc.md,docs/reference/spec.md,docs/reference/control-surfaces.md,docs/explanation/architecture/{control-surfaces,overview,session-lifecycle}.md,docs/how-to/update-felis.md(thepkillstep is now the stop verb),CHANGELOG.md, and the product-shippedskills/felis/SKILL.md.Verified: just check green (fmt, clippy, nextest, deny, proto-compat); reviewed
by pi luna + pi sol; docs proofread by Gemini gemini-3.8-flash-high
Follow-ups
Deferred
--host) — therelay proxies bytes to the real daemon socket, so the stop path is identical
to the local one; the risk the plan flagged (the relay outliving the reply)
is covered by the reply being written before the shutdown fires, and no relay
integration harness exists to hang the test on.
AgentLink) on the way out, beside the socketunlink — a stale link costs the next daemon nothing (
clear_staleruns afterits bind), which is the same argument the existing code makes; a second
cleanup path is unrelated to the acceptance criteria.
#[cfg(unix)](it needs POSIX shells and peer credentials); the accept loop'swatch arm and the shutdown are platform-independent, and only the
remove_fileiscfg(unix).daemon_stop— the version gate mirrorsdaemon_status's existing pattern and is implemented correctly; this asks forextra coverage of an already-correct compatibility check, not a fix.
felis daemon stop80c53c274c