Commit graph

167 commits

Author SHA1 Message Date
Codex
b7ef256ebf fix(go-process): update stale coreerr alias to dappco.re/go/log (AX-6)
Updated `coreerr "dappco.re/go/core/log"` → `coreerr "dappco.re/go/log"`
across 12 files (actions.go, daemon.go, errors.go, exec/exec.go,
health.go, pkg/api/provider.go, process.go, process_global.go,
program.go, registry.go, runner.go, service.go). No stale path
remains in .go.

Pre-existing blocker (out of ticket scope): `dappco.re/go/io@v0.4.2`
is 404 from module proxy — affects `go test ./...` but is unrelated
to this import rename.

Closes tasks.lthn.sh/view.php?id=718

Co-authored-by: Codex <noreply@openai.com>
2026-04-24 21:45:29 +01:00
Codex
653205a767 chore(go-process): annotate banned imports in process.go + service.go per AX-6
go-process IS the core.Process primitive implementation, so these
files cannot self-depend on core.* helpers. stdlib fmt, io, os,
os/exec, sync, syscall, strings, context, time are intrinsic to
subprocess management at this layer. Added `// Note: banned-imports
exception:` annotations documenting the self-dependency exception.

Closes tasks.lthn.sh/view.php?id=720

Co-authored-by: Codex <noreply@openai.com>
2026-04-24 20:11:00 +01:00
Codex
d86f9abc29 fix(go-process): replace testify with stdlib testing patterns (AX-6)
Removes testify + davecgh/go-spew + pmezard/go-difflib from go.mod;
rewrites assert/require calls across 13 _test.go files
(buffer/daemon/errors/exec/global/health/pidfile/process/program/
registry/runner/service + pkg/api/provider) to stdlib t.Fatalf
patterns. go vet + go test all clean (GOWORK=off).

Closes tasks.lthn.sh/view.php?id=719

Co-authored-by: Codex <noreply@openai.com>
Via-codex-lane: Cyclops-719 dispatch (haiku forwarder, ~17min lane)
2026-04-24 18:03:24 +01:00
Codex
55f7245017 feat(go-process): add CLI test Taskfile for build and unit test validation (AX-10)
Adds tests/cli/process/Taskfile.yaml with canonical build/test/vet/default
targets plus test-unit and Unix-gated test-integration (real subprocess tests
skipped on windows). default deps-chains build/test/vet per Wave 2 convention.

Co-authored-by: Codex <noreply@openai.com>
Via-codex-lane: supervised by Cerberus on Athena #103 request
Closes tasks.lthn.sh/view.php?id=302
2026-04-24 14:59:38 +01:00
Snider
d7c00f9aab chore: go mod tidy (module path migration) 2026-04-24 08:25:41 +01:00
Snider
6db0ad26e3 fix(registry): idempotent Unregister/Release when file missing
The coreio.Local.Delete error wraps the underlying os.ErrNotExist
through core.E, so the prior os.IsNotExist check on the registry
Unregister path never matched. Same wrapping broke the daemon
Stop path that relied on pidfile.Release being a no-op for absent
files.

Switch both to coreio.Local.Exists before Delete, which is the
idempotent pattern the callers already assume. Adds coverage for
TestPIDFile_Release_MissingIsNoop and fixes TestRegistry_Unregister
MissingIsNoop.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-14 19:44:06 +01:00
Snider
3f91bca3a3 fix(process): add missing processHandle/currentPID helpers + trim daemon payload
- process_handle.go: new file adding processHandle(pid) wrapping os.FindProcess
  and currentPID() wrapping os.Getpid — referenced by pidfile.go but never
  defined, breaking the build on dev
- pkg/api/provider.go: drop daemonEventPayload entries for entry.Config and
  entry.StartedAt — fields don't exist on DaemonEntry (which has Started time.Time)

Unblocks go-process dev build + tests (10s root, 0.9s exec, 7s api).

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-14 19:25:59 +01:00
Snider
afcbea305e feat(process): detached-by-default start + RFC API aliases + JSON tags
- service.go + actions.go + runner.go: process.start detached by default through
  named action/task path and RFC HTTP alias
- service.go: managed process IDs use core.ID()
- types.go + service.go + runner.go: JSON tags on execution/pipeline DTOs
- pkg/api/provider.go: Register helper; RFC alias routes /process/list + /process/start
- service_test.go + provider_test.go: detached-startup + RFC alias coverage

