skills: make the samply and drive.sh harnesses work with the systemd-run daemon hand-off #394

Closed
opened 2026-09-25 00:48:17 +09:00 by natsukium · 0 comments
Owner

Two agent-facing harness scripts assume that the auto-spawned daemon is a forked child whose stderr reaches the caller. On a systemd Linux desktop, autospawn hands the daemon off to systemd-run --user (crates/felis-client-core/src/spawn.rs ~45-50, spawn/systemd.rs), and a forked daemon's stderr is /dev/null (spawn.rs ~96-98).

  • .agents/skills/perf-trace/scripts/samply-profile.sh: samply's launch mode cannot follow a daemon started in a transient unit. The docs consistency audit added a caveat and corrected the parse-thread name (felis-pty-parser). A real fix is to start felis-daemon serve --socket $SOCK under samply itself and point the client at that socket, with SHELL set on the client, since the session shell comes from the client's env_base.
  • .agents/skills/producer-traffic-debug/scripts/drive.sh: the audit rewrote it to start felis-daemon serve --socket itself, with stderr sent to $LOG. It passes bash -n but has not been run end to end under niri.

Both need a runtime check on the Linux desktop before they can be trusted.

Two agent-facing harness scripts assume that the auto-spawned daemon is a forked child whose stderr reaches the caller. On a systemd Linux desktop, autospawn hands the daemon off to `systemd-run --user` (`crates/felis-client-core/src/spawn.rs` ~45-50, `spawn/systemd.rs`), and a forked daemon's stderr is `/dev/null` (spawn.rs ~96-98). - `.agents/skills/perf-trace/scripts/samply-profile.sh`: samply's launch mode cannot follow a daemon started in a transient unit. The docs consistency audit added a caveat and corrected the parse-thread name (`felis-pty-parser`). A real fix is to start `felis-daemon serve --socket $SOCK` under samply itself and point the client at that socket, with `SHELL` set on the client, since the session shell comes from the client's `env_base`. - `.agents/skills/producer-traffic-debug/scripts/drive.sh`: the audit rewrote it to start `felis-daemon serve --socket` itself, with stderr sent to `$LOG`. It passes `bash -n` but has not been run end to end under niri. Both need a runtime check on the Linux desktop before they can be trusted.
Commenting is not possible because the repository is archived.
No description provided.