Skip to content

feat: recover stale sidecars via health handshake - #2

Merged
ildella merged 4 commits into
masterfrom
feat/sidecar-health-recovery
Sep 10, 2026
Merged

ildella merged 4 commits into
masterfrom
feat/sidecar-health-recovery

Conversation

@ildella

@ildella ildella commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Why

An outdated sidecar on 7878 leaves Speak stuck and the CLI talking to a daemon that does not match this install. Killing whatever holds the port is unsafe if the process is not ours.

What

  • GET /v1/health with version, protocol, and pid
  • Shared attribution: token-verified health pid is enough; listener then pidfile only if the pid is alive and cwd is an install dir
  • Pidfile written after bind; unlink only our pid; listen error exits
  • GUI recovers at launch (5s) and every 30s (15s budget, twice per outage)
  • CLI service status|start uses the same rule; 401 is foreign; 5xx/timeout are unhealthy

GUI and CLI now share one attribution rule: a token-verified health pid
is enough to retire; port scan and pidfile are fallbacks only if the
process is alive and its cwd is an install dir. The sidecar writes the
pidfile after bind, unlinks only its own pid, and exits on listen error.

This stops an outdated daemon on 7878 from leaving Speak stuck, without
killing a foreign process that happens to hold the port.
Ship callebtc's SKILL.md and expose `sayit skill path|install`
so agents get the file without claiming it as this fork.
@ildella
ildella merged commit 76a08a7 into master Sep 10, 2026
3 checks passed
@ildella
ildella deleted the feat/sidecar-health-recovery branch September 10, 2026 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant