Skip to content

Automation parameters are not persisted — every restart silently reverts operator tuning to config defaults #273

Description

@CameronBrooks11

Problem

ParameterManager holds automation parameters in memory only. On restart every parameter reverts to the default declared in the runtime config — silently, with no log line and no operator-visible signal that it happened.

Observed on hardware 2026-08-08: impeller_pwm was set to 100 before an AUTO run; a reinstall restarted the runtime; the value was back at its config default of 255 with nothing said.

Why it matters

The failure is quiet and it points the wrong way. An operator who deliberately turns an actuator down gets it back at the config default after any restart or upgrade — i.e. the direction of the silent change is toward more actuation, not less. For an impeller on a shared 12 V rail that is the largest current transient the machine makes.

It also breaks a reasonable operator model: the HTTP API accepts a parameter write and reports success, so the value looks durable. Nothing in the API or the logs distinguishes "this is set" from "this is set until the next restart".

Compounding: a restart is not a rare event. It happens on every upgrade, every config change applied via install.sh, and every supervisor-driven provider recovery that takes the runtime with it.

The header claims otherwise

core/automation/parameter_manager.hpp:57 documents:

 * - Optional persistence back to YAML (disabled by default)

There is no implementation — grep -n persist core/automation/parameter_manager.cpp returns nothing. So the type's own documentation describes a feature that does not exist, which is how a reader concludes persistence is merely switched off rather than absent.

Options, roughly in order of cost

  1. Say so. Log at INFO on startup which parameters took config defaults, and surface a persisted: false (or a "defaults applied at ") field on GET /v0/parameters. Cheapest, and converts a silent revert into something an operator can see. Does not fix the loss.
  2. Persist on write. Write parameter changes to a runtime-owned state file (not back into the operator's YAML, which install.sh treats as declarative input) and reload it at startup. Needs a decision about precedence when the config default and the persisted value disagree after an upgrade — the config is the operator's declared intent, the persisted value is their live tuning.
  3. Refuse to actuate on stale defaults. Out of scope here, but worth naming: parameters that drive actuation could require an explicit re-arm after a restart rather than silently resuming from defaults.

At minimum this issue should not close with the header comment still advertising an option that isn't there.

Related

Found during runbook §5 and the E-stop-under-AUTO interaction test on pi-g1, 2026-08-08.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions