Commit graph

37 commits

Author SHA1 Message Date
Virgil
dcf20c78c8 feat(process): add cleanup tasks to core service 2026-04-04 05:49:58 +00:00
Virgil
f717fc66c3 feat(process): add stdin service helpers
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 04:28:06 +00:00
Virgil
dec0231938 fix(process): leave exit action errors unset
Align ActionProcessExited with the documented contract by keeping the reserved Error field nil for both start failures and normal exits.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 04:23:28 +00:00
Virgil
3930aed49a feat(process): allow zero-value task signals
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 04:19:17 +00:00
Virgil
8d1a0d0655 fix(process): retain failed starts in service state
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 03:37:26 +00:00
Virgil
85cd6dd7c8 feat(process): add wait task surface
Co-authored-by: Virgil <virgil@lethean.io>
2026-04-04 03:33:29 +00:00
Virgil
79e2ffa6ed feat(process): add signal task surface
Co-authored-by: Virgil <virgil@lethean.io>
2026-04-04 03:28:28 +00:00
Virgil
155f216a7c feat(process): add stdin close task 2026-04-04 02:49:37 +00:00
Virgil
227739638b feat(process): add Core stdin task 2026-04-04 02:45:56 +00:00
Virgil
ceea10fc7a feat(process): add async process start task 2026-04-04 02:42:45 +00:00
Virgil
cffe06631b feat(process): add process output task 2026-04-04 02:29:52 +00:00
Virgil
ec2a6838b8 Propagate process exit errors 2026-04-04 02:24:32 +00:00
Virgil
98fe626d8e feat(process): add process get core task 2026-04-04 02:21:01 +00:00
Virgil
87da81ffeb fix(process): leave exit action errors unset 2026-04-04 02:14:58 +00:00
Virgil
73b0ffecc0 fix(process): reject nil start context 2026-04-04 02:03:49 +00:00
Virgil
c5adc8066e fix(process): terminate unmanaged pids with sigterm 2026-04-04 01:40:53 +00:00
Virgil
ba4b0f1166 Force kill unmanaged PIDs 2026-04-04 01:29:54 +00:00
Virgil
ab02432543 fix(process): unify pid kill handling 2026-04-04 01:22:58 +00:00
Virgil
82e85a99fd feat(process): report kill errors in exit actions 2026-04-04 01:13:33 +00:00
Virgil
1ccc61848b fix(process): kill running processes on shutdown
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 01:07:16 +00:00
Virgil
eb6a7819e7 feat(process): emit kill action immediately 2026-04-04 01:00:27 +00:00
Virgil
dfa97f2112 fix(process): allow standalone service usage 2026-04-04 00:55:49 +00:00
Virgil
0e299e5349 feat(process): add process list core task 2026-04-04 00:52:58 +00:00
Virgil
eeca66240a feat(process): make listings deterministic 2026-04-04 00:32:12 +00:00
Virgil
24f853631d Add PID-based process kill support 2026-04-04 00:28:15 +00:00
Virgil
ce2a4db6cb fix(process): reject empty start command 2026-04-04 00:24:52 +00:00
Virgil
252f68db64 feat(process): forward task run options 2026-04-03 23:50:52 +00:00
Virgil
dcf058047e feat(process): emit exit actions consistently 2026-04-03 23:37:48 +00:00
Virgil
f70e301631 feat(process): validate KillGroup requires Detach 2026-04-03 23:34:16 +00:00
Virgil
b6530cf85d feat(process): track killed process lifecycle 2026-04-03 23:20:28 +00:00
Virgil
0546b42ce3 feat(process): add Core task for run execution 2026-04-03 23:17:11 +00:00
Snider
4ff0d0b745 fix(tests): migrate to new Core API — New() returns *Core, no WithName/ServiceFor
Replace framework.New(framework.WithName(...)) + framework.ServiceFor[T]()
with direct factory calls: factory := NewService(opts); raw, _ := factory(c)

RegisterAction handler signature: func(*Core, Message) Result (was error)

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-22 00:04:07 +00:00
Snider
93f3ab054c refactor: migrate core import to dappco.re/go/core
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-21 20:00:57 +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
4c17be4e46 fix: resolve variable shadowing in test files (core → framework alias)
Local variable `core` shadowed the package import `core`, causing
`core.ServiceFor` to be interpreted as a method call instead of a
package-level function. Aliased import as `framework`.

Also fixes pre-existing compilation failure in go-process test suite.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 13:58:18 +00:00
Snider
85b0e002d6 refactor: swap pkg/framework imports to pkg/core
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 14:10:56 +00:00
Snider
8095807ad6 feat: extract process package from core/go pkg/process
Process management with Core IPC integration, output streaming via
ring buffer, exec wrapper with logging, and dependency-aware runner.

Moved from forge.lthn.ai/core/go/pkg/process to standalone module.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 12:50:09 +00:00