M26-2 Reconcile + watchdog: lazy at boot, no flap event #589
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#589
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
User story
As a service operator, I want lazy containers to be created at boot but stay stopped, and I want the watchdog to recognise that stopped-lazy is normal, so that the fleet's idle state doesn't flood the event log with false
container_stoppedflap reports.Acceptance criteria
Reconcile
container-reconcile.tsreadslifecycle: "hot" | "lazy"from the SQLite agents row.reconcileAll()boot pass: hot rows behave as today (start if stopped). Lazy rows ensure container exists with the right config but do not start it. Initial state seeds asStopped.reconcileOne()on CRUD applies the same split for create + update.lifecyclechange counts as drift → recreate (so--restartflag is updated).Restart policy
--restart unless-stopped.--restart noso the daemon does not undo intentional stops.container.tsdocker runarg builder branches onlifecycle.Watchdog
container-watchdog.tsreadslifecycle. For lazy + currently-stopped (consult lifecycle module from M26-1),container_stoppedevent is suppressed.container_missing(#132 failure mode — not indocker ps -a) still fires for both hot and lazy. Recovery path unchanged.Tests
lifecyclechange → recreate.Out of scope
References
specs/container-lazy-lifecycle.md§Reconcile changes / §Watchdog changes / §Restart policy.apps/server/src/infrastructure/container/container-reconcile.ts.apps/server/src/infrastructure/container/container-watchdog.ts.startedaction variant).container_missingrationale.