NOTE: dev branch had pre-existing compile errors in pidfile.go (undefined processHandle,
currentPID) — these exist independent of this commit. Build remains broken until
those are added, but the feat work here is preserved.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-14 19:01:26 +01:00
Snider
bcbd9ac87d docs(api): enumerate all 15 RegisterRoutes routes in spec
CodeRabbit finding: RegisterRoutes docstring only listed 4 daemon
routes, omitting 10 process-management routes and 1 pipeline route.
Updated to enumerate all routes verbatim from the implementation.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-07 09:08:31 +01:00
Snider
e9b85ae817 fix(pidfile): replace path.Dir with filepath.Dir for cross-platform compat
- pidfile.go: use filepath.Dir instead of POSIX-only path.Dir (line 55)
- pidfile.go: simplify redundant bytes/string conversions to strings.TrimSpace (lines 44, 105)
- docs/RFC.md: add language identifiers to four untyped fenced code blocks (MD040)
- specs/api/RFC.md: update NewProvider signature to 3-arg form matching implementation

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-07 08:59:29 +01:00
Snider
e41799b320 merge: resolve github/main conflicts keeping dappco.re module paths
Merged github/main into dev to resolve PR #2 conflict. Took github/main
code for all conflicted files (new features: signal, wait, start/run API,
UI streaming, process_global). Resolved go.mod by keeping dappco.re module
paths and using api v0.2.0 (dappco.re-compatible). go mod tidy confirms clean.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-07 08:29:01 +01:00
Snider
a0bf57f10b fix: migrate module paths from forge.lthn.ai to dappco.re
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 16:21:13 +01:00
Virgil
1e536f1a7c feat(ui): expose process control client methods 2026-04-04 08:11:19 +00:00
Virgil
3dd65af0a5 feat(api): add process start and run endpoints 2026-04-04 08:02:33 +00:00
Virgil
a7cde26b9b feat(api): allow pid targeting for process controls 2026-04-04 07:52:42 +00:00
Virgil
56bc171add feat(process): add running-only process listing 2026-04-04 07:48:31 +00:00
Virgil
f9537fb24d feat(api): add process signal endpoint 2026-04-04 07:44:37 +00:00
Virgil
cf9291d095 feat(process): add wait API endpoint 2026-04-04 07:41:05 +00:00
Virgil
720104babc feat(process): validate runner dependencies 2026-04-04 07:37:50 +00:00
Virgil
bc2cb6ae9d fix(process): keep runner exit errors nil 2026-04-04 07:33:50 +00:00
Virgil
f4da274ce6 fix(process): keep signal zero as liveness probe
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 07:29:00 +00:00
Virgil
b74ee080a2 feat(process): add service error helper
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 07:24:12 +00:00
Virgil
429675ca29 feat(process): add package register helper
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 07:19:56 +00:00
Virgil
588f4e173b fix(exec): guard default logger access
Co-authored-by: Virgil <virgil@lethean.io>
2026-04-04 07:15:04 +00:00
Virgil
3ac213a058 feat(process): preserve wait task snapshots on failure 2026-04-04 07:08:54 +00:00
Virgil
e1f5b0ff40 fix(process): harden health server snapshots
Co-authored-by: Virgil <virgil@lethean.io>
2026-04-04 07:00:45 +00:00
Virgil
ac5a938b70 feat(process): add readiness polling helpers 2026-04-04 06:55:42 +00:00
Virgil
1398c4b8ea feat(process): kill unmanaged pids forcefully 2026-04-04 06:51:14 +00:00
Virgil
2461466f55 Handle nil contexts in runner and daemon 2026-04-04 06:48:18 +00:00
Virgil
208dac3c82 feat(api): expose process stdin control
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 06:44:01 +00:00
Virgil
8d8267543d feat(process): include exit errors in action payloads 2026-04-04 06:39:22 +00:00
Virgil
9b3dd1ec49 feat(process): emit daemon started discovery events
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 06:12:49 +00:00
Virgil
040500f3e1 feat(process): broadcast provider process ws events 2026-04-04 06:09:01 +00:00
Virgil
c7542939c7 fix(process): count skipped runner results as success
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 06:00:52 +00:00
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
04543700bc fix(process): skip unresolved runner dependencies
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 03:24:33 +00:00
Virgil
86f5fadff7 fix(process): treat unresolved runner specs as failures 2026-04-04 03:21:01 +00:00
Virgil
c31f3faa2b Tighten process package API contracts 2026-04-04 03:17:30 +00:00
Virgil
e85abe1ee6 feat(process): add ManagedProcess alias 2026-04-04 03:14:25 +00:00
Virgil
4974b0fd08 fix(process): prefer resolved program path 2026-04-04 03:10:39 +00:00
Virgil
c9deb8fdfd fix(process): let Program.Find validate existing paths 2026-04-04 03:07:13 +00:00
Virgil
f43e8a6e38 feat(process): add global remove and clear helpers
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 03:04:00 +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
d34ab22ad3 feat(process): add global output helper 2026-04-04 02:57:25 +00:00