feat(daemons): add per-server Daemons (background processes)#26
Merged
Conversation
Server-scoped daemon management: $forge->server($id)->daemons() / ->daemon($d). - Data\Daemon (id, command, user, directory?, processes, status, createdAt) - Data\CreateDaemonData, Data\UpdateDaemonData (name + config), Data\ListDaemonsOptions (sort + filter[user|site_id|directory]) - Enums\DaemonUser (root/forge), Enums\DaemonAction (restart/stop/start/empty-log) - Requests: GetDaemons, GetDaemon, CreateDaemon (POST), UpdateDaemon (PUT), DeleteDaemon, SendDaemonAction (POST /actions), GetDaemonLog - Resources\DaemonsResource (all/iterate/create), DaemonResource (get/update/delete/restart/stop/start/emptyLog/log:string) - ServerResource->daemons()/daemon($id) wired Spec-vs-runtime findings (for docs/FINDINGS.md): - Daemon update 500s with name-only; `config` (raw supervisor config) is effectively required despite the spec marking it optional. - Freshly-created daemons sit in `installing` (then `installed` — never `running`); restart 500s until installed. Lifecycle test waits on a live un-mocked connector before acting (skipped on replay). - BackgroundProcessResource attributes are sparse (command/user/ directory/processes/status/created_at) — no `name` or `updated_at`. 452 tests / 856 assertions / 100% coverage. Closes #9. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 task
fbarrento
added a commit
that referenced
this pull request
May 24, 2026
…it (#28) Folds the divergences that had only lived in PR descriptions into docs/FINDINGS.md: ssh-key create 202-empty, the four Sites findings (server-less GET, runtime-required domain_mode, fresh-site nulls, PUT-empty), the deployments script/trigger notes, the two daemon findings (update needs config, install-state race), and the fixture-redaction hardening from the security audit (#27). Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Server-scoped daemon management —
$forge->server($id)->daemons()/->daemon($d). Independent of Sites/Deployments.Data\Daemon(id, command, user, directory?, processes, status, createdAt)Data\CreateDaemonData,Data\UpdateDaemonData(name + config),Data\ListDaemonsOptions(sort +filter[user|site_id|directory])Enums\DaemonUser(root/forge),Enums\DaemonAction(restart/stop/start/empty-log)GetDaemons,GetDaemon,CreateDaemon(POST),UpdateDaemon(PUT),DeleteDaemon,SendDaemonAction(POST/actions),GetDaemonLogResources\DaemonsResource(all/iterate/create),DaemonResource(get/update/delete/restart/stop/start/emptyLog/log(): string)ServerResource::daemons()/daemon($id)wiredSpec-vs-runtime findings (for docs/FINDINGS.md)
config(raw supervisor config) is effectively required despite the spec marking it optional.installing→installed(neverrunning);restart500s untilinstalled. Lifecycle test waits on a live un-mocked connector before acting (skipped on replay).BackgroundProcessResourceattributes are only command/user/directory/processes/status/created_at — nonameorupdated_at.Test plan
composer test— pint, rector, phpstan, 452 tests / 856 assertions, 100% coverage.sleep 9999daemon, exercises list/get/update/restart/log, then deletes — 7 fixtures recorded live, log content redacted.🤖 Generated with Claude Code