Commit graph

73 commits

Author SHA1 Message Date
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
90ce26a1b7 feat(api): expose managed process routes
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 01:03:42 +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
d565e3539e feat(process): add pipeline execution API 2026-04-04 00:49:35 +00:00
Virgil
686f1053b3 feat(process): fix daemon stop order 2026-04-04 00:45:40 +00:00
Virgil
2255ade57e feat(process): harden process group signalling 2026-04-04 00:42:46 +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
f98bbad5ac fix(process): reject duplicate runner spec names 2026-04-04 00:21:22 +00:00
Virgil
fa79e4eee7 fix(process): guard program run inputs 2026-04-04 00:18:14 +00:00
Virgil
214cf4cfa8 feat(process): expose health probe failure reasons
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 00:15:20 +00:00
Virgil
5142114e89 feat(process): rollback daemon startup on registry failure 2026-04-04 00:11:21 +00:00
Virgil
84d07daf19 feat(process): relax runner success semantics 2026-04-04 00:07:48 +00:00
Virgil
2bc6eb70d7 fix(process): copy info slices defensively 2026-04-04 00:04:54 +00:00
Virgil
f5a940facd feat(process): add running flag to process info 2026-04-04 00:01:22 +00:00
Virgil
9b536f08c6 feat(exec): require command context 2026-04-03 23:56:56 +00:00
Virgil
e58f376e4c feat(process): signal process groups 2026-04-03 23:53:19 +00:00
Virgil
252f68db64 feat(process): forward task run options 2026-04-03 23:50:52 +00:00
Virgil
1b7431e3a0 feat(process): skip unresolved pipeline specs 2026-04-03 23:47:38 +00:00
Virgil
6fda03d64d feat(process): fail invalid runner dependencies 2026-04-03 23:45:06 +00:00
Virgil
9457694e46 feat(process): preserve runner result order 2026-04-03 23:41:36 +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
87bebd7fa6 feat(exec): add background command support 2026-04-03 23:27:27 +00:00
Virgil
62e7bd7814 Fix runner deadlock handling 2026-04-03 23:22:43 +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
206b9a1f52 Merge pull request 'chore: update dependencies to dappco.re tagged versions' (#8) from dev into main
Reviewed-on: #8
2026-03-23 20:35:28 +00:00
Claude
61867e56bb
chore: update dependencies to dappco.re tagged versions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 01:10:19 +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
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
94c4fde4b0 Merge pull request '[agent/claude:sonnet] Implement the plan at docs/plans/2026-03-18-absorb-sail-prog...' (#3) from agent/implement-the-plan-at-docs-plans-2026-03 into main 2026-03-18 15:07:17 +00:00
Snider
87b16ca41c feat(process): add Program struct with Find, Run, RunDir
Add Program to the process package as a lightweight tool-finder and runner.
Find() resolves a binary via exec.LookPath (wrapping ErrProgramNotFound),
Run() and RunDir() execute the binary and return trimmed combined output.
Includes 7 tests covering happy paths, error paths, and the errors.Is contract.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-18 15:07:03 +00:00
Snider
e0df0d3b34 chore: sync dependencies for v0.2.9
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-17 17:53:00 +00:00
Snider
cdea149a20 chore: sync dependencies for v0.2.8
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-17 17:48:46 +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
eac2d0b0cd Merge pull request '[agent/claude:opus] Fix CodeRabbit findings. Verify each against current code, f...' (#2) from agent/fix-coderabbit-findings--verify-each-aga into main 2026-03-17 13:13:37 +00:00
Snider
f3e995ffd0 fix(coderabbit): address review findings
- Assert SetDefault error return in tests instead of ignoring it
- Pass caller location to wrapError for accurate error traces
- daemon.go reviewed: no actionable finding

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-17 13:13:26 +00:00
75cb802ef6 Merge pull request '[agent/claude:opus] DX audit and fix. 1) Review CLAUDE.md — update any outdate...' (#1) from agent/dx-audit-and-fix--1--review-claude-md into main 2026-03-17 08:43:17 +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
d955ffc0e7 chore: sync dependencies for v0.2.7
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-16 22:17:52 +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
10adcbe289 fix(test): SetDefault returns error not panic, update test
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-16 18:41:56 +00:00