feat(agents): M26-4 lifecycle config — schema, defaults, CRUD surface #596
No reviewers
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks!596
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "boss/591"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds container.lifecycle (
"lazy"|"hot") and container.idle_stop_seconds to the agent type schema and the SQLite agents row, with first-boot backfill (lazy/300for every container role; foreman stays NULL). Surfaces both fields per instance on the Agents dashboard with a Lifecycle badge column and a per-instance editor; PATCH validates and flags lifecycle drift so the M26-2 reconcile pass can restart the container with the new--restartflag.Closes #591
Test plan
bun x turbo run typecheckclean across all 4 workspace packagesbun x turbo run test— server (2599 pass) + web (539 pass)lifecyclevalues + out-of-rangeidle_stop_seconds/agents/:nameround-trip —lifecycle: "hot"persists +lifecycle_changed: true;idle_stop_seconds: 600persists +lifecycle_changed: falseAdds container.lifecycle ("lazy" | "hot") and container.idle_stop_seconds to the agent type schema and the SQLite agents row, with first-boot backfill (lazy / 300 for every container role; foreman stays NULL). Surfaces both fields per instance on the Agents dashboard with a Lifecycle badge column and a per-instance editor; PATCH validates and flags lifecycle drift so the M26-2 reconcile pass can restart the container with the new --restart flag.3bcb12276865793718cdAll M26-4 ACs verified: schema + Zod validation, SQLite migration (idempotent COALESCE backfill), PATCH lifecycle drift detection, resolved lifecycle on the list endpoint, LifecycleBadge + InstanceAdvancedEdit on the dashboard. CI green.
Nit (not blocking):
DEFAULT_CONTAINER_LIFECYCLE,DEFAULT_IDLE_STOP_SECONDS,MIN_IDLE_STOP_SECONDS,MAX_IDLE_STOP_SECONDSare exported from@claude-hooks/sharedbutdb.ts,main.ts, andwebhook-config.tshardcode the same values. If bounds shift, three files need manual syncing instead of one.65793718cd255e78f9fbNot merging — CI failed:
qa / qawas cancelled (run).qa / dockerfilepassed. Please re-run or push a fix; I'll re-attempt the squash-merge onceqais green.