Files
Pulse/internal/api
rcourtman bb9be052ad Say an update leaves a stopped container stopped (#4235)
On the Patrol fault set, a crashed worker (exit 139, no restart policy)
with a newer image available got `update` proposed instead of `start` in
each of the four runs where Patrol proposed an action. The conclusions
called update the lowest-risk step because of its "automatic backup and
rollback".

That update could not have restored the service. The Docker agent starts
and checks a replacement only when the original was running
(`updateContainerWithProgress`, `wasRunning`), so updating a stopped
container leaves it stopped, with no check that the new image runs.

## What changes

The `update` capability's description follows the container's run state:

- **Stopped:** "Update this stopped Docker container to its latest image
through its reporting Pulse agent. The container stays stopped: an
update does not start it or check that the new image runs."
- **Running:** unchanged.

Every policy field is unchanged: approval level, auto-authorization
class, rollback support, handler. No action is added or widened. A
person approving the plan reads the same sentence.

## Proof

- `TestDockerUpdateCapabilitySaysAStoppedContainerStaysStopped`: exited,
created, dead and stopped containers say it, a running one keeps its
wording.
- `TestPatrolCatalogForACrashedContainerSaysUpdateLeavesItStopped`: real
monitor state through the real registry, Docker executor and Patrol
broker. The catalog for a crashed container lists start and update, and
update says it stays stopped.

No model run. The choice rule itself is in the investigation prompt:
rcourtman/pulse-enterprise#263, which does not depend on this one.

Not changed: `docs/DOCKER.md` does not say what an update does to a
stopped container.

Draft: waiting for the D2 score on the fault set.
2026-11-10 18:06:32 +00:00
..
2026-10-11 22:20:25 +01:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-08-31 19:47:01 +01:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-04-26 17:26:16 +01:00
2026-01-22 00:30:15 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-09-01 01:02:17 +01:00

Internal API Package

This directory contains the API server implementation for Pulse.

Important Note About frontend-modern/

The frontend-modern/ subdirectory that appears here is:

  • AUTO-GENERATED during builds
  • NOT the source code - just a build artifact
  • IN .gitignore - never committed
  • REQUIRED BY GO - The embed directive needs it here

Frontend Development Location

👉 Edit frontend files at: ${PULSE_REPOS_DIR}/pulse/frontend-modern/src/

Why This Structure?

Go's //go:embed directive has limitations:

  1. Cannot use ../ paths to access parent directories
  2. Cannot follow symbolic links
  3. Must embed files within the Go module

This is a known Go limitation and our structure works around it.