Commit graph

10 commits

Author SHA1 Message Date
Virgil
2461466f55 Handle nil contexts in runner and daemon 2026-04-04 06:48:18 +00:00
Virgil
02e2b3611c fix(process): reorder daemon shutdown teardown
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 03:00:09 +00:00
Virgil
945e760542 fix(process): unregister daemon before health shutdown
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 01:51:39 +00:00
Virgil
b097e0ef0e fix(process): mark daemon not-ready before shutdown
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 01:48:07 +00:00
Virgil
2e5ac4208b feat(process): auto-populate daemon registry metadata
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 01:26:42 +00:00
Virgil
cdc8bfe502 feat(process): add readiness accessors and AX examples
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 00:39:27 +00:00
Virgil
5142114e89 feat(process): rollback daemon startup on registry failure 2026-04-04 00:11:21 +00:00
Snider
87ef2dbe16 fix(dx): audit CLAUDE.md, error handling, and test coverage
- Update CLAUDE.md: document Detach, DisableCapture, ShutdownTimeout,
  auto-registration, graceful shutdown, and error handling conventions;
  add missing go-log and go-io dependencies
- Replace ServiceError type in process_global.go with coreerr.E()
  sentinel errors for consistency with the rest of the package
- Wrap raw error returns in Registry.Register, Registry.Unregister,
  and PIDFile.Release with coreerr.E() for proper context
- Add tests for Service.Kill, Service.Output, Service.OnShutdown,
  Service.OnStartup, Service.RunWithOptions, Service.Running,
  Process.Signal, Daemon.Run (context cancellation),
  Daemon.Stop (idempotent), DisableCapture, Detach, env vars,
  exec.WithDir, exec.WithEnv, exec.WithStdin/Stdout/Stderr,
  exec.RunQuiet
- Coverage: root 82.7% → 88.3%, exec/ 61.9% → 87.3%

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-17 08:42:56 +00:00
Snider
81de841903 feat: auto-register/unregister daemons via optional Registry
When Registry is set on DaemonOptions, Start() auto-registers the daemon
(filling PID and Health address) and Stop() auto-unregisters it. Consumers
without a registry are completely unaffected.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 14:49:47 +00:00
Snider
0696d32042 feat: add Daemon orchestrator for managed process lifecycle
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 14:01:40 +00:00