Commit graph

43 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
c31f3faa2b Tighten process package API contracts 2026-04-04 03:17:30 +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
26af69d87b fix(process): kill process groups on shutdown 2026-04-04 02:10:35 +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
31be7280a6 feat(process): honor pending lifecycle 2026-04-04 01:11:03 +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
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
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
2bc6eb70d7 fix(process): copy info slices defensively 2026-04-04 00:04:54 +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
Claude
a09ca4f408
chore: migrate to dappco.re vanity import path
Module path: forge.lthn.ai/core/go-process -> dappco.re/go/core/process

Import path updates:
- forge.lthn.ai/core/go-log -> dappco.re/go/core/log
- forge.lthn.ai/core/go-io -> dappco.re/go/core/io
- forge.lthn.ai/core/go-ws -> dappco.re/go/core/ws
- forge.lthn.ai/core/go-process (self) -> dappco.re/go/core/process
- forge.lthn.ai/core/api left as-is (not yet migrated)

Local replace directives added until vanity URL server is configured.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 23:49:08 +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
1a015ed6ba feat: add Timeout, GracePeriod, KillGroup, Shutdown to RunOptions
- RunOptions.Timeout: auto-kills after duration (SIGTERM → SIGKILL)
- RunOptions.GracePeriod: time between SIGTERM and SIGKILL
- RunOptions.KillGroup: kills entire process group (child processes too)
- Process.Shutdown(): graceful SIGTERM → wait → SIGKILL
- OnShutdown uses Shutdown() instead of Kill() for graceful stops
- Runner circular deps now count as Failed, not Skipped
- Tests for all new features

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-17 17:44:37 +00:00
Snider
d73dfa3d73 refactor(process): replace fmt.Errorf and errors.New with coreerr.E()
Replace all 27 instances of fmt.Errorf/errors.New in production code
with coreerr.E() from forge.lthn.ai/core/go-log for structured error
context (op, message, cause). Promote go-log from indirect to direct
dependency in go.mod.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-16 20:38:08 +00:00
Snider
c3b9374ae1 feat: add Detach option for process group isolation
RunOptions.Detach creates the process in its own process group
(Setpgid) and uses context.Background() instead of the parent
context. Detached processes survive parent death.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-15 15:55:20 +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