hephaestus/crates/hephd/src
Erich Blume b04a71421e
All checks were successful
Build / validate (pull_request) Successful in 8m7s
fix(hephd): reconnect the socket client across daemon restarts
`Client` connected to the unix socket once and never reconnected, so after an
opt-in self-update or `heph daemon restart` dropped the socket, every later
`call()` failed — `heph-tui` would sit on errors until relaunched (and the work
we just shipped makes restarts more frequent).

`Client` now stores the socket path and reconnects on a dropped connection,
classifying the failure to stay safe:
- write-side failure (request never reached the daemon) → reconnect + retry once;
- reply lost after sending (daemon closed mid-request) → reconnect for next time
  but surface this one, so a mutation is never silently double-applied;
- genuine RPC errors are passed through untouched.

heph-tui and the CLI use `Client` unchanged, so the TUI self-heals on its next
refresh tick. Adds an integration test driving a mock daemon that drops the
connection after each request.

Closes the "heph-tui: reconnect on a dropped daemon socket" backlog task.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 15:19:10 -07:00
..
auth.rs feat(hephd,heph,heph-tui): distinguish IdP rejection from unreachable + actionable re-auth 2026-06-08 14:06:08 -07:00
client.rs fix(hephd): reconnect the socket client across daemon restarts 2026-06-08 15:19:10 -07:00
clock.rs hephd local mode: file lock + JSON-RPC over unix socket 2026-05-31 20:28:15 -07:00
datespec.rs feat(heph-tui,heph-pwa): humanized recurrence + indented/counted/scrolling project sidebar 2026-06-05 17:44:43 -07:00
frontmatter.rs feat(core,hephd): frontmatter projection — render on read, strip on write (§8.3) 2026-06-03 11:32:59 -07:00
lib.rs C2(hephd-self-update): impl release poll + version-check helpers 2026-06-04 13:36:55 -07:00
lock.rs infra: pre-v1 dependency-refresh sweep + drop fs4 + remove dead build hook 2026-06-03 22:19:13 -07:00
main.rs fix(hephd): supervise the ⌘' popover in server mode too; PWA defaults hub to its origin 2026-06-04 17:13:28 -07:00
oauth.rs feat(hephd,heph,heph-tui): distinguish IdP rejection from unreachable + actionable re-auth 2026-06-08 14:06:08 -07:00
quickadd.rs feat: heph-quickadd — global ⌘' quick-capture popover (§8) 2026-06-03 18:12:24 -07:00
remote.rs feat(heph-tui,heph-pwa): humanized recurrence + indented/counted/scrolling project sidebar 2026-06-05 17:44:43 -07:00
rpc.rs feat(heph-tui,heph-pwa): humanized recurrence + indented/counted/scrolling project sidebar 2026-06-05 17:44:43 -07:00
selfupdate.rs fix: self-update poll uses ureq (reqwest has no TLS backend) 2026-06-04 15:26:13 -07:00
server.rs feat(hephd,heph,heph-tui): distinguish IdP rejection from unreachable + actionable re-auth 2026-06-08 14:06:08 -07:00
sync.rs feat(hephd,heph,heph-tui): distinguish IdP rejection from unreachable + actionable re-auth 2026-06-08 14:06:08 -07:00