Skip to content

fix: harden daemon and test lifecycles - #147

Merged
intel352 merged 9 commits into
masterfrom
fix/lifecycle-followups
Oct 13, 2026
Merged

intel352 merged 9 commits into
masterfrom
fix/lifecycle-followups

Conversation

@intel352

@intel352 intel352 commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Daemon restart waits for the captured process to exit before starting its replacement. Stop leaves PID and socket ownership with the daemon, so a concurrent replacement cannot have its files unlinked after a stale PID read. Background startup waits for a successful Health RPC instead of treating a live PID or socket file as readiness.

A shared gRPC dialer passes the raw Unix-socket path to net.Dialer for startup Health, shutdown, and the normal CLI client. This preserves Windows drive paths and path characters that URI parsing would change. The TUI smoke helper bounds nested cross-builds and reaps process trees on Unix and Windows; provider startup surfaces query, scan, iteration, and close errors while retaining row-lock ownership.

Validation

  • Diagnostic CI reproduced the Windows 120-byte socket path rejection and a two-minute nested cross-build timeout. CI after the test fixture repair passed all jobs.
  • Ownership-repair CI exposed a restart assertion that could not distinguish Windows PID reuse. The next Windows run showed a visible but refusing replacement socket. Health-gate CI then exposed gRPC misparsing a Windows C:\ socket path as a network authority.
  • Exact-head CI for the raw-path dialer passed all ten jobs, including Windows ConPTY Smoke, full race Test, Release Check, builds, lint, and vet. CodeQL also passed. Focused tests cover delayed Health readiness, bounded timeout, replacement file ownership, and a real Health RPC over a socket path containing #. The Windows restart smoke exercises the production client Health call after start and restart.

The source merge and release target v0.30.41 require separate decisions after formal review. Merging this PR does not itself publish the release.

@intel352
intel352 merged commit 9e423f3 into master Oct 13, 2026
14 checks passed
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